[jboss-user] [JBoss Seam] - Re: show me the right way to access row of datatable with Se

smithbstl do-not-reply at jboss.com
Wed Aug 1 12:19:18 EDT 2007


Change your getPersonnels method into a void factory method.  Since you are outjecting your DataModel, you don't need to tie it a getter

 <h:dataTable var="personnel" value="#{personnels}">
  |   <h:column>
  |       <f:facet name="header">action</f:facet>
  |        <s:link value="Select" action="#{applicationHome.selectPersonnel}"/>
  |   </h:column>
  | </h:dataTable>

@Name("applicationHome")
  | public class ApplicationHome extends EntityHome<Application>
  | {
  | ...
  | 	@DataModel
  | 	private List<Personnel> personnels;
  | 
  |         @Factory("personnels")
  | 	public void fillPersonnels()
  | 	{
  | 		if (personnels == null)
  | 			personnels = getInstance() == null ? null : new ArrayList<Personnel>(getInstance().getPersonnels());
  | 	}
  | 
  | 	@DataModelSelection
  | 	@Out(required = false)
  | 	private Personnel personnel;
  | 
  |         @Logger Log log;
  | 
  |        public void selectPersonnel() 
  |       {
  |          if (personnel == null) log.info("always null here");
  |       }
  | }
  | 	

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069728#4069728

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069728



More information about the jboss-user mailing list