You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ryan Owens <ry...@infoether.com> on 2005/02/01 23:28:05 UTC

writePrefix with ListEditMap

I have a custom ValidationDelegate and am trying to 'decorate' my 
fields in a ListEditMap loop on error using the writePrefix method.
However, no matter what I try the error decorations are off by 1 row in 
the ListEditMap.

I have tried:
isInError()
isInError(component)
and just for grins: getComponentTracking().isInError()

The correct field in the incorrect row, after the error is always 
decorated, leading me to believe that the isInErrorCode, or perhaps the 
component or something aren't set until after the writePrefix method is 
called.

Moving identical code into the writeSuffix method decorates the correct 
field and row.

Am I totally missing something?

-thanks much

  -Ryan Owens


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


Re: writePrefix with ListEditMap

Posted by Ryan Owens <ry...@infoether.com>.
For anyone else who has this problem, Howard Lewis Ship's blog about  
his Defer component addresses it here:
http://howardlewisship.com/blog/2004/12/back-from-shoppingcom-defer- 
component.html

At least I think it's the same problem. I could again be missing  
something.
It was a bit more than I wanted to deal with, so I just moved my little  
validation error arrow into the writeSuffix method and made it point  
left instead or right.
Good enough for rock and roll.

-Ryan Owens

On Feb 1, 2005, at 5:28 PM, Ryan Owens wrote:

> I have a custom ValidationDelegate and am trying to 'decorate' my  
> fields in a ListEditMap loop on error using the writePrefix method.
> However, no matter what I try the error decorations are off by 1 row  
> in the ListEditMap.
>
> I have tried:
> isInError()
> isInError(component)
> and just for grins: getComponentTracking().isInError()
>
> The correct field in the incorrect row, after the error is always  
> decorated, leading me to believe that the isInErrorCode, or perhaps  
> the component or something aren't set until after the writePrefix  
> method is called.
>
> Moving identical code into the writeSuffix method decorates the  
> correct field and row.
>
> Am I totally missing something?
>
> -thanks much
>
>  -Ryan Owens
>
>
> ---------------------------------------------------------------------
> 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