View Single Post
  #1 (permalink)  
Old 03-06-2008, 03:56 PM
72dolfan 72dolfan is offline
Member
 
Join Date: Mar 2008
Posts: 2
72dolfan is on a distinguished road
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}">
<faram name="historyEnv" value="TST"></faram>
</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
Reply With Quote
Sponsored Links