@Override
public void encodeBegin(FacesContext context) throws IOException {
super.encodeBegin(context);
try {
PageContext pageContext = PageContext.extract();
if (pageContext!=null && pageContext.getPrepareView().length()>0) {
// infoke action listener
MethodBinding binding = context.getApplication().createMethodBinding(
pageContext.getPrepareView(), null);
binding.invoke(context, null);
}
} catch (Throwable t) {
MessageBroker messageBroker =