Results 1 to 2 of 2
- 03-06-2008, 02:56 PM #1
Member
- Join Date
- Mar 2008
- Posts
- 2
- Rep Power
- 0
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
- 03-13-2008, 02:36 PM #2
Member
- Join Date
- Mar 2008
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
How to use Inner bean definitions via nested bean elements
By Java Tip in forum Java TipReplies: 0Last Post: 03-30-2008, 10:03 AM -
Passing objects in Java
By jbostjr in forum New To JavaReplies: 1Last Post: 10-30-2007, 10:15 PM -
Passing objects in Java
By jbostjr in forum Advanced JavaReplies: 1Last Post: 10-30-2007, 05:57 PM -
How to use Inner bean definitions via nested bean elements
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:36 PM -
xml to java bean
By Peter in forum XMLReplies: 2Last Post: 07-04-2007, 01:39 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks