Doesn't request scoping of JSF kind of go against the standard page scoping
of JSTL.

What do you mean this should be done in Java?

Shawn

-----Original Message-----
From: [EMAIL PROTECTED]
To: MyFaces Discussion
Sent: 1/15/2006 6:29 PM
Subject: Re: commandLink

On 1/15/06, Garner, Shawn < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

I put <h:outputText value="foo"/> inside the commandLinks and I got
links
that all said foo.
I don't get why it won't find my page variable.
How can I get it to resolve my variables when they are just defined in 
standard jsp like

<% String myText = "foo" %>

<h:commandLink action="success"><h:outputText
value="#{myText}"/></h:commandLink>

How do I get this to work? 


EL expressions look at request/session/application scope attributes, not
at local variables.  So the following scriptlet would do what you're
asking for (of course, this sort of thing should really be done in Java
code, not in scriptlets, but ...) 

    <% request.setAttribute("myText", "foo"); %>




Shawn


Craig



**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

Reply via email to