aspose file tools*
The moose likes JSF and the fly likes Flow being lost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Flow being lost" Watch "Flow being lost" New topic
Author

Flow being lost

Sean Hetfield
Ranch Hand

Joined: Dec 01, 2003
Posts: 83
I have set up three .jsp pages (input.jsp and output.jsp and error.jsp).

On the input.jsp I have a listbox � single select. When the submit button is clicked, based on the value chosen, input.jsp is directed to the correct page. In the submit button action handler, I have placed the following code:

Note: I changed the actual names of the classes and methods.

public String doButton1Action() {
SomeClass ilClass = new SomeClass();
java.lang.String ilString = getListbox1().getValue().toString(); //value of the listbox

if(ilString.equals("000"))
return "input"; //navigates to the correct page
else if(ilString.equals("111"))
{
if(ilString.equals(String.valueOf(ilClass.getAnAttribute())))
{
java.lang.String ilValue = ilClass.AssembleAReallyLongString();
requestScope.put("P", ilValue); //I�ve even tried to hard code a literal but that doesn�t work either
}
return "success"; //navigates to the correct page
}
else
return "fail"; //navigates to the correct page

}

In output.jsp, I�ve declared a requestScope scripting variable called P of type java.lang.String and bound it to an output control. The output.jsp output control�s format is String.

In input.jsp, I tried both ways by declaring and not declare a requestScope scripting variable called P.

With either case, the String will not display in the output.jsp control that I bound the requestScope scripting P to.

Am I going about this wrong? Would you have any suggestions?

Any help is appreciated.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
What is requestScope and where does it come from?

Anyway, it looks like a weird way to pass values from one to other page. What exactly do you want to achieve? Is the managed bean request or session scoped? Can you show some snippets of the relevant JSF code?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

"Metariya",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Flow being lost