0
我正在使用有界任務流的oracle adf,並在運行時動態生成ui,但問題在於UI組件不可點擊,我無法點擊ui組件,代碼是如下。oracle adf運行時間用戶界面生成
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";
}
UI組件出現了正常,但他們無法點擊任何幫助將是非常appreciated.Thanks
問候, Furqan艾哈邁德