Unfortunately, in practice this doesn't works. 2012/10/16 Lance Java <lance.j...@googlemail.com>
> > Yes, but my currentAtributoGeneric is just one variable and your value is > changed the each iteration > Correct, but before it is changed, you are rendering a HTML submit button > to > the MarkupWriter. End result being multiple submit elements, each with it's > own unique context value. > So, we go to say that I have 3 atributes in my form: title(stringGeneric), author(modeloDadosGeneric), year(numericGeneric). Case I try to click in submit of the author, the context received will be "year", if I add another field, like description(stringLargeGeneric), the return to click in submit button will be "description". This happens because the context is loaded just after click in the submit. 2012/10/16 Thiago H de Paula Figueiredo <thiag...@gmail.com> > ** > On Tue, 16 Oct 2012 21:33:31 -0300, William Lopes < > williamlopes....@gmail.com> wrote: > > <input t:label="currentAtributoGeneric.name" t:type="Submit" > t:id="selecionar" t:context="id" value=" " class="imageSubmit"/> > > public Object onSelectedFromSelecionar(String atributoNome) { > > } > > Sorry, I put the code that I was testing. > > The right context is: t:context="currentAtributoGeneric.name" > > > What's the value received by the event handler method? > > > > 2012/10/16 Thiago H de Paula Figueiredo <thiag...@gmail.com> > >> <input t:label="currentAtributoGeneric.name" t:type="Submit" >> t:id="selecionar" t:context="id" value=" " class="imageSubmit"/> >> >> public Object onSelectedFromSelecionar(String atributoNome) { >> >> } >> >> It seems to me you're passing one context in the template (an id) and >> expecting something else in the event handler method (an attribute name). I >> have no idea what this id you're passing as a context. Anyway, it should be >> currentAtributoGeneric itself (if it's an entity class) or some property of >> it that you can use to retrieve the original object in the event handler >> method. >> >> >> >> >> On Tue, 16 Oct 2012 17:30:45 -0300, William Lopes < >> williamlopes....@gmail.com> wrote: >> >> .java >>> http://pastebin.com/PPuJjkSm >>> >>> .tml >>> http://pastebin.com/Fz4yWzNX >>> >>> Like I said in previous mails, the context of the submit button is >>> changed for the currentAtributoGeneric of last input field of the form. >>> >> >> I'm not following you here. Are you talking about the value received as a >> parameter in your event handler method? >> >> >>> 2012/10/16 Thiago H de Paula Figueiredo <thiag...@gmail.com> >>> >>> On Tue, 16 Oct 2012 17:06:57 -0300, William Lopes < >>>> williamlopes....@gmail.com> wrote: >>>> >>>> http://pastebin.com/PPuJjkSm >>>> >>>>> >>>>> >>>> Template please too. And please describe why you say it doesn't work. >>>> >>>> >>>> -- >>>> Thiago H. de Paula Figueiredo >>>> >>>> >>>> ------------------------------**------------------------------**--------- >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org< >>>> users-unsubscr...@tapestry.apache.org> >>>> >>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>> >>>> >>>> >> >> -- >> Thiago H. de Paula Figueiredo >> > > > > > -- > Thiago H. de Paula Figueiredo >