Hi Rob,
I want to do it because my application is composed of several portlets.
If you click on one customer, for ex. you will want
other portlets to show information relative to the customer you have
just clicked.
This is why you will need shared-parameters. That is inside portlet 2.0
spec.
The other way to do it is with events. But this is not mature enough.
El jue, 13-08-2009 a las 22:01 +0200, Rob Sonke escribió:
> Could you maybe explain why you need it? Do you want to pass data inside
> your portlet or to another portlet?
>
> Rob
>
> On 8/13/09 1:43 PM, Gonzalo Aguilar Delgado wrote:
> > Hi all!,
> >
> > I have some questions about parameter passing in portal environment. I
> > saw that WebPage class can have access to the Application class
> > but not the portlet class. This makes a little tricky to handle requests
> > because:
> >
> > We can set session paramaters. And can call functions inside Application
> > (WicketExamplesMenuApplication.getExamples()).
> >
> > @Override
> > public void onClick()
> > {
> > int index = ((LoopItem)getParent()).getIteration();
> > ExampleApplication ea =
> > WicketExamplesMenuApplication.getExamples().get(
> > index + 1);
> > PortletSession session =
> > ((PortletRequestContext)RequestContext.get()).getPortletRequest()
> > .getPortletSession();
> >
> > session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
> > ea);
> > }
> >
> > But it will be the portlet class the responsible for handling
> > processing. So the only way to pass information from the onClick
> > function to the
> > portlet application for rendering (for example) is using the portlet
> > session.
> >
> > But I suppose that's not the preferred way.
> >
> >
> > What's the best way to pass information to the portlet class? Is there
> > any way to use the portlet class like we use the application class
> > (WicketExamplesMenuApplication.getExamples() ->
> > WicketExamplesMenuPortlet.getExamples())
> >
> >
> > I also saw that in the portlet example, the examples structure is
> > initialized by the WicketExamplesMenuPortlet and sent to the
> > WicketExamplesMenuApplication using the servlet context. But this will
> > overbloat the servlet attributes storage space. Also this should be
> > solved if webpages could access to the portlet class directly.
> >
> > Why to do this way?
> >
> >
> >
> > I want to know all this because I want to use shared render parameters
> > (I put there a user id and all the portlets update accordingly). To do
> > this I will do:
> >
> >
> >
> > 1.- Onclick: Put the Id on the session like above.
> > 2.- Portlet.DoView: Recover id from session and store it in
> > shared render params.
> > 3.- Delete it from session.
> >
> >
> > Is this the correct way to do it?
> >
> >
> > Thank you very much in advance...
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]