Results 1 to 2 of 2
  1. #1
    72dolfan is offline Member
    Join Date
    Mar 2008
    Posts
    2
    Rep Power
    0

    Default Trying to get my Java Bean to access a parm that I'm passing via a jsp?

    Hi All,

    I'm trying to pass a parm to my java bean to tell it what environment I'm going after. If the user clicks the view history button for test, I want to pass a parm name of historyEnv with a value of TST. I have it set up in the JSP to do that. In the java bean, I have

    private String historyEnv;

    public String getHistoryEnv()
    {
    return historyEnv;
    }

    public void setHistoryEnv(String historyEnv)
    {
    this.historyEnv = historyEnv;
    }

    The I code the following to see if the value is passed and accessable;

    String envChk = historyEnv;
    System.out.println("HistoryEnv = " + envChk);

    Here's my jsp;

    <hx:commandExButton type="submit" value="VIEW HISTORY - SPECIAL"
    styleClass="continuebutton"
    action="#{requestType.histRequestType}" immediate="true"
    id="btnHistSpec" rendered="#{requestType.view}">
    <f:param name="historyEnv" value="TST"></f:param>
    </hx:commandExButton>

    requestType points to my bean, and histRequestType is the method where I try to display the env value.

    It shows up as null. Any ideas what I need to do to be able to access the value passed?

    Thanks,
    Bill

  2. #2
    72dolfan is offline Member
    Join Date
    Mar 2008
    Posts
    2
    Rep Power
    0

    Default

    Is there a JAVA forum out there where your questions do get answered?

Similar Threads

  1. Replies: 0
    Last Post: 03-30-2008, 10:03 AM
  2. Passing objects in Java
    By jbostjr in forum New To Java
    Replies: 1
    Last Post: 10-30-2007, 10:15 PM
  3. Passing objects in Java
    By jbostjr in forum Advanced Java
    Replies: 1
    Last Post: 10-30-2007, 05:57 PM
  4. Replies: 0
    Last Post: 09-26-2007, 08:36 PM
  5. xml to java bean
    By Peter in forum XML
    Replies: 2
    Last Post: 07-04-2007, 01:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •