• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic ajax behaviour

 
Jabi Vulla
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai ..any body can help me please ... im creating primefaces components dynamically here the code is ...

ValueExpression valueExp1 = elFactory.createValueExpression(elContext, "#{transactionSearchBean.selectedDataType1}",Object.class);

ValueExpression valueExp3 = elFactory.createValueExpression(elContext, "#{transactionSearchBean.textBoxValue1}",String.class);

MethodExpression criteriaAjaxEventListener = elFactory.createMethodExpression(
context.getELContext(), "#{transactionSearchBean.fieldChangedForPanel1}", null, new Class[] { AjaxBehaviorEvent.class });

AjaxBehavior criteriaAjax = new AjaxBehavior();
criteriaAjax.setListener(criteriaAjaxEventListener);

UISelectItems selectItems1 = new UISelectItems();
selectItems1.setValue(modelFieldStaticDataFilterList);

SelectOneMenu criteriaMenu = new SelectOneMenu();
criteriaMenu.setId("criteriaID");
criteriaMenu.setStyle("width:145px");
criteriaMenu.setValueExpression("value",valueExp1);
criteriaMenu.getChildren().add(selectItems1);
criteriaMenu.getChildren().add(criteriaAjax);//66
panelGrid1.getChildren().add(criteriaMenu);


InputText inputText1 = new InputText();
inputText1.setId("textFieldID");
inputText1.setValueExpression("rendered", valueExp5);
inputText1.setValueExpression("value",valueExp3);
panelGrid1.getChildren().add(inputText1);

in combo box i added selectitem1 list see in the code, i want to display text box when selection of item in the combo box for that
i need add child ajax element to combo box , here the problem is i am not getting how ajax element add to combo box please any one tell
how i need to put ajax to combo box and how display text box when selecting combo box item..please any experts can explain Ajax behaviours in this scenario?

 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic