Re: Fwd: Get label input submit

2012-10-17 Thread William Lopes
Hey guys, after all this discussion, someone have idea of how I can get the
label of the submit button?

2012/10/17 William Lopes 

> Man, I tested this today and not works in the practice.
>
> 2012/10/16 Thiago H de Paula Figueiredo 
>
>> On Tue, 16 Oct 2012 22:25:48 -0300, William Lopes <
>> williamlopes@gmail.com> wrote:
>>
>>  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.
>>>
>>
>> Nope, this isn't correct. The context for a Submit component is defined
>> (loaded) while it's rendered, not when the submit button/link is clicked.
>>
>>
>> --
>> Thiago H. de Paula Figueiredo
>>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@tapestry.**apache.org
>>
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: Fwd: Get label input submit

2012-10-16 Thread William Lopes
Man, I tested this today and not works in the practice.

2012/10/16 Thiago H de Paula Figueiredo 

> On Tue, 16 Oct 2012 22:25:48 -0300, William Lopes <
> williamlopes@gmail.com> wrote:
>
>  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.
>>
>
> Nope, this isn't correct. The context for a Submit component is defined
> (loaded) while it's rendered, not when the submit button/link is clicked.
>
>
> --
> Thiago H. de Paula Figueiredo
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Fwd: Get label input submit

2012-10-16 Thread Thiago H de Paula Figueiredo
On Tue, 16 Oct 2012 22:25:48 -0300, William Lopes  
 wrote:


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.


Nope, this isn't correct. The context for a Submit component is defined  
(loaded) while it's rendered, not when the submit button/link is clicked.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Fwd: Get label input submit

2012-10-16 Thread William Lopes
Unfortunately, in practice this doesn't works.

2012/10/16 Lance Java 

> > 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 

> **
> On Tue, 16 Oct 2012 21:33:31 -0300, William Lopes <
> williamlopes@gmail.com> wrote:
>
>  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 
>
>> > 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 
>>>
>>>  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
>