I have a backing bean which is used in both the session and conversation 
context as follows:


  | @Name("searchCompany")
  | @Scope(ScopeType.SESSION)
  | @Roles( [EMAIL PROTECTED](name="findCompany",scope=ScopeType.CONVERSATION)} 
)
  | 

In order for the outjected datamodel list to pick up the correct value on the 
page I have to use the page scope for the datamodel:


  | @DataModel(value="companyList",scope=ScopeType.PAGE)
  | public List<Company> getResultList() {
  |     return super.getResultList();
  | }
  | 

If I do not limit the scope to page then if a I use the bean in a convesation 
and a previously instantiated session bean exists then the page (in a 
conversation) uses the session datamodel before a search has occured. Clicking 
on the list results in an error as the list was not generated by the 
conversation bean.

So it appears that I've solved my problem, but I can no longer use expressions 
such as the following in a dataTable:


  | <s:link view="/secure/crm/editCompany.seam" 
action="#{editCompany.setInstance(company)}">
  |     #{company.companyName}
  | </s:link>
  | 

I guess this is because the datamodel doesn't have "sufficient" scope at the 
time of the action, or perhaps seam doesn't look in the page scope when doing 
action events.

This problem is different from datamodelselection, which works for page scoped 
datamodel that postback to the same bean as the datamodel.

Is this just a fact of life with seam, or is there a better way ?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032264
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to