[ 
http://www.stripesframework.org/jira/browse/STS-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter closed STS-257.
--------------------------


> Tags (particularly label) do not look up correct localized field name when 
> the name includes indexing
> -----------------------------------------------------------------------------------------------------
>
>                 Key: STS-257
>                 URL: http://www.stripesframework.org/jira/browse/STS-257
>             Project: Stripes
>          Issue Type: Bug
>          Components: Tag Library
>    Affects Versions: Release 1.4
>            Reporter: Tim Fennell
>            Assignee: Ben Gunter
>             Fix For: Release 1.5
>
>
> I've been looking into this and I think it's actually a bug/lack of support 
> for indexed property names in the way tags lookup the localized field names.  
> The "correct" way to use the label tag should be like this:
>   <s:label name="choices[${num-1 }].short_text" for="text${num-1}"/>
>   <s:text  name="choices[${num-1 }].short_text"  id="text${num-1}"/>
> I.e. the for attribute on the label matches the 'id' attribute on the text 
> tag.  But if you set it up this way then you should get the error rendering 
> correctly, but the localized label won't get looked up correctly (it really 
> needs to removing the indexing and look up the label with 
> 'choices.short_text').
> I'll log a bug for this.
> -t
> On Aug 29, 2006, at 5:57 AM, Andrea Bondi wrote:
> Ok, I managed to get the label localized from StripesResources file.
> But it seems that it isn't tied with the text field: even if there's an
> error in that field, the label class isn't changed int class="error" and
> only the field change class.
> Code is:
> <stripes:label name="short_text" for="choices[${num-1 }].short_text" />
> <stripes:text style="width:50px;"
> name="choices[${num-1 }].short_text" />
> And in the rendered page, after an error:
> <label for="choices[0].short_text">Risposta Corta</label>
> <input value="" type="text" class="error" style="width:50px;"
> name="choices[0].short_text" />
> Thank you for your very useful help but, aboveall, for stripes ;)!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to