I am working on oracle adf with bounded taskflow and generating the ui dynamically on run time but the problem is that the UI components are not clickable and I am unable to click on the ui components, the code is as follows.
public String testMethod() {
// Add event code here...
FacesContext facesContext = FacesContext.getCurrentInstance();
UIViewRoot root = facesContext.getViewRoot();
RichPanelGroupLayout panelGrpLayout = new RichPanelGroupLayout();
panelGrpLayout.setId( "pgl1" );
panelGrpLayout.setLayout( "scroll" );
RichMenuBar menuBar = new RichMenuBar();
menuBar.setId( "rmb1" );
menuBar.setVisible( true );
panelGrpLayout.getChildren().add( menuBar );
RichCommandButton button = new RichCommandButton();
button.setId( "cmi1" );
button.setVisible( true );
button.setText( "First" );
button.setPartialSubmit( true );
button.setRendered( true );
String method = "#{backingBeanScope.CLBean.testMethod}";
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
MethodExpression methExp = elFactory.createMethodExpression(elContext, method, Object.class, new Class[0]);
button.addActionListener( new MethodExpressionActionListener(methExp) );
root.addComponentResource( facesContext, button );
return "product";
}
The UI components showed up properly but they are not clickable any help will be highly appreciated.Thanks
Regards, Furqan Ahmed