Announcement Announcement Module
Collapse
No announcement yet.
Send and process parameter before render view Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Send and process parameter before render view

    Hi
    I am looking for a way to send an parameter to portlet and process it before i show the view.
    Something like
    http://www.blabla.com/portlet?paramTest=testing

    and then something like

    protected Map referenceData(final PortletRequest request, final Object command, final Errors errors) throws Exception {

    String test = request.getParameter("paramTest");

    //do something before showing the view

    but i always get null and cant seem to find a way to find the parame im sending.

    Cheers
    Prinsinn

  • #2
    It is tricky/impossible to hand-create URLs for Portlets. Most Portal platforms do a lot of mangling of get parameters destined for Portlets -- which is in line with the JSR-168 spec. In order to create a URL with a parameter for a portlet, you must do this within the Portlet itself. You can do this with the createActionURL and createRenderURL methods of the RenderResponse, or with the actionURL, renderURL, and param tags from the Portlet Tag Library for use in JSP pages.

    Comment

    Working...
    X