[
http://www.stripesframework.org/jira/browse/STS-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Iwao AVE! updated STS-580:
--------------------------
Attachment: STS-580.patch
Attaching a patch with a small hope.
It certainly is a minor issue, but disturbs me too frequently.
The fix should be backward compatible (unless you are writing unused tag body)
and there would be some performance gain if you don't need localization.
How does that sound? ;)
> stripes:label tag should check its body first when searching its value to
> render.
> ---------------------------------------------------------------------------------
>
> Key: STS-580
> URL: http://www.stripesframework.org/jira/browse/STS-580
> Project: Stripes
> Issue Type: Improvement
> Components: Tag Library
> Affects Versions: Release 1.5
> Environment: n/a
> Reporter: Iwao AVE!
> Priority: Minor
> Attachments: STS-580.patch
>
>
> Currently, the stripes:label tag searches its value in the following order
> when it is rendered.
> - resource: {actionFQN}.{name}
> - resource: {actionPath}.{name} (deprecated)
> - resource: {name}
> - The body of the label tag
> - A warning message telling you to supply a label value somewhere!
> I suggest that it should check the body first for efficiency and flexibility.
> Consider the following form.
> Billing Address:
> <ss:label name="billingAddress.state" />: <ss:text
> name="billingAddress.state" />
> Shipping Address:
> <ss:label name="shippingAddress.state" />: <ss:text
> name="shippingAddress.state" />
> Although both fields should have the same caption 'State' in the form, I
> would like to display different name for each field in the validation error
> message.
> e.g.
> Billing Address: State is required.
> Shipping Address: State is required.
> If the body of the tag is searched first when it is rendered, I can write the
> form as follows.
> Billing Address:
> <ss:label name="billingAddress.state">State</ss:label>: <ss:text
> name="billingAddress.state" />
> Shipping Address:
> <ss:label name="shippingAddress.state">State</ss:label>: <ss:text
> name="shippingAddress.state" />
> And the StripesResources.properties will have entries like below.
> billingAddress.state=Billing Address: State
> shippingAddress.state=Shipping Address: State
> # I assume that this change does not require anything special when the same
> string can be used for caption and validation error message (i.e. backward
> compatible).
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development