Hello friends, Is it interesting for somebody to implement for html tags such logic as listed below?
Add to tags xxxKey attributes for all scripting support attributes and extend html tags with ability to retrieve client side code from resources by the key from attribute value. For example - <html:input name="someField" onKeyDownKey="javascript.alert.field"/> In this example 'javascript.alert.field' is the key to retireve client code script. Is it interesting? I think it is useful and easy to implement. Monday, November 26, 2001, 1:52:39 PM, you wrote: SW> Hi Oleg, SW> for our current problem the first option is the better solution because it SW> does not require to repeat in all JSPs the on... attributes. The overloaded SW> tag class can automatically append some javascript code without a JSP SW> developer SW> even to know about it. In this case the only thing of struts that we have to SW> patch is the tld which is acceptable. SW> The second option is also a great idea because then javascript logic is no SW> longer scattered everywhere but can be centralized. I think lots of SW> developers SW> would be very grateful to have this possiblity. SW> However in our case the (automatically added) javascript code is already SW> centralized in the overloading classes. To be able to configure it we would SW> need SW> some session- or application-scope object where we could define such global SW> settings for all html-elements of certain kinds. I think this would be a big SW> undertaking but maybe it would be enough to define somewhere default values SW> for all attributes of all JSP tags. SW> To summarize: we are completely happy if just the member access in the tags SW> is replaced by getter methods. SW> Ciao, SW> Stefan >> Hello Stefan, >> >> How do you want to specify default javascript code for tags? I view >> two ways to do so (all this variants uses your model - with proxy >> getXXX() methods and avoid direct variable values retrieving) - >> >> 1. Extend html:input tag with your own tag and reload all >> getXXXJscriptCode methods to generate default client side code. >> 2. Write new version of html:input tag with support of resource >> strings. So developer can specify key to retrieve string from >> resources and use it as attribute value - >> >> <html:input name="someField" onKeyDown="javascript:alert('Wow!')"/> >> <html:input name="someField" onKeyDownKey="javascript.alert.field"/> >> >> Last example uses key 'javascript.alert.field' to retrieve value >> from resources. >> >> I think that second method is more powerful and flexible. Is it >> way to solve your problem? >> -- Best regards, Oleg mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>