0

Below is screenshot of selectOneMenu break

enter image description here

Below is my code :

<h:form>
   <h:commandLink  value="Edit"> 
    <p:ajax event="action" update=":editPanel" listener="#{myBean.open(productItem,'edit')}"/>
   </h:commandLink> 
</h:form>

<h:panelGroup layout="block" id="editPanel">
   <h:form>
      <p:selectOneMenu label="hello" value="hello">
        <f:selectItems itemLabel="#{mybean.labelvalueList}" itemValue="#{mybean.valueList}"/>
      </p:selectOneMenu>
   </h:form>
</h:panelGroup>

I am facing problem in display selectonemenu of PrimeFaces when event fire using ajax, as per my observation it will break combobox functionality when ajax call ,one more thing data from back end coming properly there is problem with display only.

Anybody can help me to fix this problem ? I am using PrimeFaces 5

  • Why don't use a `` instead (PrimeFaces one) while using PrimeFaces in which `ajax` is set to true by default? – Tiny Feb 04 '15 at 14:36
  • You need to add a screenshot. – Stefan Feb 04 '15 at 14:41
  • It's not working, same problem arise. – Jasmin Bhatti Feb 04 '15 at 14:47
  • You have embedded a `` inside another different ``. Why? This appears to be absolutely superfluous. – Tiny Feb 04 '15 at 14:49
  • In addition to that `` has serious problems. You need to use the `var` and `value` attributes along with `` which in turn requires an appropriate converter, if the list of items in the `` contains composite/complex objects and the `value` attribute of `` is supposed to be set/bound to an appropriate bean property with an appropriate data type. – Tiny Feb 04 '15 at 14:58
  • update another based on selection ,so its inside – Jasmin Bhatti Feb 04 '15 at 15:01
  • contains only list of String – Jasmin Bhatti Feb 04 '15 at 15:02
  • If it contains only a list of strings then, it should go just like ``. Those `itemLabel` and `itemValue` attributes of `` refer to something which implicitly implies that you want a list of items in the `` having different values and labels. If it is the case then use `var` and `value` appropriately in the given `` and map the `` to an appropriate bean property using its `value` attribute as stated earlier. – Tiny Feb 04 '15 at 15:28
  • The whole story is appropriately mentioned [here](http://stackoverflow.com/a/6850681/1391249). – Tiny Feb 04 '15 at 15:30

0 Answers0