Portlet Window State
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 > Portlet Window State




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Portlet Window State  
Carsten Blieske


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


 
02-09-05 10:58 PM

Hi,

we've recently changed to Portal 5.1 and I've got the problem to push a
portlet into a certain state (e.g. Maximized).
In the older version I did a Tracker.pushPortletState(), but that does not
exist anymore.

Thanks for your solutions
Carsten







[ Post a follow-up to this message ]



    Re: Portlet Window State  
Maik Weber


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


 
02-09-05 10:58 PM

Hello Carsten,

can you describe the overall scenario? Ususally, a portlet can define
its state in a portlet uri. When you click on the link, the portlet will
change its state.

The Tracker was internal API, so it's gone ... The same old story :-)

Maik


Carsten Blieske wrote:
> Hi,
>
> we've recently changed to Portal 5.1 and I've got the problem to push a
> portlet into a certain state (e.g. Maximized).
> In the older version I did a Tracker.pushPortletState(), but that does not
> exist anymore.
>
> Thanks for your solutions
> Carsten
>
>





[ Post a follow-up to this message ]



    Re: Portlet Window State  
Carsten Blieske


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


 
02-10-05 07:48 AM

The scenario is that I' would like to change the Portlet State, from within
the code.
It is like the PortletSelector from one of the first Portal versions. So if
you click on a link,
one portlet has to maximize and all others have to minimize.

Thank you for the reply
Carsten


"Maik Weber" <maikweber@de.ibm.com> schrieb im Newsbeitrag
news:cudrq1$309q$1@news.boulder.ibm.com...[vbcol=seagreen]
> Hello Carsten,
>
> can you describe the overall scenario? Ususally, a portlet can define
> its state in a portlet uri. When you click on the link, the portlet will
> change its state.
>
> The Tracker was internal API, so it's gone ... The same old story :-)
>
> Maik
>
>
> Carsten Blieske wrote: 







[ Post a follow-up to this message ]



    Re: Portlet Window State  
Maik Weber


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


 
02-10-05 12:51 PM

I don't know which APIs you are using. However, in the legacy IBM
Portlet API, you would do something like this:

PortletURI uri = portletResponse.createURI(PortletWindow.State.MAXIMIZED);

uri.toString(); // -> gives the link inside markup

In the new JSR168 API you would do:

PortletURL url = renderResponse.createRenderURL();
url.setWindowState(WindowState.MAXIMIZED);
url.toString(); // -> give the link inside markup

Maik



Carsten Blieske wrote:
> The scenario is that I' would like to change the Portlet State, from withi
n
> the code.
> It is like the PortletSelector from one of the first Portal versions. So i
f
> you click on a link,
> one portlet has to maximize and all others have to minimize.
>
> Thank you for the reply
> Carsten
>
>
> "Maik Weber" <maikweber@de.ibm.com> schrieb im Newsbeitrag
> news:cudrq1$309q$1@news.boulder.ibm.com...
> 
>
>
>





[ Post a follow-up to this message ]



    Re: Portlet Window State  
Carsten Blieske


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


 
02-10-05 12:51 PM

Hi Maik,

thanks for your help, but I considered a different Problem and maybe you can
help me with it.
In the earlier version (eg 5.0) we did the following to add an action, but
that doesn't work anymore with P5.1

PortletURI uri = response.createReturnURI();
uri.addAction();

Greetings Carsten


"Maik Weber" <> schrieb im Newsbeitrag
news:cuf9e9$ev8$1@news.boulder.ibm.com...[vbcol=seagreen]
>I don't know which APIs you are using. However, in the legacy IBM Portlet
>API, you would do something like this:
>
> PortletURI uri = portletResponse.createURI(PortletWindow.State.MAXIMIZED);
>
> uri.toString(); // -> gives the link inside markup
>
> In the new JSR168 API you would do:
>
> PortletURL url = renderResponse.createRenderURL();
> url.setWindowState(WindowState.MAXIMIZED);
> url.toString(); // -> give the link inside markup
>
> Maik
>
>
>
> Carsten Blieske wrote: 






[ Post a follow-up to this message ]



    Re: Portlet Window State  
Maik Weber


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


 
02-10-05 10:59 PM

Hi Carsten,

this should work:

PortletURI uri = response.createReturnURI();
uri.addAction("myAction");

In actionPerformed you just can check for the action-String:

if (actionEvent.getActionString().equals("myAction") {
.. do something ...
}


In JSR168 you would use

PortletURL url = renderResponse.createActionURL();
url.setParameter("action", "myAction");

In the processAction method you would check for the parameter:
if ( actionResponse.getParameter("action").equals("myAction") ) {
.. do something ...
}


Maik

Carsten Blieske wrote:
> Hi Maik,
>
> thanks for your help, but I considered a different Problem and maybe you c
an
> help me with it.
> In the earlier version (eg 5.0) we did the following to add an action, but
> that doesn't work anymore with P5.1
>
> PortletURI uri = response.createReturnURI();
> uri.addAction();
>
> Greetings Carsten
>
>
> "Maik Weber" <> schrieb im Newsbeitrag
> news:cuf9e9$ev8$1@news.boulder.ibm.com...
> 
>





[ Post a follow-up to this message ]



    Re: Portlet Window State  
Carsten Blieske


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


 
02-10-05 10:59 PM

Thanks,
(again it's me :-))
but this time it worked, I made some fault, because I first did

org.apache.jetspeed.portlet.PortletAction myAction = new
DefaultPortletAction("myAction");

what did not work in my case.
Hope that it may help other people as well :-) sometimes it is to close to
see the solution.

Carsten


"Maik Weber" <maikweber@de.ibm.com> schrieb im Newsbeitrag
news:cufqtm$3a7c$1@news.boulder.ibm.com...[vbcol=seagreen]
> Hi Carsten,
>
> this should work:
>
> PortletURI uri = response.createReturnURI();
> uri.addAction("myAction");
>
> In actionPerformed you just can check for the action-String:
>
> if (actionEvent.getActionString().equals("myAction") {
>  ... do something ...
> }
>
>
> In JSR168 you would use
>
> PortletURL url = renderResponse.createActionURL();
> url.setParameter("action", "myAction");
>
> In the processAction method you would check for the parameter:
> if ( actionResponse.getParameter("action").equals("myAction") ) {
>  ... do something ...
> }
>
>
> Maik
>
> Carsten Blieske wrote: 







[ Post a follow-up to this message ]



    Re: Portlet Window State  
Carsten Blieske


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


 
02-10-05 10:59 PM

Hi,
I've got a different Question to the Portlet Window State, because I guess
there is a missunderstanding, because I didn't describe the entire scenario.
I've more than one portlet on a side and I already know ObjectIDs, nodes,
controlcomps and so on, and I want to change the window state of a different
portlet on the side and not the state of the portlet I'm currently using.

Greetings Carsten

"Carsten Blieske" <cb@ewetel.de> schrieb im Newsbeitrag
news:cufur3$2kt4$1@news.boulder.ibm.com...
> Thanks,
> (again it's me :-))
> but this time it worked, I made some fault, because I first did
>
> org.apache.jetspeed.portlet.PortletAction myAction = new
> DefaultPortletAction("myAction");
>
> what did not work in my case.
> Hope that it may help other people as well :-) sometimes it is to close to
> see the solution.
>
> Carsten
>
>
> "Maik Weber" <maikweber@de.ibm.com> schrieb im Newsbeitrag
> news:cufqtm$3a7c$1@news.boulder.ibm.com... 
>
>







[ Post a follow-up to this message ]



    Re: Portlet Window State  
Maik Weber


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


 
02-10-05 10:59 PM

DefaultPortletAction was deprecated and is not supported in WPv5.1
anymore. You have to use ActionStrings or Parameters now. Usage of
the back-button is one reason for this design-change ...

Maik

Carsten Blieske wrote:
> Thanks,
> (again it's me :-))
> but this time it worked, I made some fault, because I first did
>
> org.apache.jetspeed.portlet.PortletAction myAction = new
> DefaultPortletAction("myAction");
>
> what did not work in my case.
> Hope that it may help other people as well :-) sometimes it is to close to
> see the solution.
>
> Carsten
>
>
> "Maik Weber" <maikweber@de.ibm.com> schrieb im Newsbeitrag
> news:cufqtm$3a7c$1@news.boulder.ibm.com...
> 
>
>





[ Post a follow-up to this message ]



    Re: Portlet Window State  
Carsten Blieske


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


 
02-11-05 01:00 PM

Hi Maik,

that's a quite nice possibilty, but doesn't fit to good in our scenario.
So I'll give you some more information, maybe you have another different
idea - I know I'm quite difficult with this problem :-)
We have more than one portlet on a page and I'd like to change the window
state of a different portlet in the moment an action appears, so my problem
is, that I don't have necessarily an url. Maybe the user clicks somewhere
(eg in an "Mailclientportlet") and in that Moment I want to maximize an
("Adressbookportlet"). Or the even worse case I want to minimize more than
one portlet and normalize (maximize) another one.
So it would be esaier for me to do it with internal API like before with the
Tracker.

Greetings and a nice weekend
Carsten

"Maik Weber" <maikweber@de.ibm.com> schrieb im Newsbeitrag
news:cui8qk$3erc$2@news.boulder.ibm.com...[vbcol=seagreen]
> Okay, I see. You are right, describing the overall scenario helps a lot
> :-)
>
> You have to use the urlGeneration Tag for this. Here an example taken from
> the Infocenter:
>
> <wps:urlGeneration contentNode="wps.My Portal.Welcome"
> layoutNode="welcome.bookmarks" portletWindowState="Maximized">
>
>   <wps:urlParam name="<%= month %>" value="August" type="render" />
>   <wps:urlParam name="<%= day %>"   value="Monday"  type="render" />
>   <wps:urlParam name="<%= amount %>" value="<%= ACCOUNT_BALANCE %>"
> type="render" />
>
>   <a href="<% wpsURL.write(out); %>" class="wpsLinkBarLink">
>      <wps:text key="link.bookmarkstitle" bundle="nls.myproperties"/>
>   </a>
> </wps:urlGeneration>
>
> For a detail description of all attributes, have a look in the Infocenter:
>
> [url]http://publib.boulder.ibm.com/pvc/wp/510/ent/en/InfoCenter/wps/dgn_link.html[/ur
l]
>
> Maik
>
>
> Carsten Blieske wrote: 






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:41 PM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   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