On 9/25/06, JS Portal Support <[EMAIL PROTECTED]> wrote:
Thanks Hermod. So there is no way of doing this without configuring the
bean
as a backing bean? That explains why I couldn't find out how to do it ;-)
Basically, that is accurate. JSF expressions (just like JSP expressions) do
not support accessing static data values out of the box -- they only
support accessing properties of an instance.
It would be technically feasible to use JSF's extensible APIs to make this
kind of access possible -- for example, one could make the following
expression do what you want:
#{static['com.jsportal.projectportal.web.webActions.login']}
by creating custom VariableResolver and PropertyResolver implementations.
It's just not clear to me how compelling the use cases are for this sort of
thing yet.
Craig
Thanks,
Joost
JS Portal - Support
Dasstraat 21
2623CB Delft
the Netherlands
E: [EMAIL PROTECTED]
W: www.jsportal.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 25, 2006 1:27 PM
To: [email protected]
Subject: RE: How to reference a static value in JSF
Hi
If you look in the Shale samples, you will see that you need to configure
your backingbeans (what you refer to as "one of my classes") . Then you
reference them by their <name>.<property>. Note that if you have nested
properties, you need use the syntax <name>.<property>['neste_property']
Hermod
-----Original Message-----
From: JS Portal Support [mailto:[EMAIL PROTECTED]
Sent: Monday, September 25, 2006 1:20 PM
To: [email protected]
Subject: How to reference a static value in JSF
Hi,
Just started to implement Shale and JSF. As I've always worked more with
scriptlets and Servlets I can't seem to figure out how to reference a
public
static value from one of my classes in my JSP's. I've always used:
<input type="hidden" name="a"
value="<%=com.jsportal.projectportal.web.webActions.login%>"/>
Now I try to achieve this with the following:
<h:inputHidden id="a"
value="${com.jsportal.projectportal.web.webActions.login}"/>
I understand this doesn't work as it will try to call
com.getJsportal()....etc. But how do I do it, as the <%=%> is not allowed
in
these taglib tags?
Thanks,
Joost
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR
Group
cannot accept any payment orders or other legally binding correspondence
with
customers as a part of an email.
This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*