jquery - p:dataTable - toggle rowEdit via menuButton -


i have p:datatable last column contains p:menubutton provide options corresponding row, such 'delete' , 'edit' (there more, reason why want combine these options in single column).

how can toggle table's row editor using menuitem ('edit'), behaviour same if clicked p:roweditor-icon (which not render @ all).

code snippet:

<p:datatable ... >   ...   <p:column>     <p:menubutton>       ...       <p:menuitem value="edit" onclick="[what put here?]"/>     </p:menubutton>   </p:column> </p:datatable> 

you might able call primefaces javascript widget directly, there's easier solution. append functionality column contains p:roweditor tag.

for example, here's how append delete link command after row edit icons:

<p:datatable var="record" ... >  ...  <p:column>   <p:roweditor />   <p:celleditor>    <f:facet name="output">      <p:commandlink id="deletelink" action="#{editbean.delete(record)}">delete</p:commandlink>    </f:facet>    <f:facet name="input">     <div></div>    </f:facet>   </p:celleditor>  </p:column> </p:datatable> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jquery - Keeping Kendo Datepicker in min/max range -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -