[JBoss Seam] - localization messages access from Java code
by dnikolov
Hi,
I am trying to access a message defined in my messages_en.properties file from my backing Java code per the instructions in the Seam manual in the localization/internationalization section. I am doing something like this:
@In("#{messages['l.someDbTable.usexCol']}") private String ORIENTATION_USEX;
@In("#{messages['l.someDbTable.useyCol']}") private String ORIENTATION_USEY;
private final SelectItem[] ORIENTATION_ITEMS = new SelectItem[] {
new SelectItem(this.ORIENTATION_USEX),
new SelectItem(this.ORIENTATION_USEY)
};
Doing this results in a NullPointerException at the SelectItem array declaration. I am assuming I need to specify what messages is somewhere in an xml config file.
Note that I can refer to messages in my xhtml front end code as in: #{messages['l.someDbTable.useyCol']}
In my faces_config.xml I have this :
<message-bundle>messages/Models</message-bundle>
<message-bundle>messages</message-bundle>
<view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
but I am not sure how relevant this is. Can you provide a solution or a more detailed source on using localization in Seam? Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074913#4074913
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074913
18Â years, 11Â months
[JBossCache] - Cannot see nodes and attached map in JMX console
by billwangbill
I am a newbie for Jboss Treecache. I am going to put treecache into my
jboss server. the following are my config values for Eviction:
1000
0
0
I call the method putCacheData to save data in treecache in the first request( through Struts, Ejb3)
putCacheData() {
.....
tree.put("/classes/cs-101", "description", "the basics");
tree.put("/classes/cs-101", "teacher", "Ben");
....
}
I only can see node classes in JMX console and no /classes/cs-101 in tree.
and then I call getCacheData() method in another request
getCacheData() {
.....
String descValue = (String) tree.get("/classes/cs-101", "description"
String csValue = (String) tree.get("/classes/cs-101", "teacher");
....
}
both descValue and csValue are null in the debug mode
Could somebody help me? I need see what value put into tree in the different request even though different session with application scope variable. Thanks in advance.
Bill
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074911#4074911
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074911
18Â years, 11Â months
[JBoss jBPM] - radio control
by orochimaru19860000
Hello, I'm using jbpm , and I need your help about the radio control
Well I've added 2 radio buttons in a page
| <h:selectOneRadio name="Priority" value="Priority" style="font-weight: bold" >
| <f:selectItem itemLabel="Normal" itemValue="Normal" />
| <f:selectItem itemLabel="High" itemValue="High" />
| </h:selectOneRadio-->
and I want in function of the selected Item go to a certain task node, for this I've used a Decision with the condition on the item selected on the selectOneRadio, the problem is that I don't know what's the variable that I should use in the condition tag, I've wrote it in "****"
| <decision name="Decision1">
|
| <transition name="Normal" to="node4">
| <condition>#{"****" == 'Normal'}</condition>
| </transition>
|
| <transition name="High" to="customer notification">
| <condition>#{"****" == 'High'}</condition>
| </transition>
|
| </decision>
|
If any one can help I will be grateful.
Thank You
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074909#4074909
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074909
18Â years, 11Â months