### Eclipse Workspace Patch 1.0 #P stripes-svn-1.5.4.1 Index: stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java =================================================================== --- stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java (revision 1330) +++ stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java (working copy) @@ -268,7 +268,7 @@ } return LocalizationUtility.getLocalizedFieldName(name, actionPath, beanClass, locale); } - + protected ValidationMetadata getValidationMetadata() throws StripesJspException { // find the action bean class we're dealing with Class beanClass = getParentFormTag().getActionBeanClass(); @@ -295,7 +295,7 @@ /** * Calls {@link #format(Object, boolean)} with {@code forOutput} set to true. - * + * * @param input The object to be formatted * @see #format(Object, boolean) */ @@ -307,7 +307,7 @@ * Attempts to format an object using the Stripes formatting system. If no formatter can * be found, then a simple String.valueOf(input) will be returned. If the value passed in * is null, then the empty string will be returned. - * + * * @param input The object to be formatted * @param forOutput If true, then the object will be formatted for output to the JSP. Currently, * that means that if encryption is enabled for the ActionBean property with the same @@ -441,6 +441,13 @@ try { int result = doEndInputTag(); + // And see if we have localized title text too + String name = getAttributes().get("name"); + if (name != null) { // Skip title lookup if no name to lookup against + String title = getLocalizedFieldName(name + ".title"); + if (title != null) { setTitle(title); } + } + if (getFieldErrors() != null) { this.errorRenderer.doAfterEndTag(); } @@ -458,7 +465,7 @@ this.focus = false; } } - + /** Rethrows the passed in throwable in all cases. */ public void doCatch(Throwable throwable) throws Throwable { throw throwable; } @@ -569,5 +576,7 @@ public void setSize(String size) { set("size", size); } public String getSize() { return get("size"); } + public void setTitle(String title) { set("title", title); } + public String getTitle() { return get("title"); } }