tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Sommerville (JIRA)" <...@tapestry.apache.org>
Subject [jira] Updated: (TAPESTRY-1417) CSS classes on text input fields are discarded when field is in error
Date Wed, 18 Apr 2007 05:07:15 GMT

     [ https://issues.apache.org/jira/browse/TAPESTRY-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Ben Sommerville updated TAPESTRY-1417:

        Fix Version/s:     (was: 5.0.4)
    Affects Version/s: 5.0.4

> CSS classes on text input fields are discarded when field is in error
> ---------------------------------------------------------------------
>                 Key: TAPESTRY-1417
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1417
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.4
>            Reporter: Ben Sommerville
>            Priority: Minor
> The TextField, TextArea and PasswordField components (all children of AbstractTextField)
accept a "class" attribute as an informal parameter.  This is rendered correctly when the
component is rendered normally.
> However when the field has a validation error the ValidationDecorator will set class="t-error"
before the informal attributes are added.  This prevents any user supplied classes being rendered.
> ValidationDecorator works correctly if the class attribute has already been written (it
adds t-error it that case), the issue is that the AbstractTextField calls the decorator before
the informal attributes are rendered.  
> I'm not sure of the best way to ensure the decorator is called after the informal parameters.
 The options I see are
> a) remove the RenderInformals mixin from AbstractField & call renderInformalParameters
>      -> downside is other children of AbstractField also have to explicitly deal with
informal parameters
> b) make class an explicit parameter 
>      -> downside is that it has to be added to attributes explicitly somewhere
> c) move the validation render & decorate to the BeforeRenderTemplate phase
>      -> which feels a bit like a hack
> I think option (a) is probably best.....
> (happy to supply patch for whichever approach)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message