[jboss-user] [JBoss Seam] - Localselector in repeater
face4web
do-not-reply at jboss.com
Tue Feb 20 06:39:37 EST 2007
Hi,
In most samples on the internet people uses the selectonemenu to select a local. But we want to select a locale using an arraylist of strings.
Action:
public ArrayList<String> getLanguages(){
| ArrayList<String> items = new ArrayList<String>();
| for(SelectItem s : LocaleSelector.instance().getSupportedLocales())
| items.add((String) s.getValue());
|
| return items;
| }
|
| public void setLanguage(ActionEvent ae){
| UIComponent tmpComponent = ae.getComponent();
| LocaleSelector.instance().selectLanguage(tmpComponent.getId());
| }
|
|
xHtml:
<ui:repeat value="#{languagesAction.languages}" var="language">
| <s:link value="#{language}" actionListener="#{languagesAction.setLanguage}" />
| </ui:repeat>
We can't set an ID dynamically (valuebinding 'problem'), using the f:param didn't work.
Who can help us?
Kind Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019291#4019291
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019291
More information about the jboss-user
mailing list