The problem is this: when send an add new command I have this strange behavior:
the whole form is updated, but I want to update only the grid. How can I do? A sipplet of the code here : <form jwcid="[EMAIL PROTECTED]" listener="listener:doSomething" updateComponents="ognl:{components.thisForm.id}" async='ognl:true' clientValidationEnabled="ognl:true"> <span jwcid="addNew"/> </form> =========================== <component id="addNew" type="Submit"> <binding name="value" value="literal:addNew"/> <binding name="updateComponents" value="ognl:{id}"/> <binding name="listener" value="ognl:addNewAction"/> <binding name="async" value="ognl:true"></binding> </component> On 1/27/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
Thank you for your reply! I've understood my mistake: it was that I set volatile to true in two places I didn't have to. Backing to the normal behavior now I can also provide the component without its own form. Now I have another question: How can I pervent the validation of components outside the grid when I add a row ? kiuma On 1/27/07, RonPiterman <[EMAIL PROTECTED]> wrote: > > first, I would not in any cas try to write my own form component. > > So, stale links: > > In order for tapestry to submit a form, all form components must be > rendered on submit on the same order they were rendered for the response > which generated the form. > > to make sure this happens, tapestry records the order of the components, > > and if it doesn't match, generates a stale link. > > why doesn't it match? > > say you have a list of 1 object, and you iterate over it and generate an > input box for each item. > > If when submitting, the list has suddenly 2 objects, two input boxes are > > rendered, one too much... > > to prevent this, certain approaches were taken, including the For bean, > If bean ( i think...) and action listeners instead of "listener" > listeners. > > So - when doing thing in the right order and persisting the information > in the right place, stale link exceptions can be avoided - show me yours > and I'll show you mine (code)... > > Cheers, > Ron > > > > > > Andrea Chiumenti wrote: > > Hello, > > I'm using Tapestry 4.1.1 and I'm trying to update a comopnent. > > This component is a grid, that in normal state hasn't any input > component. > > The first time i call addNew, that adds a new row with input elements > all > > goes well. > > The next time i call this function I have a StaleLinkException. > > > > with this message: > > Rewind of form Home/thisForm expected allocated id #9 to be > 'nameField', > > but > > was 'addNew' (requested by component Home/tableForm.addNew). > > > > The call is an ajax call that updates the table containing the row. > > > > How can I prevent the stale link exception, how does Tapestry 4.1.1threats > > stale links ? > > > > Thanks in advance, > > kiuma > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >