A simpler solution would be to use the spring delegating variable
resolver and refer directly to the spring bean instead.

Afaik there is no native way to lookup java 5 enums in jsf 1.1 (or for
that matter in jsf 1.2 either-without the custom el resolver).



________________________________

From: Baker,Jonathan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 August 2006 5:53 AM
To: user@shale.apache.org; users@myfaces.apache.org
Subject: Injecting Java 5 Enums into a managed bean



I am trying to inject an instance of an enumeration class into one of my
ViewControllers.  Spring has the capability to define a PropertyEditor
so that you can pass Strings as values to beans, and the PropertyEditor
will convert to the correct object, but I do not seee a way to
accomplish the same thing in my faces-config.xml.  When I tried to
define my ViewController in my spring applicationContext.xml file jsf
couldn't find it. 

I did some research and it looks like if you are using jsf 1.2 you can
define a el-resolver that can use a special EnumManagedBean class to
expose enumerations to your jsp, and I assume that the ELResolver would
work on the faces-config file as well, but we are using myfaces with
Shale, and it only implements the jsf 1.1 spec.  Is there an equivalent
to the el-resolver tag in jsf 1.1?



JB



This correspondence is for the named persons only.
It may contain confidential or privileged information or both.
No confidentiality or privilege is waived or lost by any mis transmission.
If you receive this correspondence in error please delete it from your system 
immediately and notify the sender.
You must not disclose, copy or relay on any part of this correspondence, if you 
are not the intended recipient.
Any opinions expressed in this message are those of the individual sender 
except where the sender expressly,
and with the authority, states them to be the opinions of the Department of 
Emergency Services, Queensland.

Reply via email to