You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Harish Krishnaswamy <hk...@comcast.net> on 2004/04/14 04:21:40 UTC

Re: ValidField inside of loops, and listener error processing

I created a patch for this situation a while back that you can find in 
Bugzilla.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26369

-Harish


Robert Zeigler wrote:

> Hi, I'm using tapestry-3.0-rc1 and I've got a page that allows an 
> administrator to add multiple users to the system.
> The form entries are constructed inside a foreach loop, and are mostly 
> ValidFields. In the form listener method,
> there's a check to make sure that the "password" and "confirm" 
> password fields are the same, and if not, an error is registered.
> Because there are multiple possible places for error, and because they 
> are password fields (so, the user can't see which fields are correct 
> and which is in error),
> it would be nice to be able to let the user know which 
> password/confirm password set is in error.
> Is there some way when I do a 
> delegate.setFormComponent(IFormComponent) that I can specify which of 
> the fields to highlight?
> Looking at the code, "record" normally does a lookup based on the 
> _currentComponent.getName() value, but, since, when the form's 
> listener method is called,
> that will return the name of the last component of that id rendered, 
> the last field always gets set. Any thoughts?
>
> TIA
>
> Robert
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: ValidField inside of loops, and listener error processing

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Not a problem. Glad it helped.

-Harish

Robert Zeigler wrote:

> Harish Krishnaswamy wrote:
>
>> That's true, it starts with 1. I thought I had documented it in the 
>> source, I may have forgotten, its been a while.
>>
>> -Harish
>>
>
> Aha, there it is, in IFormComponent.java. Sorry, missed it there 
> before. =) Anyway, thanks again.
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: ValidField inside of loops, and listener error processing

Posted by Robert Zeigler <rd...@u.arizona.edu>.
Harish Krishnaswamy wrote:

> That's true, it starts with 1. I thought I had documented it in the 
> source, I may have forgotten, its been a while.
>
> -Harish
>

Aha, there it is, in IFormComponent.java. Sorry, missed it there before. 
=) Anyway, thanks again.

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: ValidField inside of loops, and listener error processing

Posted by Harish Krishnaswamy <hk...@comcast.net>.
That's true, it starts with 1. I thought I had documented it in the 
source, I may have forgotten, its been a while.

-Harish

Robert Zeigler wrote:

> Harish Krishnaswamy wrote:
>
>> I created a patch for this situation a while back that you can find 
>> in Bugzilla.
>>
>> http://issues.apache.org/bugzilla/show_bug.cgi?id=26369
>>
>> -Harish
>>
>>
>
> So, I've been looking at the patch (and have applied it and have been 
> playing with it). It works great! Thanks! =)
> The only "gotcha" was that the form element index actually starts with 
> one, since g.incrementCount() (IdAllocator.java) is called before
> index = IdAllocator.getRequestCount(baseName) (line in Form.java). 
> Anyway, thanks a bunch; this is a lot cleaner than some of the kludges 
> I was thinking about. ;)
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: ValidField inside of loops, and listener error processing

Posted by Robert Zeigler <rd...@u.arizona.edu>.
Harish Krishnaswamy wrote:

> I created a patch for this situation a while back that you can find in 
> Bugzilla.
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=26369
>
> -Harish
>
>

So, I've been looking at the patch (and have applied it and have been 
playing with it). It works great! Thanks! =)
The only "gotcha" was that the form element index actually starts with 
one, since g.incrementCount() (IdAllocator.java) is called before
index = IdAllocator.getRequestCount(baseName) (line in Form.java). 
Anyway, thanks a bunch; this is a lot cleaner than some of the kludges I 
was thinking about. ;)

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: ValidField inside of loops, and listener error processing

Posted by Robert Zeigler <rd...@u.arizona.edu>.
Harish Krishnaswamy wrote:

> I created a patch for this situation a while back that you can find in 
> Bugzilla.
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=26369
>
> -Harish


Thanks. I'll take a look.

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org