Well, the way I looked at it is that it means that the submit/reset/
button controls have a consistent strategy with the rest of the form
controls. So the way to define localized text for buttons is the
same as it is for a text field. Let me outline here exactly how it's
designed to work, because I think there are a couple of solutions to
your problem. It looks for text for the button in the following
order until it finds non-null, non-empty String:
1. Localized names from the resource bundle:
1.a. First using UrlBinding.fieldName
1.b. Then using just fieldName
2. The body of the submit/reset/button tag itself
3. The value attribute of the submit/reset/button tag itself
So, if I'm understanding you correctly, you should be able to use
centralized values for your buttons by adding something like this to
# Default button text
go=Do It Now
save=Save Your Changes
Does this not work for you? I'll admit that I just checked the
Localization doc in Confluence, and it doesn't make any mention of
this scoped search (my bad). And if you don't like this way, you can
always do something like:
<stripes:submit name="go"><fmt:message bundle="StripesResources"
Definitely not as concise, but it will also work.
As for your problem with the embedded forms, I can't think of a
reason why that shouldn't work. They embedded JSP fragment gets
evaluated outside of the parent JSP and then just included....so it
seems odd that you'd run into problems there. I hate to ask these
kinds of things since it seems condescending, but you have checked
that the form action being passed in is exactly what you expected?
And it is relative to the web app context? If you use a relative
action (e.g. action="Other.action") I'm not positive Stripes will
figure out what the real action path is....
On Dec 15, 2005, at 9:52 AM, Sean Blezard wrote:
> Hi Tim,
> What was the rationale behind the way form button labelling works -
> with the /doSomething.action.save approach? Why not just use the
> same strategy as elsewhere and supply a resource bundle key that
> can be anything. The approach, as implemented, requires multiple
> entries for the same piece of text, one for each form. Or have I
> missed the point? Similarly, I have trouble getting it to work in
> some scenarios. I created a page with two embedded forms (little
> search boxes in essence). I tried to assign the name of the form
> action in the resource file with .go (the name of the control) but
> the browser still shows the default Submit/Submit Query text.
> Any thoughts on where my mistake might lie?
> If its relevant the embedded form was referenced as a layout
> rendering component using the Stripes layout tag (good idea by the
> way), with the form action passed in as a parameter from the
> containing page.
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD
> Stripes-users mailing list
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
Stripes-users mailing list