wood burning stoves*
The moose likes JSF and the fly likes dynamic ajax behaviour Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "dynamic ajax behaviour" Watch "dynamic ajax behaviour" New topic
Author

dynamic ajax behaviour

Jabi Vulla
Greenhorn

Joined: Jan 20, 2013
Posts: 7
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?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic ajax behaviour