I made a cheap hack in outjectDataModelList() in Component.java that made 
things work as I expected (for a page-scoped DataModel in a session-scoped 
bean).  I changed this:


  |     context.set( name, wrapper.wrap(dataModelAnn, list));
  | 

to this:


  |     if(existingDataModel != null) {
  |         ((javax.faces.model.DataModel) 
existingDataModel).setWrappedData(list);
  |      } else {
  |      context.set( name, wrapper.wrap(dataModelAnn, list));
  |      }
  | 

I don't understand the bigger picture well enough to know if that is going to 
hurt me in other ways, though.  Will reusing the wrapper cause problems with 
non-PAGE-scoped DataModels, or perhaps there are other uses of DataModels that 
will break?  Is it always safe to cast to javax.faces.model.DataModel?

Of course, any advice on how to implement my app without using a page-scoped 
datamodel in a session-scoped bean is welcome, too.

Thanks,

Joe



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

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

Reply via email to