Hi, adding the partialTriggers to the enclosing form does not change the behavior. And I have tried another control tr:selectOneRadio, it shows the same faulty behavior regarding the disabled attribute.
Just for the record (I forgot to add the versions in the original post), I am running: Trinidad 2.0.0 GlassFish 3.1 Mojarra 2.1.0 (FCS 2.1.0-b11) Regards, Detlef Grittner ----- Ursprüngliche Mail ----- > Von: "Walter Mourão" <[email protected]> > An: "MyFaces Discussion" <[email protected]> > Gesendet: Mittwoch, 15. Juni 2011 16:38:20 > Betreff: Re: [Trinidad] disabled attribute and form submit does not work > correctly > Hi, > I'm not sure if it relates with your situation, but every time I > change the > disable/rendered of a component using PPR, I add partialTriggers to > the > enclosing component. In your case I would add > partialTriggers="selection" to > the tr:form. > > Regards, > > Walter Mourão > http://waltermourao.com.br > http://arcadian.com.br > http://oriens.com.br > > > > On Wed, Jun 15, 2011 at 11:23 AM, Detlef Grittner > <[email protected] > > wrote: > > > I am loading a page with a tr:inputNumberSpinbox component, whose > > disabled > > attribute is intially set to true. > > With a tr:selectOneRadio I trigger the disabled flag and the value 1 > > will > > set it to false. > > This is done with PPR and autoSubmit in the tr:selectOneRadio. > > > > This part of xhtml page on the server side looks like this: > > > > <tr:form id="MainForm" usesUpload="true"> > > <tr:selectOneRadio id="selection" > > value="#{backingBean.selection}" > > layout="horizontal" autoSubmit="true"> > > <f:selectItem id="item1" itemLabel="And" > > itemValue="0" /> > > <f:selectItem id="item2" itemLabel="Or" itemValue="1" > > /> > > </tr:selectOneRadio> > > <tr:inputNumberSpinbox id="SpinThreshold" > > disabled="#{backingBean.selection == 0}" partialTriggers="selection" > > label="#{msgs.threshold}" minimum="1" maximum="10" > > value="#{BackingBean.threshold}" /> > > <tr:commandButton id="uploadButton" > > text="#{msgs.startSearch}" > > action="#{backingBean.action}" /> > > </tr:form> > > > > 1. When the value of backingBean.selection is 0 on first > > initialization, > > then the spin box is disabled and on pressing the "Or" Radio Button > > the > > following happens: > > The tr:inputNumberSpinBox on the client is correctly set to enabled > > by > > removing the disabled attribute from the HTML and the control can > > get the > > input focus. > > But the value of the spin control is never send back to the server, > > i.e. > > backingBean.threshold always stays 1, regardiccdless of the value > > one sets > > in the UI. > > > > 2. When the value of backingBean.selection is 1 on first > > initialization, > > then the spin box is enabled at first. > > Now one can change the value of tr:inputNumberSpinBox and the value > > of > > backingBean.selection changes accordingly. > > When the "And" button is pressed the disabled flag is included for > > tr:inputNumberSpinBox in the HTML code and the values are no longer > > passed > > to backingBean.threshold. > > On pressing the "Or" button the tr:inputNumberSpinBox is enabled > > again and > > passes the values to backingBean.threshold. > > > > That is only the 1st case is not working. I assume that this is a > > bug? Or > > am I overlooking something here? > > > > > > > > > >

