jsf - Primefaces p:celleditor celledit -


i'm implementing p:datatable component, based on primefaces showcase

the code is:

<p:datatable     id="newdatatable"     editable="true"     editmode="cell"     var="item"     value="#{mybean.listnewdatatable}">      <p:ajax event="celledit" listener="#{mybean.newcelleditlistener}" update="@this"/>     <p:column width="150" >         <p:celleditor>             <f:facet name="output">                 <h:inputtext value="#{item.description}" readonly="true"/>             </f:facet>             <f:facet name="input">                 <p:selectonemenu value="#{item.id}" style="width: 90%;">                     <f:selectitems value="#{mybean.productsmap.entryset()}" var="entry" itemvalue="#{entry.key}" itemlabel="#{entry.value}" />                 </p:selectonemenu>             </f:facet>         </p:celleditor>     </p:column>     -- more data -- </p:datatable> 

and backing bean method:

public void newcelleditlistener(celleditevent event){     ... work here ... } 

when value on editable cell changed, p:celleditor works expected.

the problem is:

when value on editable cell remains unchanged, p:celleditor shows item.id when should showing item.description.

am missing obvious? need additional configuration?

i have been googling tip or answer, without success.

update

same problem persists on following code:

<p:column headertext="money" width="150" >     <p:celleditor >         <f:facet name="output">             <h:inputtext value="#{actual.money}" readonly="true">                 <f:convertnumber type="currency" />             </h:inputtext>         </f:facet>         <f:facet name="input">             <h:inputtext value="#{actual.money}">             </h:inputtext>         </f:facet>     </p:celleditor> </p:column> 

the value on backing bean same input , output, difference between each other should 'currency' format.

update

as workaround used "p:commandbutton" update datatable.

<p:commandbutton icon="ui-icon-refresh" update="newdatatable" value="update" /> 

the app running on:

  • primefaces 3.5
  • primefaces extensions 0.7.1
  • mojarra 2.1.22
  • tomcat 7

thanks help. kind regards.

values in output , input should same. try fix that.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -