Calendar component script events restriction
--------------------------------------------
Key: MYFACES-1067
URL: http://issues.apache.org/jira/browse/MYFACES-1067
Project: MyFaces
Type: Improvement
Components: Tomahawk
Versions: 1.1.1
Reporter: Tomas Havelka
Hi,
I am component writer and I am using those MyFaces components too. I found
another restriction of using Calendar component (and any others maybe too).
This component javascript sets the document.onclick event and overrides all
others associated before. I need to associate with this event my own method for
my component purposes but unfortunately my script appears in page before that
for Calendar component so associated event of mine is overriden. It would be
nice to handle these "global" events for example by wrapping with this code
(this exmaple is for discussed Calendar component):
// old popcalendar.js script code
document.onclick = function jscalendarHidecal2 () {
if (!jscalendarBShow)
jscalendarHideCalendar();
jscalendarBShow = false;
}
// new popcalendar.js code with retain document.onclick event
function jscalendarHidecal2 () {
if (!jscalendarBShow)
jscalendarHideCalendar();
jscalendarBShow = false;
}
if (document.onclick != null)
{
var oldOnclick = document.onclick;
document.onclick = function(e)
{
oldOnclick(e);
jscalendarHidecal2();
}
}
else
{
document.onclick = jscalendarHidecal2;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira