It 'should' work somewhen. But I fear we did not yet implement it.
At least not intentionally ;)

Passing this via EL-2.2 parameters might be possible, but I'm not yet sure if I 
would like that from a performance perspective.

LieGrue,
strub




________________________________
From: Thomas Herzog <[email protected]>
To: [email protected] 
Sent: Friday, 5 July 2013, 15:32
Subject: AW: Access Resourcebundles from xhtml


i guess this should work via @Named("myMessageBean") on the interface.
I think that at startup a cdi bean is created form the interface, but I am not 
sure.

Mit freundlichen Grüßen

Thomas Herzog
Softwareentwicklung

curecomp Software Services GmbH
Hafenstrasse 47-51
4020 Linz

web: www.curecomp.com
e-Mail: [email protected]
tel: +43 (0)732 9015-5563
mobile: +43 (0)664 8867 9829




-----Ursprüngliche Nachricht-----
Von: Martijn Hiemstra [mailto:[email protected]] 
Gesendet: Freitag, 05. Juli 2013 15:27
An: [email protected]
Betreff: Access Resourcebundles from xhtml

I have a question about deltaspike. I want to remove all calls to <f:loadBundle 
/> in my xhtml pages.

I have defined a message resolver and I have defined a MessageBundle interface 
called MyMessageBundle and added the @MessageBundle annotation.
This works great when calling MyMessageBundle from a managedbean using 
injection however how can I access the resource bundle from a xhtml page?
Can I give MyResourceBundle a name so that in my xhtml file I can say 
#{myResourceBundle.getUserFirstNameLabel}

It would be nice if with deltaspike all hardcoded references to resourcebundle 
are removed from faces-config.xml and when you add a new resource bundle all 
you need to do is add a new resourcebundle interface and then you can use that 
resource bundle in your xhtml file.

For example:

@ResourceBundle("lang")
MyResourceBundle

And in the xhtml like this:

<h:outputText value="#{lang.getUserFirstNameLabel]}" />

Met vriendelijke groet,
Martijn Hiemstra
Java Software Engineer

Regas B.V.
Pelmolenlaan 18a
3447 GW Woerden

Reply via email to