-
1. Re: Resource messages not displayed in JBoss Tools Visual Ed
maxandersen Jun 3, 2009 5:03 AM (in response to tdtappe)We have a current issue about maven projects in m2eclipse does not have complete metadata setup causing us in not knowing where the resource bundles are.
Does it work when you don't use maven ? -
2. Re: Resource messages not displayed in JBoss Tools Visual Ed
yradtsevich Jun 3, 2009 6:33 AM (in response to tdtappe)You can setup the metadata manually.
Open properties of your project->Java Build path->Source->Add Folder...->
select the path to your resources folder. This should help. -
3. Re: Resource messages not displayed in JBoss Tools Visual Ed
tdtappe Jun 4, 2009 8:18 AM (in response to tdtappe)src/main/resources (that's where my messages.properties resides) is already added as a source folder.
--Heiko -
4. Re: Resource messages not displayed in JBoss Tools Visual Ed
yradtsevich Jun 4, 2009 11:36 AM (in response to tdtappe)What is the content of your page?
Where is it located?
Does it use templates? -
5. Re: Resource messages not displayed in JBoss Tools Visual Ed
tdtappe Jun 5, 2009 4:02 AM (in response to tdtappe)Most of my pages are located in src/main/webapp/pages. But it doesn't work either for pages located in src/main/webapp.
And also most of the pages use a template located in src/main/webapp/layout. But pages without template-usage doesn't work either.
One simple page looks like this:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets"> <head> <title>#{messages['common.errorTitle']}</title> </head> <body> <h1>#{messages['common.errorHeader']}</h1> <span class="errors"> <h:messages id="messages" globalOnly="true"/> </span> </body> </html>
-
6. Re: Resource messages not displayed in JBoss Tools Visual Ed
mareshkau Jun 5, 2009 5:09 AM (in response to tdtappe)Are message bundles includes in page throw faces-config, seam-config file? Does open on functionality works throw source part?
-
7. Re: Resource messages not displayed in JBoss Tools Visual Ed
tdtappe Jun 5, 2009 7:27 AM (in response to tdtappe)I am not sure I understand what you mean. But I haven't got any messages-tag in my faces-config or anywhere else. Though I tried to explicitly name a resource bundle there to see if it is problem like that. But as you might guess without success.
-
8. Re: Resource messages not displayed in JBoss Tools Visual Ed
yradtsevich Jun 5, 2009 9:16 AM (in response to tdtappe)Try to add the following line right after the tag to your page:
<f:loadBundle basename="messages" var="messages" />
Does it work? -
9. Re: Resource messages not displayed in JBoss Tools Visual Ed
yradtsevich Jun 5, 2009 9:21 AM (in response to tdtappe)*after the tag
-
10. Re: Resource messages not displayed in JBoss Tools Visual Ed
yradtsevich Jun 5, 2009 9:23 AM (in response to tdtappe)*HTML. Cannot insert the angle brackets =)
-
11. Re: Resource messages not displayed in JBoss Tools Visual Ed
tdtappe Jun 5, 2009 9:41 AM (in response to tdtappe)YES! :-)
Can I leave it there (as a workaround) or are there any drawbacks?
Just out of curiosity: It should work without, right? -
12. Re: Resource messages not displayed in JBoss Tools Visual Ed
mareshkau Jun 5, 2009 11:43 AM (in response to tdtappe)No, the message resolution isn't works without message bundle definition.
-
13. Re: Resource messages not displayed in JBoss Tools Visual Ed
tdtappe Jun 5, 2009 12:45 PM (in response to tdtappe)But it works without at runtime.
-
14. Re: Resource messages not displayed in JBoss Tools Visual Ed
akazakov Jun 5, 2009 4:59 PM (in response to tdtappe)There is "messages" context variable in Seam which refers to messages.properties file by default.
So you don't have to use <f:loadBundle> or special settings in faces-config.xml to use resource bundles in Seam application. But it should work if you double it via <f:loadBundle>.
Our Visial Editor dosn't support this Seam component yet.
Please report it to JIRA as Feature Request if there is not such issue yet...