This content has been marked as final.
Show 3 replies
-
1. Re: tabPanel switchType="ajax" and selectOneMenu issue
jaykob Jun 21, 2011 9:36 AM (in response to jaykob)OK, similar problem with switchType="client".
SelectOneMenu with int or String works, with Classes not.
<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:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <f:view contentType="text/html"> <h:head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <ui:insert name="head"></ui:insert> <style type="text/css"> </style> </h:head> <h:body> <h:form> <a4j:commandButton value="Test update" action="#{test.update}" /> </h:form> This works: <rich:tabPanel switchType="client"> <rich:tab header="1st"> </rich:tab> <rich:tab header="2nd"> <h:form> <h:selectOneMenu> <f:selectItems value="#{test.intList}" /> </h:selectOneMenu> <a4j:commandButton value="Save" action="#{test.update}" /> </h:form> </rich:tab> <rich:tab header="3rd"> </rich:tab> </rich:tabPanel> This not: <rich:tabPanel switchType="client"> <rich:tab header="1st"> </rich:tab> <rich:tab header="2nd"> <h:form> <h:selectOneMenu> <f:selectItems value="#{test.classList}" /> </h:selectOneMenu> <a4j:commandButton value="Save" action="#{test.update}" /> </h:form> </rich:tab> <rich:tab header="3rd"> </rich:tab> </rich:tabPanel> </h:body> </f:view> </html>
import java.util.ArrayList; import java.util.List; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @Component("test") @Scope("session") public class Test { public List<Integer> getIntList() { List<Integer> ret = new ArrayList<Integer>(); ret.add(1); ret.add(2); return ret; } public List<TestBean> getClassList() { List<TestBean> ret = new ArrayList<TestBean>(); ret.add(new TestBean()); ret.add(new TestBean()); return ret; } public void update() { System.out.println("update"); } public class TestBean { } }
-
2. Re: tabPanel switchType="ajax" and selectOneMenu issue
jaykob Jun 24, 2011 4:07 AM (in response to jaykob)Sorry, it's me again....
can anybody confirm this behaviour or is it just my problem?
Ciao,
Jakob
-
3. Re: tabPanel switchType="ajax" and selectOneMenu issue
jaykob Jun 24, 2011 7:54 AM (in response to jaykob)I was able to resolve this problem by replacing mojarra with myfaces...