Hello Stefan,
Wednesday, November 21, 2001, 6:33:38 PM, you wrote:
SW> our first proposal concerning the extensibility of struts concerns the
SW> html-taglib. Currently in the org.apache.struts.taglib.BaseHandlerTag the
SW> members
SW> (onClick, onDblClick, ...) are directly accessed. If the prepare methods
SW> would use getter methods then you could easily extend the tags by
SW> overloading the
SW> getter method:
SW> Current version of BaseHandler has methods like this:
SW> private void prepareKeyEvents(StringBuffer handlers) {
SW> if (onKeyDown != null) {
SW> handlers.append(" onKeyDown=\"");
SW> handlers.append(onKeyDown);
SW> handlers.append("\"");
SW> }
SW> if (onKeyUp != null) {
SW> handlers.append(" onKeyUp=\"");
SW> handlers.append(onKeyUp);
SW> handlers.append("\"");
SW> }
SW> if (onKeyPress != null) {
SW> handlers.append(" onKeyPress=\"");
SW> handlers.append(onKeyPress);
SW> handlers.append("\"");
SW> }
SW> }
SW> Our proposed version is:
SW> private void prepareKeyEvents(StringBuffer handlers) {
SW> if (getOnKeyDown() != null) {
SW> handlers.append(" onKeyDown=\"");
SW> handlers.append(getOnKeyDown());
SW> handlers.append("\"");
SW> }
SW> if (getOnKeyUp() != null) {
SW> handlers.append(" onKeyUp=\"");
SW> handlers.append(getOnKeyUp());
SW> handlers.append("\"");
SW> }
SW> if (getOnKeyPress() != null) {
SW> handlers.append(" onKeyPress=\"");
SW> handlers.append(getOnKeyPress());
SW> handlers.append("\"");
SW> }
SW> }
SW> Admittedly this is not a great change, but it would help extensibility a
SW> lot. Who decides if this proposal is incorporated into the next version?
SW> I will send you some more proposals soon.
It is good addition. But what reason to do so? Can you explain any
situation when such methods can be used?
--
Best regards,
Oleg mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>