JSF + Liferay: Cannot send parameters from a bean to another -
i've tried methods, nothing works, in destination @postconstruct parameter null.
i sending redirect beana page (backed beanb) , trying extract parameter beanb. requirement not add parameters url.
i tried methods:
facescontext.getcurrentinstance().getexternalcontext().getsessionmap().put("userid", userid);@sessionscopedbean,ec.getflash().put("userid", userid);
any suggestions? redirecting with:
facescontext facescontext = facescontext.getcurrentinstance(); facescontext.getexternalcontext().redirect(url);
the portlet api knows 2 session scopes: portlet_scope , application_scope
the default bridge maps attributes in session map portlet_scope, means attributes visible portlet.
if want write , read session attributes portlets, have use:
portletsession session = ((portletsession) facescontext.getcurrentinstance(). getexternalcontext().getsession(true)); // set session.setattribute(attributename, value, portletsession.application_scope); // object value = session.getattribute(attributename, portletsession.application_scope); in xhtml can use #{httpsessionscope.attributename} well.
Comments
Post a Comment