"gavin.king(a)jboss.com" wrote : void @Factory methods should not have a scope.
The scope is defined on the attribute that does the outjection.
Hi, i'm struggling with a similar issue as fernando did:
Here some code snippets:
DataModel declaration:
@DataModel(scope=ScopeType.PAGE)
| private Collection<Role> roleDataModel;
|
Factory declaration:
@Factory("roleDataModel")
| public void initializeModel() {
| log.debug("initializeModel() called (but not used)");
| if (organigramTreeModelSelection != null)
| roleDataModel = ((OrganigramNode) organigramTreeModelSelection)
| .getRoles();
| else
| roleDataModel = new ArrayList();
|
| }
|
xhtml:
<rich:dataTable id="roleTableId" value="#{roleDataModel}"
| ...
| </rich:dataTable>
As Gavin wrote the scope has to be defined on the outjecting attribute. Considering
@DataModel does only take PAGE or UNSPECIFIED scopes i run into a problem as the datatable
(roleTableId) is updated through an ajax request.
As follows:
<rich:tree switchType="ajax" ajaxSubmitSelection="true"
reRender="fwcToolbar, roleTableId" ....
|
But in this case the PAGE scope i can't use, right?
Does anybody have any idea?
Help would be very appreciated as i've been fighting with this quite long..
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080599#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...