jsf 2 - How to edit data in Primefaces DataTable without in-cell editing? -


i have 2 pages.

  1. add page add new item add page
  2. list page show items list page

when click on edit icon on list page, want show selected data on add page editing , update data if click on save button. how this?

pass row identifier parameter button. example, assuming #{item} iterated item , has long id property uniquely identifies item.

<p:button icon="ui-icon-pencil" outcome="edit.xhtml">     <f:param name="id" value="#{item.id}" /> </p:button> 

in target page, edit.xhtml, can use <f:viewparam> convert, validate , set bean property.

<f:metadata>     <f:viewparam name="id" value="#{bean.item}" required="true" converter="itemconverter" /> </f:metadata>  ...  <p:inputtext value="#{bean.item.name}" /> <p:inputtext value="#{bean.item.shortname}" /> 

see also:


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -