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...