[jboss-user] [JBoss Seam] - Evaluation of action attibute in s:link

wise_guybg do-not-reply at jboss.com
Thu Jul 19 04:39:03 EDT 2007


I have a problem with evaluating a value to pass to localeSelector.selectLanguage(). Here is the example:

  |             <ui:repeat var="locale" value="#{localeSelector.supportedLocales}">
  |                 <h:outputText value="#{locale.label}"
  |                               rendered="#{localeSelector.locale.toString().equals(locale.value)}"/>
  |                 <s:link value="#{locale.label}"
  |                         action="#{localeSelector.selectLanguage('${locale.value}')}"
  |                         rendered="#{not localeSelector.locale.toString().equals(locale.value)}"/>
  |             </ui:repeat>

The problem is that the generated link looks like this:
anonymous wrote : http://localhost:8080/AuthWebApp/noauth/login.seam?cid=1&actionMethod=noauth%2Flogin.xhtml%3AlocaleSelector.selectLanguage%28%27%24%7Blocale.value%7D%27%29

The javadoc of selectLanguage() says :
anonymous wrote : 
  | Set the language and force resource bundle reload, useful for quick action links:
  | <h:commandLink value="DE" action="#{localeSelector.selectLanguage('de')}"/>

My question is how can I pass the language string with the expression language by evaluating locale.value?

PS Hope this isn't a very stupid question. I have searched on the internet but couldn't find an answer. The evaluation for MethodBinding looks fishy...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065675#4065675

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065675

More information about the jboss-user mailing list