Hello.

In order to create logout links at desired positions outside the user portlet, 
I've done the following:


  PortalNodeURL login;
  JBossPortalNode child;
  // ...search for portlet window with user portlet
  login = resp.createActionURL(child);
  login.setParameter("op", "userLogout");


unfortunately this does not work. The setParameter line throws a 
NullPointerException due to the fact that login is still null when setting a 
parameter. 

However, I've found a workaround.  I created this link with a RenderURL instead 
and compared to the "real" link of the user portlet. Basically the same URL is 
generated, the only difference is that cmd is set to "render" instead of 
"action". So I replace the string and the logout works correctly.


  PortalNodeURL login;
  JBossPortalNode child;
  // ...search for portlet window with user portlet
  login = resp.createRenderURL(child);
  login.setParameter("op", "userLogout");
  // replace "render" with "action" in login string


I must confess this is kind of confusing for me (I'm happy that it works at all 
:D). Can anyone tell me what went wrong here?

Greetings Thorsten

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919796


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to