-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow non-standard attributes in <form> tags [SPR-5931] #10600
Comments
Matthew Sgarlata commented I just found out JSP 2 allows you to specify dynamic attirbutes in the API. Here is a link explaining this feature. |
Tim commented Attaching a proposed patch. If someone is inclined to look at this. A few notes on the patch:
Summary: It adds a lazily instantiated map to AbstractFormTag as well as default implementation of setDynamicAttribute from the DynamicAttribute interface. It does not declare AbstractFormTag as an implementor of DynamicAttribute (just gives a default impl of the method for convenience.) Next, AbstractHtmlElementTag added call writeDynamicAttributes akin to writeOptionalAttributes. Finally, declare AbstractHtmlInputElementTag to implement DynamicAttributes (marker interface for containers to accept/support DynamicAttributes and the assumption is that this is the base class we want to support dynamic attributes on?)
|
Keith Donald commented Assigned to Jeremy for completion for upcoming 3.0.0.RC1. |
Jeremy Grelle commented Taking advantage of the dynamic attributes feature will require upgrading the tag library to JSP 2.0. |
Matthew Sgarlata opened SPR-5931 and commented
The dojo framework creates form widgets using a syntax like this
As far as I can tell, it's impossible to do stuff like this with the Spring <form> tags because there is no way to specify non-standard HTML attributes. An approach I've used for my own custom tags is to add a catch-all attribute called "attributes" so the syntax would look something like
<form:select id="setvaluetest2" attributes='dojoType="dijit.form.FilteringSelect" invalidMessage="Invalid state name" ... etc
Attachments:
Issue Links:
Referenced from: commits 982ece5
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered: