Hi!
> Normaly getClientId() would give you the unique id (at least the id
> that denotes the correspondig html element). But see my last post,
> about troubles with it.
> Eventough it would output the correct value, you have do handle the id
> inside the loop for generating you custom validation code,
> because the ids will change every time your TextFields are rendered.
>
Problem is that the validation can only be done after the complete loop
is already rewound.
I checked all at the ValidationDelegate registered components but the
clientId of all of them is null at the time i can use them. So the only
possibility would be to generate a unique clientId (or better a unique
component-id) myself which i can also use the next time the page is
rendered to address the fields causing validation-errors or to build
another data structure parallel to my original beans to put the
information i need into...

Regards,
    Patrick


> Regards,
>       Robert
>
> Patrick Klein schrieb:
>
>> Hi!
>>
>> I got a small problem with a Tapestry application regarding components
>> in a for-loop. Inside this loop reside a couple of TextFields and
>> PropertySelection which i need to validate after all the data is written
>> to the beans. Problem now is that i need to address the components to
>> show the user in which of the components the validator found errors.
>> One of my tries was to get these components a custom and unique id which
>> i have the complete control over and therefore can reproduce. Didn't
>> work as getComponent(String id) goes for the name of the component, not
>> for the id. I also tried to set the name which got me an exception
>> telling me that i'm not allowed to do that...
>>
>> Could anyone here help me out in this matter as i'm running a bit low on
>> ideas of how to address these fields?
>>
>> Thanks in advance.
>>
>> Patrick
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to