Hi Peter, please add a '[tobago]' to the subject of tobago issues.
try adding a change facet to the selectOneChoice and ommit the onchange attribute: <tc:selectOneChoice valueChangeListener="#{mybean.processValueChange}" > <f:selectItems value="#{mybean.featureValue_1}" /> <f:facet name="change"> <tc:command /> </f:facet> </tc:selectOneChoice> this is new since 05. Aug. see http://issues.apache.org/jira/browse/TOBAGO-109?page=all @bernd: have we any docu for this feature? alternativly you can use tobagos submit function "Tobago.submitAction('actionId')" to submit the form. 'actionId' must be a valid id of a UIComponent e.g. of the selectOneChoice itself! Regards, Volker 2006/10/6, Gerald Müllan <[EMAIL PROTECTED]>:
Please post your jsp with the value setted to the bean and the corresponding bean code. If the former choosen value is resetted to the first entry in the list, the binding of the value to the model doesn`t work. On 10/6/06, Peter Rabing <[EMAIL PROTECTED]> wrote: > Hi, > > I do get a response, the page is rendered again with the same combo, any values I selected are resetted to the first entry in the list. > > I tried setting an initial value, but this doesn't make any difference. > > I've added a Phase Listener and debugged through it to see in which order the phases occur: > > 1. RESTORE_VIEW > 2. APPLY_REQUEST_VALUES > 3. RENDER_RESPONSE > > I don't know how that is possible, I would have expected a "Process Validation" phase after which me listener should be called. > > Any ideas ? > > Thanks, > > Peter > > > Hi, > > > > have you put any message/messages-tag into the page, to see if there > > comes some message from the jsf environment? > > > > Also set the "value" attribute of selectOneChoice to a value in the > > managed bean., like "Nabe_Name" or "Kette_Name". Maybe thats the > > problem. > > > > cheers, > > > > Gerald > > > > > Hi, > > > > > > "submit() " or "submit();" makes no difference, the form is submitted when a value in the combo is > > > selected, sorry that I wasn't clear on this in my first post. > > > > > > My Bean does implement > > > > > > public void processValueChange(javax.faces.event.ValueChangeEvent valueChangeEvent) { > > > > > > log.fine("*************\n**********\nreceived value change event "+valueChangeEvent); > > > > > > throw new IllegalStateException("************ This can't be true **********"); > > > } > > > > > > And the form is rendered in the HTML, too. > > > > > > The bean is called to retrieve the values of the combo: > > > > > > public SelectItem[] getFeatureValue_1() { > > > SelectItem [] items = new SelectItem [2]; > > > > > > items[0] = new SelectItem( "Nabe_Name", "Nabenschaltung", "a desc"); > > > items[1] = new SelectItem( "Kette_Name", "Kettenschaltung", "a desc"); > > > > > > return items; > > > } > > > > > > The whole page is fairly stripped down now, but it still doesn' work: > > > > > > <f:view > > > > <tc:page label="Page Title" id="page" > > > > <tc:panel> > > > <f:facet name="layout"> > > > <tc:gridLayout border="0" rows="20px;fixed;*" /> > > > </f:facet> > > > > > > <tc:out escape="false" value="Statisch" /> > > > > > > <tc:selectOneChoice valueChangeListener="#{mybean.processValueChange}" onchange="submit();" value=""> > > > <f:selectItems value="#{mybean.featureValue_1}" /> > > > </tc:selectOneChoice> > > > > > > </tc:panel> > > > </tc:page> > > > </f:view> > > > > > > > > > Any other ideas ? > > > > > > Thank you very much, > > > > > > Peter > > > > > > > > > > > Does your bean implement the method public void > > > > processValueChange(javax.faces.event.ValueChangeEvent event) {...} ? > > > > > > > > and > > > > > > > > Is the form rendered in the HTML output ? May be missing <h:form> ? > > > > > > > > regards > > > > > > > > Marco > > > > > > > > -- > > > > http://www.lenses-price-comparison.com > > > > http://www.perfume-price-comparison.com > > > > > > > > > > > > > > > > Peter Rabing schrieb: > > > > > Hi, > > > > > > > > > > I am trying to install a changelistener on a combo box. But unfortunately, nothing happens, no listener is called. > > > > > The box is rendered correctly, and has the correct values on click it is submitted, but the listener is never called and no exception occurs: > > > > > > > > > > <tc:selectOneChoice valueChangeListener="#{mybean.processValueChange}" onchange="submit() "> > > > > > <f:selectItems value="#{mybean.featureValue_1}" /> > > > > > </tc:selectOneChoice> > > > > > > > > > > My Bean implements the ValueChangeListener interface. > > > > > > > > > > I guess I am missing something essential here .. > > > > > > > > > > Thanks for your help. > > > > > > > > > > Peter > > > > > > > -- > GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist! > NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces