Hi All.. Please help
I have code like shown below for calling a java bean method using f:ajax call.
<h:selectOneMenu id="Cat" value="#{bean.selectedCategory}" >
<f:ajax action="change" listener="#{bean.changeMethod}" update="grid" render="grid"></f:ajax>
<f:selectItems value="#{data.categories}" itemValue="#{data.categories}"/>
</h:selectOneMenu>
java bean listener as implemented as below
public void changeCat(AjaxBehaviorEvent e) {
String newValue = getSelectedCategory();
// some logic here
}
in above case, for netscape, newValue is getting value from value="#{bean.selectedCategory}". But IE8/7 newValue is "". (the value not being set to #{bean.selectedCategory} though the setter method is called.)
Kindly let me know how to proceed
<f:ajax> not working in IE8/7
Wrong place for you in this forum. I can't see any PrimeFaces components in your code at all.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
are you sure you want to use "update" -Attribute in JSF2-ajax-tag?
Maybe i am wrong, but i thought it was like this:
JSF2
<f:ajax listener="#{bean.listenerMethod}" execute="comp_id" render="comp_id" />
Primefaces
<p:ajax listener="#{bean.listenerMethod}" process="comp_id" update="comp_id" />
also i am not sure if you use <f:selectItems> correctly. Try setting var="var" and using that in the itemLabel instead
in my case i use <h:selectOneMenu, but with <p:ajax and it works like a charm
Maybe i am wrong, but i thought it was like this:
JSF2
<f:ajax listener="#{bean.listenerMethod}" execute="comp_id" render="comp_id" />
Primefaces
<p:ajax listener="#{bean.listenerMethod}" process="comp_id" update="comp_id" />
also i am not sure if you use <f:selectItems> correctly. Try setting var="var" and using that in the itemLabel instead
in my case i use <h:selectOneMenu, but with <p:ajax and it works like a charm
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!
-
- Information
-
Who is online
Users browsing this forum: No registered users and 33 guests