debug statement says it has updated the content of the component, but the options are still the old ones. I also ran the app on debug, and set a breakpoint within the renderComponent() method in the PropertySelection class. It seems it still grabs the old value of the model, even after I updated it. I also tried with other bindings, such as "disabled", and it doesn't work either. The only binding I can see updated is the "value" binding. Also tried with a surrounding div, still no success.
Is there a chance this would work better with the Select/Option components? Didn't try those (I never used them actually). My app really needs to update the full content of a dropdown list depending on some other selections. I used to achieve this with XTile components, and that worked like a charm, but required quite a lot of javascript plumbing. 2006/9/13, Jesse Kuhnert <[EMAIL PROTECTED]>:
It should work, I ~think~...What kind of response do you get from the server ? (via the dojo debug statements or FireBug ? ) On 9/13/06, Christian Dutaret <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am trying to change the content of a dropdown list when some event > occur. > I am using PropertySelection to render the dropdown list. I assumed that > my > listener could change the component's PropertySelectionModel, and that > updateComponent would render the updated content, but this doesn't work. > Shouldn't the "model" binding be re-rendered when updateComponent is > called, > or am i doing something wrong? > I am using the latest 4.1.1 snapshot. > > Thx for any hint. > > My page class: > > public abstract void setModelB(IPropertySelectionModel value); > > @EventListener(targets="A", events="onchange", submitForm="form") > public void changeA(IRequestCycle cycle) { > this.setModelB(buildNewModelFromDb(a)); > cycle.getResponseBuilder().updateComponent("B"); > } > > My HTML template: > > <span jwcid="@Shell" title="Tapestry 4.1 test" browserLogLevel="DEBUG"> > <body jwcid="@Body"> > <form jwcid="[EMAIL PROTECTED]" success="listener:doNothing"> > <span jwcid="[EMAIL PROTECTED]" model="ognl:modelA" value="ognl:a"/> > <span jwcid="[EMAIL PROTECTED]" model="ognl:modelB" value="ognl:b"/> > <input type="submit" value="Go"/> > </form> > </body> > </span> > > Ch. > > -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com