You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by angeloimm <an...@libero.it> on 2005/02/03 12:51:06 UTC

Some questions PortletSessionState

Hi all; this is my scenario:

i have several portlets in a page; i have, then, added a portlet that works as navigator by reading some parameters from xml file. These parameters' id are passed by the other partlets in the same page; this portlet must set an attribute into session and this first portlet must read thi attribute; now if i use the normal HttpSession i don't have what i want; infact since the navigator is the first portlet that is loaded it doesn't find the new value into session; it finds it only if i refresh the page (by using F5); then i have used the SessionState.... in the action of portlets that must set this value i have setted a similar thing:

String pageId = portlet.getAttribute("pageId", null, rundata) == null ? "FWD-OO1" : portlet.getAttribute("pageId", null, rundata) ;

logger.info("pageId from psml: " + ( portlet.getAttribute("pageId", null, rundata) == null ? "FWD-OO1" : portlet.getAttribute("pageId", null, rundata) ));

((JetspeedRunData)(rundata)).getPageSessionState().setAttribute( "pageId", pageId );
((JetspeedRunData)(rundata)).getPageSessionState().setAttribute("rootPageId",pageId.substring(0,7));


Then in tha action of my navigator portlet i have added:
String pageId = (String) ( ( (JetspeedRunData) (data)).getPageSessionState().getAttribute("pageId"));



Well this doesn't work as i hoped; infact if i change page, the value pageId recovered doesn't change; if i use refresh (F5), this value changes correctly, but if i close the page and then re-open it i have the same thing, that is to refresh the page.

Is there a method to have what i want? What i would like to have is set a parameter into session or context or where possible and then to recover it.
Thanks to all



____________________________________________________________
6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero!
Scaricalo su INTERNET GRATIS 6X http://www.libero.it



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: "hasLoggedIn" property and UserBrowser portlet

Posted by Vladimir Figurov <vf...@asia-soft.kz>.
8) hi! tezka!!!

In velocity, if use full method's name, need write "hasLoggedIn()".  

#entryCell ($!user.hasLoggedIn())

but this - not help you 8((( - as is hasLoggeId look in TEMP hash in 
user object - and, on Browser User portlet the any user-object return 
FALSE 8(((


Vladimir Lisin wrote:

>Hi all,
>
>I wanted to add  in the table of  users in UserBrowser portlet  the column 
>with flag "hasLoddeIn".
>But simple insert  the  line " #entryCell ($!user.hasLoggedIn) " in 
>user-browser.vm  don't  provide result.
>Why ?  This "user" is JetspeedUser and has ".hasLoggedIn" property !?
>In  UserBrowserAction this "user"  appear by the next :
>
>            ............................. 
>            Iterator users = JetspeedSecurity.getUsers();
>            List userList = new ArrayList();
>           ...............................
>            while(users.hasNext()) 
>                        {
>                          JetspeedUser user = (JetspeedUser)users.next();
>                           userList.add(user);
>                          }
>             .....................................
>Can anybody comment this ? 
>Thanks in advance, Vladimir
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


"hasLoggedIn" property and UserBrowser portlet

Posted by Vladimir Lisin <vl...@emgas.gazprom.ru>.
Hi all,

I wanted to add  in the table of  users in UserBrowser portlet  the column 
with flag "hasLoddeIn".
But simple insert  the  line " #entryCell ($!user.hasLoggedIn) " in 
user-browser.vm  don't  provide result.
Why ?  This "user" is JetspeedUser and has ".hasLoggedIn" property !?
In  UserBrowserAction this "user"  appear by the next :

            ............................. 
            Iterator users = JetspeedSecurity.getUsers();
            List userList = new ArrayList();
           ...............................
            while(users.hasNext()) 
                        {
                          JetspeedUser user = (JetspeedUser)users.next();
                           userList.add(user);
                          }
             .....................................
Can anybody comment this ? 
Thanks in advance, Vladimir