Personalization and request attributes in WP 6.0
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > Personalization and request attributes in WP 6.0




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Personalization and request attributes in WP 6.0  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 12:22 AM

Hi guys,
I was able to use personalization rules based on request parameters to hide 
or show a portlet on a page.
Now I'd like to understand if it's possible to accomplish the following scen
ario by using request attributes:
Portlet A and Portlet B are placed on the same page.
Portlet A sets a request attribute (request.setAttribute("myattribute","myva
lue").
Portlet B should be visible only when "myvalue" is a specific value.

I wasn't able to exploit built-in pzn object and rules to do that.
So, I tried to create a custom application object to extract the attribute f
rom the request and expose it to visibility rules.
The application object can access the personalization RequestContext object,
but it's not clear to me exactly the relation between PortletRequest,HttpSer
vletRequest and RequestContext.
I don't know if the problem is due to the order that Portal follows to rende
r portlets and invoke personalization rules.
Any help really appreciated.






[ Post a follow-up to this message ]



    Re: Personalization and request attributes in WP 6.0  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 12:20 PM

I found a solution for my issue.
The problem was related to HttpServletRequest attributes scope.
If you set the attribute out of the portlet container ( i.e. into Default.js
p) you can apply directly visibility rules on pzn Request object without pzn
 coding.





[ Post a follow-up to this message ]



    Re: Personalization and request attributes in WP 6.0  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 06:22 PM

> I found a solution for my issue.
> The problem was related to HttpServletRequest
> attributes scope.
> If you set the attribute out of the portlet container
> ( i.e. into Default.jsp) you can apply directly
> visibility rules on pzn Request object without pzn
> coding.

Are you using IBM Legacy Portlets or JSR 168 Portlets?






[ Post a follow-up to this message ]



    Re: Personalization and request attributes in WP 6.0  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-26-07 06:22 PM

I'm using only jsr168 portlets.
I was able to set HttpServletRequest attributes even in my portlet code.





[ Post a follow-up to this message ]



    Re: Personalization and request attributes in WP 6.0  
Harisankar Gopalan


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-28-07 12:22 AM

HI,
How you applied rules on pzn request object ? You mean by creating rules in 
Admin console .


I too want to set attribute in request .I have tried by setting attributes i
n request. It didn't work . Can you provide sample code how you set attribut
es and how you applied rules for that request object.

Thanks
Hari





[ Post a follow-up to this message ]



    Re: Personalization and request attributes in WP 6.0  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-30-07 06:23 PM

Yes, you can use pzn Web UI to set a new dynamic property to the Request obj
ect named like the request attribute you want to set ("manage properties").

As quick test you can set attribute in Default.jsp of Portal theme before sc
reen render... for instance ...

<% request.setAttribute("show","true"); %>
<table style="width:100%; height:100%;" cellpadding="0px" ....

Your visibility rule will like as ...

Show  page or portlet when
current Request.show  is  true
Otherwise hide

after that you have just to map your rule to your portlet in Portal Web UI
("manage pages").

hope this helps.









[ Post a follow-up to this message ]



    Re: Personalization and request attributes in WP 6.0  
andrius.kurtinaitis@sintagma.lt


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-20-07 12:39 PM

That's tricky. There is no "Request" resource collection in the "attribute" 
menu if you create the rule when accessing the it through the Manage Pages -
&gt; Select page -&gt; Edit properties.<br />
<br />
Because there is no "Request" resource collection, you cannot access "manage
 properties" of this collection... I could only add the dynamic property for
 request object through Launch -&gt; Personalization. But showing the page s
till does not work. The pag
e is still not displayed. The Default.jsp contains exactly the same line you
 posted before. Also the page display rule is exactly the same. The page sim
ply does not display. Are the any means to see why it does so?





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:28 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register