Re: Providing bugfix: Firefox body onload= tag - Re: x:inputCalendar - popup hidden by other elements
Thanks Paul, but could you please open a JIRA issue with the problem and upload the patch there? Then this will be tested :-) We have to keep the bugs under control... Regards, Bruno 2005/9/15, Paul Klaer [EMAIL PROTECTED]: Hi, this is definitly a bug. So, here I provide the solution. Can someone test and commit the files please? I saw the mail in the dev list from Zhong Li: --- I found how it happened. I have onload on body tag, even with simplest one, something like, body onload=alert('loading'); ... Then the inputCalendar doesn't work, can't popup. so weired. --- Since he had the same problem I checked the JavaScript behaviour in Firefox and debugged a little bit... This problem occures because the old JavaScript is executed in Firefox before the body tag onload is set during the render phase. So this variable var jscalendarOnloadBackup = window.onload; is only set to undefined and never with the old onload script. To solve this problem I rewrote the load script as a function in the popcalendar.js and this function is then called just before jscalendarSetImageDirectory is called inside the enclosing body element. At this time the onload tag of the body element is set. You can test this if you change the body element to body onload=alert('test body onload'); of the simple/calendar.jsp example.. Regards, Paul Paul Klaer wrote: Thank you for your tipps and sorry for my late answer. I had much to do and wanted to check the code before I write something back. In the meantime we got a new CSS file and the calendar popups are working fine in IE after resetting some div... The examples out of the myfaces repository are working on both: Firefox and IE. There I had no problem with the js script. I think we have to be careful using css... But, I have now a problem with Firefox popups to display them and this is because we use the onload tag and some own javascript init functions for the page. Now I checked the popcalendar.js code and the function jscalendarInit() is only called if there is no window.onload (onload tag) in the browser specified if no IE is used. This is why the variable jscalendarBPageLoaded still remains with the default value false and Firefox never executes this: - function jscalendarPopUpCalendar(ctl, ctl2, format){ if (jscalendarBPageLoaded){ - Is this right that I can't use the onload tag using Firefox? Martin Marinschek wrote: this occurs with IE only, right? it's a known bug of the IE - you would need to go through the elements of the form and render them invisible while displaying the inputCalendar. If you prepare a patch for the javaScript of inputCalendar which works in IE and Firefox we would happily apply it! regards, Martin On 9/9/05, Paul Klaer [EMAIL PROTECTED] wrote: Hi, I have a problem using the inputCalendar component. The popup window is shown correctly and works fine but if there are some buttons on my form the popup window is hidden by the buttons. The popup just appears in the background. How can I solve this problem? Using css and the z-index for the buttons option doesn't solve the problem. How can I set the calendar popup component to the foreground? Is it a bug of the inputCalendar component? Paul /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.myfaces.custom.calendar; import org.apache.myfaces.component.html.ext.HtmlInputText; import org.apache.myfaces.component.html.util.AddResource; import org.apache.myfaces.renderkit.JSFAttr; import org.apache.myfaces.renderkit.RendererUtils; import org.apache.myfaces.renderkit.html.HTML; import org.apache.myfaces.renderkit.html.HtmlRenderer; import org.apache.myfaces.renderkit.html.HtmlRendererUtils; import org.apache.myfaces.renderkit.html.util.JavascriptUtils; import javax.faces.application.Application; import javax.faces.component.UIComponent; import javax.faces.component.UIInput; import javax.faces.component.UIParameter; import javax.faces.component.html.HtmlCommandLink; import javax.faces.component.html.HtmlOutputText; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.convert.ConverterException;
Re: Providing bugfix: Firefox body onload= tag - Re: x:inputCalendar - popup hidden by other elements
Done. :-) http://issues.apache.org/jira/browse/MYFACES-569 Bruno Aranda wrote: Thanks Paul, but could you please open a JIRA issue with the problem and upload the patch there? Then this will be tested :-) We have to keep the bugs under control... Regards, Bruno 2005/9/15, Paul Klaer [EMAIL PROTECTED]: Hi, this is definitly a bug. So, here I provide the solution. Can someone test and commit the files please? I saw the mail in the dev list from Zhong Li: --- I found how it happened. I have onload on body tag, even with simplest one, something like, body onload=alert('loading'); ... Then the inputCalendar doesn't work, can't popup. so weired. --- Since he had the same problem I checked the JavaScript behaviour in Firefox and debugged a little bit... This problem occures because the old JavaScript is executed in Firefox before the body tag onload is set during the render phase. So this variable var jscalendarOnloadBackup = window.onload; is only set to undefined and never with the old onload script. To solve this problem I rewrote the load script as a function in the popcalendar.js and this function is then called just before jscalendarSetImageDirectory is called inside the enclosing body element. At this time the onload tag of the body element is set. You can test this if you change the body element to body onload=alert('test body onload'); of the simple/calendar.jsp example.. Regards, Paul Paul Klaer wrote: Thank you for your tipps and sorry for my late answer. I had much to do and wanted to check the code before I write something back. In the meantime we got a new CSS file and the calendar popups are working fine in IE after resetting some div... The examples out of the myfaces repository are working on both: Firefox and IE. There I had no problem with the js script. I think we have to be careful using css... But, I have now a problem with Firefox popups to display them and this is because we use the onload tag and some own javascript init functions for the page. Now I checked the popcalendar.js code and the function jscalendarInit() is only called if there is no window.onload (onload tag) in the browser specified if no IE is used. This is why the variable jscalendarBPageLoaded still remains with the default value false and Firefox never executes this: - function jscalendarPopUpCalendar(ctl, ctl2, format){ if (jscalendarBPageLoaded){ - Is this right that I can't use the onload tag using Firefox? Martin Marinschek wrote: this occurs with IE only, right? it's a known bug of the IE - you would need to go through the elements of the form and render them invisible while displaying the inputCalendar. If you prepare a patch for the javaScript of inputCalendar which works in IE and Firefox we would happily apply it! regards, Martin On 9/9/05, Paul Klaer [EMAIL PROTECTED] wrote: Hi, I have a problem using the inputCalendar component. The popup window is shown correctly and works fine but if there are some buttons on my form the popup window is hidden by the buttons. The popup just appears in the background. How can I solve this problem? Using css and the z-index for the buttons option doesn't solve the problem. How can I set the calendar popup component to the foreground? Is it a bug of the inputCalendar component? Paul /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.myfaces.custom.calendar; import org.apache.myfaces.component.html.ext.HtmlInputText; import org.apache.myfaces.component.html.util.AddResource; import org.apache.myfaces.renderkit.JSFAttr; import org.apache.myfaces.renderkit.RendererUtils; import org.apache.myfaces.renderkit.html.HTML; import org.apache.myfaces.renderkit.html.HtmlRenderer; import org.apache.myfaces.renderkit.html.HtmlRendererUtils; import org.apache.myfaces.renderkit.html.util.JavascriptUtils; import javax.faces.application.Application; import javax.faces.component.UIComponent; import javax.faces.component.UIInput; import javax.faces.component.UIParameter; import javax.faces.component.html.HtmlCommandLink; import javax.faces.component.html.HtmlOutputText; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.Converter; import javax.faces.convert.ConverterException; import java.io.IOException; import java.text.DateFormat; import java.text.DateFormatSymbols; import
Re: Providing bugfix: Firefox body onload= tag - Re: x:inputCalendar - popup hidden by other elements
Thanks! It is fixed now... Bruno 2005/9/15, Paul Klaer [EMAIL PROTECTED]: Done. :-) http://issues.apache.org/jira/browse/MYFACES-569 Bruno Aranda wrote: Thanks Paul, but could you please open a JIRA issue with the problem and upload the patch there? Then this will be tested :-) We have to keep the bugs under control... Regards, Bruno 2005/9/15, Paul Klaer [EMAIL PROTECTED]: Hi, this is definitly a bug. So, here I provide the solution. Can someone test and commit the files please? I saw the mail in the dev list from Zhong Li: --- I found how it happened. I have onload on body tag, even with simplest one, something like, body onload=alert('loading'); ... Then the inputCalendar doesn't work, can't popup. so weired. --- Since he had the same problem I checked the JavaScript behaviour in Firefox and debugged a little bit... This problem occures because the old JavaScript is executed in Firefox before the body tag onload is set during the render phase. So this variable var jscalendarOnloadBackup = window.onload; is only set to undefined and never with the old onload script. To solve this problem I rewrote the load script as a function in the popcalendar.js and this function is then called just before jscalendarSetImageDirectory is called inside the enclosing body element. At this time the onload tag of the body element is set. You can test this if you change the body element to body onload=alert('test body onload'); of the simple/calendar.jsp example.. Regards, Paul Paul Klaer wrote: Thank you for your tipps and sorry for my late answer. I had much to do and wanted to check the code before I write something back. In the meantime we got a new CSS file and the calendar popups are working fine in IE after resetting some div... The examples out of the myfaces repository are working on both: Firefox and IE. There I had no problem with the js script. I think we have to be careful using css... But, I have now a problem with Firefox popups to display them and this is because we use the onload tag and some own javascript init functions for the page. Now I checked the popcalendar.js code and the function jscalendarInit() is only called if there is no window.onload (onload tag) in the browser specified if no IE is used. This is why the variable jscalendarBPageLoaded still remains with the default value false and Firefox never executes this: - function jscalendarPopUpCalendar(ctl, ctl2, format){ if (jscalendarBPageLoaded){ - Is this right that I can't use the onload tag using Firefox? Martin Marinschek wrote: this occurs with IE only, right? it's a known bug of the IE - you would need to go through the elements of the form and render them invisible while displaying the inputCalendar. If you prepare a patch for the javaScript of inputCalendar which works in IE and Firefox we would happily apply it! regards, Martin On 9/9/05, Paul Klaer [EMAIL PROTECTED] wrote: Hi, I have a problem using the inputCalendar component. The popup window is shown correctly and works fine but if there are some buttons on my form the popup window is hidden by the buttons. The popup just appears in the background. How can I solve this problem? Using css and the z-index for the buttons option doesn't solve the problem. How can I set the calendar popup component to the foreground? Is it a bug of the inputCalendar component? Paul /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.myfaces.custom.calendar; import org.apache.myfaces.component.html.ext.HtmlInputText; import org.apache.myfaces.component.html.util.AddResource; import org.apache.myfaces.renderkit.JSFAttr; import org.apache.myfaces.renderkit.RendererUtils; import org.apache.myfaces.renderkit.html.HTML; import org.apache.myfaces.renderkit.html.HtmlRenderer; import org.apache.myfaces.renderkit.html.HtmlRendererUtils; import org.apache.myfaces.renderkit.html.util.JavascriptUtils; import javax.faces.application.Application; import javax.faces.component.UIComponent; import javax.faces.component.UIInput; import javax.faces.component.UIParameter; import javax.faces.component.html.HtmlCommandLink; import javax.faces.component.html.HtmlOutputText; import
Re: Providing bugfix: Firefox body onload= tag - Re: x:inputCalendar - popup hidden by other elements
You're welcome! Thanks for the fast resolving :-) Paul Bruno Aranda wrote: Thanks! It is fixed now... Bruno 2005/9/15, Paul Klaer [EMAIL PROTECTED]: Done. :-) http://issues.apache.org/jira/browse/MYFACES-569 Bruno Aranda wrote: Thanks Paul, but could you please open a JIRA issue with the problem and upload the patch there? Then this will be tested :-) We have to keep the bugs under control... Regards, Bruno 2005/9/15, Paul Klaer [EMAIL PROTECTED]: Hi, this is definitly a bug. So, here I provide the solution. Can someone test and commit the files please? I saw the mail in the dev list from Zhong Li: --- I found how it happened. I have onload on body tag, even with simplest one, something like, body onload=alert('loading'); ... Then the inputCalendar doesn't work, can't popup. so weired. --- Since he had the same problem I checked the JavaScript behaviour in Firefox and debugged a little bit... This problem occures because the old JavaScript is executed in Firefox before the body tag onload is set during the render phase. So this variable var jscalendarOnloadBackup = window.onload; is only set to undefined and never with the old onload script. To solve this problem I rewrote the load script as a function in the popcalendar.js and this function is then called just before jscalendarSetImageDirectory is called inside the enclosing body element. At this time the onload tag of the body element is set. You can test this if you change the body element to body onload=alert('test body onload'); of the simple/calendar.jsp example.. Regards, Paul Paul Klaer wrote: Thank you for your tipps and sorry for my late answer. I had much to do and wanted to check the code before I write something back. In the meantime we got a new CSS file and the calendar popups are working fine in IE after resetting some div... The examples out of the myfaces repository are working on both: Firefox and IE. There I had no problem with the js script. I think we have to be careful using css... But, I have now a problem with Firefox popups to display them and this is because we use the onload tag and some own javascript init functions for the page. Now I checked the popcalendar.js code and the function jscalendarInit() is only called if there is no window.onload (onload tag) in the browser specified if no IE is used. This is why the variable jscalendarBPageLoaded still remains with the default value false and Firefox never executes this: - function jscalendarPopUpCalendar(ctl, ctl2, format){ if (jscalendarBPageLoaded){ - Is this right that I can't use the onload tag using Firefox? Martin Marinschek wrote: this occurs with IE only, right? it's a known bug of the IE - you would need to go through the elements of the form and render them invisible while displaying the inputCalendar. If you prepare a patch for the javaScript of inputCalendar which works in IE and Firefox we would happily apply it! regards, Martin On 9/9/05, Paul Klaer [EMAIL PROTECTED] wrote: Hi, I have a problem using the inputCalendar component. The popup window is shown correctly and works fine but if there are some buttons on my form the popup window is hidden by the buttons. The popup just appears in the background. How can I solve this problem? Using css and the z-index for the buttons option doesn't solve the problem. How can I set the calendar popup component to the foreground? Is it a bug of the inputCalendar component? Paul /* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.myfaces.custom.calendar; import org.apache.myfaces.component.html.ext.HtmlInputText; import org.apache.myfaces.component.html.util.AddResource; import org.apache.myfaces.renderkit.JSFAttr; import org.apache.myfaces.renderkit.RendererUtils; import org.apache.myfaces.renderkit.html.HTML; import org.apache.myfaces.renderkit.html.HtmlRenderer; import org.apache.myfaces.renderkit.html.HtmlRendererUtils; import org.apache.myfaces.renderkit.html.util.JavascriptUtils; import javax.faces.application.Application; import javax.faces.component.UIComponent; import javax.faces.component.UIInput; import javax.faces.component.UIParameter; import javax.faces.component.html.HtmlCommandLink; import javax.faces.component.html.HtmlOutputText; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import