Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - workaround

scott.stark@jboss.org

2007-07-23


OK, finally I came up with a workaround:

| <s:link value="#{localeProvider.getDisplayString(locale.value)}"
|  action="#{localeProvider.updateLocale()}"
|  rendered="#{not localeSelector.locale.toString().equals(locale.value)}">
|   <f:param name="l" value="#{locale.value}"/>
| </s:link>
|

The request parameter is processed by localeProvider.updateLocale():


| public void updateLocale() {
|      if (l != null && l.length() > 0) {
|         localeSelector.selectLanguage(l);
|      }
|   }
|



I'm still interested if someone has a comment on what to do with the action parameter of s:link and the fact that he is unable to include page variables i.e. the following code cannot be realized

| <s:link value="#{localeProvider.getDisplayString(locale.value)}"                
|  action="#{localeSelector.selectLanguage('#{locale.value}')}"
|  rendered="#{not localeSelector.locale.toString().equals(locale.value)}"/>
|

Note
The locale variable comes from:

| <ui:repeat var="locale" value="#{localeSelector.supportedLocales}">
|

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066544
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.