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);
  • @sessionscoped bean,
  • 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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -