myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "ExecutingMethodsFromLinkButtonParameters" by RickReumann
Date Sat, 17 Sep 2005 18:08:55 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by RickReumann:
http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters

------------------------------------------------------------------------------
  
  You could of course create your DataModel directly in the EmployeeAction class, in which
case you wouldn't need the extra class (EmployeeListBean) holding the DataModel (I like to
have it separate though in case other classes want to use it).
  
- The other thing to note is that if your DataModel for the form doesn't have Session scope,
you'll need to do something like t:saveState in order to make sure the same DataModel is present
when you click on your link. In this example we would add x:saveState some place after f:view:
+ The other thing to note is that if your DataModel for the form doesn't have Session scope,
you should add preserveDataModel="true" to your dataTable definition:
+ 
+ {{{<t:dataTable var="emp" 
+                 value="#{employeesListBean.employeesModel}"
+                 preserveDataModel="true" ... }}}
+ 
+ This will make sure the same DataModel is present when you click on your edit link. 
+ 
+ Another option is to use t:saveState to preserve your DataModel. In this example we would
add t:saveState some place after f:view:
  
  {{{<f:view>
      <t:saveState id="employeesListBean" value="#{employeesListBean}"/>}}}
      
- In closing, if you want to see these last two approaches in some example code.... http://www.reumann.net/reumann/jsf/jsf_employees/
  

Mime
View raw message