Huh,
  I managed to make the system "work" by doing very uglyt hacking in 
SeamStateManager.java


  | 
  |     public void writeState(FacesContext ctx, SerializedView sv)
  |         throws IOException {
  | 
  |     {
  | 
  |         ExternalContext extCtx = ctx.getExternalContext();
  |         Object serialFactoryObj = extCtx.getApplicationMap().get(
  |                 StateUtils.SERIAL_FACTORY);
  |  
  |         if (serialFactoryObj == null) {
  |             SerialFactory serialFactory;
  |             serialFactory = new DefaultSerialFactory();
  |             extCtx.getApplicationMap().put(StateUtils.SERIAL_FACTORY,
  |                     serialFactory);
  |         }
  | 
  |     }
  |     stateManager.writeState(ctx, sv);
  |     }
  | 

That is,  NO org.apache.myfaces.webapp.StartupServletContextListener configured 
in web.xml. 

Maybe this is MyFaces bug, because in 
org.apache.myfaces.portlet.MyFacesGenericPortlet has a lot of methods for all 
kind of initaliazation (like init() and initMyFaces()).  Especially interesting 
is the initMyFaces() which looks like replacement of 
StartupServletContextListener.initFaces(), but for portal/portlets. Somehow 
however,  i couldn't get the SERIAL_FACTORY hack work from initMyFaces() due to 
FacesContext being null. 

I hope i'm not missing anything else (critical)  from 
StartupServletContextListener initalization if the MyFacesGenericPortlet is not 
working correclty. 





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

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

Reply via email to