Request Param/JSF issues in portlets - Websphere

This is a discussion on Request Param/JSF issues in portlets - Websphere ; Any help on this is appreciated. I'm relatively new to both portlet development and JSF development. I'm trying to develop a simple master/detail interface and have implemented a datatable for browsing the data and another page for viewing the detailed ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Request Param/JSF issues in portlets

  1. Request Param/JSF issues in portlets

    Any help on this is appreciated. I'm relatively new to both portlet
    development and JSF development.

    I'm trying to develop a simple master/detail interface and have
    implemented a datatable for browsing the data and another page for
    viewing the detailed view of object referenced in a specific row. It
    seemed like the best way to go about this would be to pass a parameter
    in the link/button with the primary key of the selected record, load
    the detail view with the data from the database, then display the view.
    However I'm having a terrible time getting that parameter value to a
    place where the detail page can access it.

    Problem number 1: CommandButton.

    I can get a parameter into the parameter map using the command link...

    action="#{pc_DfView.doLink1Action}">
    utputText id="text2" value="#{varsearchResult.name}"
    styleClass="outputText">
    utputText>
    aram name="id" value="#{varsearchResult.id}">aram>
    aram name="viewMode" value="link">aram>


    .... which i know is successful because I am printing to system out in
    the actionlistener method. But I do not get the same results from the
    command button...

    styleClass="commandExButton" id="button5"
    action="#{pc_DfView.doButton5Action}">
    aram name="viewMode" value="edit">aram>
    aram name="id" value="#{varsearchResult.id}">aram>


    .... where both params show up as null when i try to print them to
    system out ...

    log("id req param: " + this.requestParam.get("id"));
    log("view req param: " + this.requestParam.get("viewMode"));

    I would much prefer, for usability reasons, to use the command buttons
    instead of the links. Any idea what's up here?

    Problem 2: Getting the Params to the next page

    Even when the params get to the action method, it's the action method
    on the datatable page, not the detail page. The detail page just shows
    null when I try to access it at #{param.id}.

    .... and even if I could get the value I'm not sure where I should do
    the processing of the id and the loading of the data. Where in the
    detail page backing bean, that is. I have a lot more experience with
    Struts and there isn't a any sort of "action class" in this world.

    My workaround right now is to put the detail page backing bean in the
    session scope and do the loading in the datatable page's backing bean
    before sending the user to the next navigational rule... but that
    strikes me as wasteful of memory and i'd like to define the parameter
    as a managed-bean property rather than do all the get/set in the
    parameter maps as I have seen described in other places.

    Any ideas?

    Thanks,

    Marc


  2. Re: Request Param/JSF issues in portlets

    > Problem 2: Getting the Params to the next page
    >
    > Even when the params get to the action method, it's the action method
    > on the datatable page, not the detail page. The detail page just shows
    > null when I try to access it at #{param.id}.
    >
    > ... and even if I could get the value I'm not sure where I should do
    > the processing of the id and the loading of the data. Where in the
    > detail page backing bean, that is. I have a lot more experience with
    > Struts and there isn't a any sort of "action class" in this world.
    >
    > My workaround right now is to put the detail page backing bean in the
    > session scope and do the loading in the datatable page's backing bean
    > before sending the user to the next navigational rule... but that
    > strikes me as wasteful of memory and i'd like to define the parameter
    > as a managed-bean property rather than do all the get/set in the
    > parameter maps as I have seen described in other places.
    >


    Ok, I've clearly been overthinking this. The answer here is to just
    link directly to the JSP, right? Seems to work.


+ Reply to Thread