[
https://issues.apache.org/jira/browse/WICKET-1950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jeremy Thomerson closed WICKET-1950.
------------------------------------
Resolution: Won't Fix
Assignee: Jeremy Thomerson
I started to work on this, but came to the conclusion that it wasn't worth it.
If you want to contribute a patch for it, I wouldn't be against it, but I
really don't think it's worth it. There are hundreds of places in our code
that we reference event names, and if we were going to do this, all of those
places should also be converted to use this new enum. Additionally, all the
constructors, etc that take event names will now need a duplicate
method/constructor with a second signature for this enum. But then that
method/constructor will just chain to the first one (that takes a string)
because we can't get rid of those. So, at most we could provide an enum so
that users *could* use JavaScriptEvent.ONSOMEEVENT.getEventName() if they so
chose. But that's so long and ugly....
Anyway, if anybody feels strongly about it, here are the list of events I
pulled from w3 schools and converted to enum syntax...
ONBLUR("onblur"), ONCHANGE("onchange"), ONCLICK("onclick"),
ONDBLCLICK("ondblclick"), ONERROR(
"onerror"), ONFOCUS("onfocus"), ONKEYDOWN("onkeydown"),
ONKEYPRESS("onkeypress"), ONKEYUP(
"onkeyup"), ONLOAD("onload"), ONMOUSEDOWN("onmousedown"),
ONMOUSEMOVE("onmousemove"), ONMOUSEOUT(
"onmouseout"), ONMOUSEOVER("onmouseover"),
ONMOUSEUP("onmouseup"), ONRESIZE("onresize"), ONSELECT(
"onselect"), ONUNLOAD("onunload"), ;
> JavaScriptEvent Enumeration
> ---------------------------
>
> Key: WICKET-1950
> URL: https://issues.apache.org/jira/browse/WICKET-1950
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Reporter: James Carman
> Assignee: Jeremy Thomerson
>
> We should add an enum for JavaScript event types (onclick, onmouseover,
> onmouseout, etc.). Any code that takes a String for the event name (like
> behavior constructors) should either be rewritten/overridden to take the enum
> instead/also.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira