Stripes

@Validate( field = "copyTo" , label="defaultLabel", labelKey="bundleKey" )

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: Release 1.5.6
  • Fix Version/s: Release 1.6
  • Component/s: Validation
  • Labels:
    None
  • Environment:
    Any

Description

It would have been great to be able to specify a bundle key directly into the validate annotation.

Actually according to the documentation label is already used as a default label, if the following bundle keys are not found:
Bundle lookup of: beanClassFQN.fieldName
Bundle lookup of: actionPath.fieldName
Bundle lookup of: fieldName
defaultLabel

It would be nice to be able to specify a bundlekey so that the order would be:
Bundle lookup of: labelKey
Bundle lookup of: beanClassFQN.fieldName
Bundle lookup of: actionPath.fieldName
Bundle lookup of: fieldName
defaultLabel

Because in case of an action path or actionbean name refactoring, we could break the localization of fields.
Using the fieldName is often not an option since a fieldName can be common to many forms but doesn't always represent the same concept.

So it would be great, and easy, to add a labelKey item to avoid changing all of our bundles in case of a refactoring.

Activity

Hide
Remi VANKEISBELCK added a comment - 17/Feb/13 3:50 PM

I get the point, but I must admit it requires a bit of work (just had a quick look).

Moreover there's an easy workaround for the problem itself : you just have to search/replace for your bean class name whenever you refactor. Not sure it deserves the effort.

Last, it's a new feature, and 1.5.x is for bug fix releases. We wanna keep 1.5.x robust so we avoid changes unless necessary.

I'm boucing this for 1.6.

Show
Remi VANKEISBELCK added a comment - 17/Feb/13 3:50 PM I get the point, but I must admit it requires a bit of work (just had a quick look). Moreover there's an easy workaround for the problem itself : you just have to search/replace for your bean class name whenever you refactor. Not sure it deserves the effort. Last, it's a new feature, and 1.5.x is for bug fix releases. We wanna keep 1.5.x robust so we avoid changes unless necessary. I'm boucing this for 1.6.

People

Vote (2)
Watch (3)

Dates

  • Created:
    25/Jan/12 8:17 AM
    Updated:
    17/Feb/13 3:51 PM