You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Norman Franke <no...@myasd.com> on 2007/05/04 22:33:14 UTC

[T4] ValidationDelegate to edit attributes?

I'm trying to develop a customized ValidationDelegate that add a  
class to fields with an error. It works if the field doesn't already  
have a class attribute. What I want to do is add the class name to  
the existing attribute. Just adding one yields two class=""  
attributes, which doesn't seem to render properly. (The second one is  
completely ignored in some browsers.)

How can this be done? This is using Tapestry 4.0.2.

-Norman




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


Re: [T4] ValidationDelegate to edit attributes?

Posted by Norman Franke <no...@myasd.com>.
Alas, I decided to use 4.0.x due to the instability of 4.1 for this  
project. I guess for now, I'll just print the label in red and  
nothing else. I can't do the "**" after the field since that  
completely messes up the formatting (everything being placed rather  
precisely.)

I could probably do a writePrefix to insert a span with the class.

-Norman

On May 4, 2007, at 4:43 PM, Jesse Kuhnert wrote:

> If using tap 4.1.2 (I know, sorry ) I think it just works as  
> expected - but
> there's also some new api calls for handling stuff like this - ie
> appendAttribute() / getAttribute() / etc...
>
> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/ 
> IMarkupWriter.html
>
> On 5/4/07, Norman Franke <no...@myasd.com> wrote:
>>
>> I'm trying to develop a customized ValidationDelegate that add a
>> class to fields with an error. It works if the field doesn't already
>> have a class attribute. What I want to do is add the class name to
>> the existing attribute. Just adding one yields two class=""
>> attributes, which doesn't seem to render properly. (The second one is
>> completely ignored in some browsers.)
>>
>> How can this be done? This is using Tapestry 4.0.2.
>>
>> -Norman
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com



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


Re: [T4] ValidationDelegate to edit attributes?

Posted by Jesse Kuhnert <jk...@gmail.com>.
If using tap 4.1.2 (I know, sorry ) I think it just works as expected - but
there's also some new api calls for handling stuff like this - ie
appendAttribute() / getAttribute() / etc...

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/IMarkupWriter.html

On 5/4/07, Norman Franke <no...@myasd.com> wrote:
>
> I'm trying to develop a customized ValidationDelegate that add a
> class to fields with an error. It works if the field doesn't already
> have a class attribute. What I want to do is add the class name to
> the existing attribute. Just adding one yields two class=""
> attributes, which doesn't seem to render properly. (The second one is
> completely ignored in some browsers.)
>
> How can this be done? This is using Tapestry 4.0.2.
>
> -Norman
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com