Summary: | [Enh] add option to always use default selection in input:select | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Rhett Sutphin <rhett> |
Component: | Input Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | nightly | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | Implement ignoreRequest for input:select |
Description
Rhett Sutphin
2004-06-17 21:26:30 UTC
Created attachment 11876 [details]
Implement ignoreRequest for input:select
This is something that could be useful for all of the tags in the input library probably. Is ignoreRequest the best way to achieve it or could we have something like a "value" attribute which behaves like default but cancels the behaviour of looking in a request and in the bean (if provided). What are your thoughts? I think it could be useful for any tag that provides behavior besides the automatic fill-in of the value from the request. Otherwise, you could just use the HTML. For example: the reason why I use input:select it that it lets me specify the options as a Map and specify which one of them is selected. input:text, on the other hand, doesn't seem to have anything going for it over pure HTML, except for the fact that it will take a value out of the request and use it as its value. If you added an ignoreRequest attribute, you might as well have just done <input type="text" ... />. Also: It seems to me that if you don't want to use the bean attribute, you could just omit it. However, I haven't used the input taglib that much so I could be missing something. It is a useful feature. The text box is still useful even if you don't use the request as it will perform all of the necessary character escaping etc for your values. Now all I'm considering is whether to call the attribute ignoreRequest or useRequest - with a default of true. I'm going to have a look at other taglibs to see if there's a defacto standard I have just committed a solution to this. I have added value/selectedValue(s)/checkedValue(s) to all of the input tags. This can be used instead of default(s) to specify an actual value to use rather than a default that can be overridden. I chose "value" rather than "ignoreRequest" as it is closer to the actual "value" attribute in the HTML input tag. |