You can do this in 3 ways (if I understand your question correctly):
1) Create a new factory (or modify an existing one) that produces a
hidden field and initializes it w/ the value you want (after looking it
up the properties file, of course).
2) Create a new component. JSFTemplating provides very good support for
creating components. You make a simple template, a UIComponent (which
does nothing special in this case), and register it w/ the
faces-config.xml file.
3) Use the existing hidden field factory and pass in
#{resBundle.localizedText} to the value:
<sun:hidden value="#{resBundle.localizedText}" />
During the "initPage" event, or sometime similar, you should initialized
the requestScoped variable "resBundle" to the desired resource bundle.
And, of course, you can something in the beforeCreate as you suggested.
Ken
Senthil Chidambaram wrote:
> Can we write out own tag/component in jsftemplating. This is what I'm
> trying to do,
> <sun:localizedHelpFile>keyName</sun:localizedHelpFile>
>
> When this tag is rendered, I want to read the value for the keyName
> from the properties file, and render it as a value for the html type
> hidden.
>
> I'm just thinking, is the above approach better than calling
> beforeCreate in <sun:hidden>.
>
> thx
> Senthil