|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (MYFACES-2256) oamSetHiddenInput should not ignore nodeName=='input' (lower case characters)oamSetHiddenInput should not ignore nodeName=='input' (lower case characters)
----------------------------------------------------------------------------- Key: MYFACES-2256 URL: https://issues.apache.org/jira/browse/MYFACES-2256 Project: MyFaces Core Issue Type: Bug Affects Versions: 1.2.6 Environment: Windows XP Professional, Firefox 3.0.11, MyFaces 1.2.6 Tomahawk-12 1.1.8 (and RichFaces 3.3.1 GA), Tomcat 6. Reporter: Lutz Ulruch In function oamSetHiddenInput(formname, name, value) the test if(typeof form.elements[name]!='undefined' && form.elements[name].nodeName=='INPUT') does not cover <input> elements where nodeName is 'input' (that is: lower case characters instead of upper case 'INPUT'). This results in the following error: If the form already contains an input element with the specified name, but nodeName=='input', the test fails and a new input element with the same name is added to the form. If the form is submitted, the HTTP request will contain 2 values for the parameter referenced by 'name': one is the value of the unchanged <INPUT> field, the other is the value of the newly created <input> field. Most UIComponents do not check if there is more than one value for a parameter. Probably they will just interpret the first value - which might be the 'wrong' value of the <INPUT> field instead of the 'valid' value of the <input> field. How I achieved this situation: Even though MyFaces typically renders input fields with lower case characters (XHTML), when a page is rendered by Firefox, the nodeName of input elements seems to be the upper case variant. I wonder why. Now, we use RichFaces' a4j:poll in order to perform periodical partial page updates. The updated part of the page may contain locically equivalent input fields, but in lower case. The JavaScript behind a4j:poll uses the W3C DOM method replaceChild() in order to update page fragments. This method replaces the original <INPUT> fields by <input> fields. Of course, it doesn't matter how <input> elements become part of a page. In oamSetHiddenInput() <input> should be treated like <INPUT>. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (MYFACES-2256) oamSetHiddenInput should not ignore nodeName=='input' (lower case characters)[ https://issues.apache.org/jira/browse/MYFACES-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lutz Ulruch updated MYFACES-2256: --------------------------------- Status: Patch Available (was: Open) > oamSetHiddenInput should not ignore nodeName=='input' (lower case characters) > ----------------------------------------------------------------------------- > > Key: MYFACES-2256 > URL: https://issues.apache.org/jira/browse/MYFACES-2256 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 1.2.6 > Environment: Windows XP Professional, Firefox 3.0.11, MyFaces 1.2.6 Tomahawk-12 1.1.8 (and RichFaces 3.3.1 GA), Tomcat 6. > Reporter: Lutz Ulruch > > In > function oamSetHiddenInput(formname, name, value) > the test > if(typeof form.elements[name]!='undefined' && form.elements[name].nodeName=='INPUT') > does not cover <input> elements where nodeName is 'input' (that is: lower case characters instead of upper case 'INPUT'). > This results in the following error: > If the form already contains an input element with the specified name, but nodeName=='input', the test fails and a new input element with the same name is added to the form. > If the form is submitted, the HTTP request will contain 2 values for the parameter referenced by 'name': > one is the value of the unchanged <INPUT> field, the other is the value of the newly created <input> field. > Most UIComponents do not check if there is more than one value for a parameter. > Probably they will just interpret the first value - which might be the 'wrong' value of the <INPUT> field instead of the 'valid' value of the <input> field. > How I achieved this situation: > Even though MyFaces typically renders input fields with lower case characters (XHTML), when a page is rendered by Firefox, the nodeName of input elements seems to be the upper case variant. I wonder why. > Now, we use RichFaces' a4j:poll in order to perform periodical partial page updates. > The updated part of the page may contain locically equivalent input fields, but in lower case. > The JavaScript behind a4j:poll uses the W3C DOM method replaceChild() in order to update page fragments. > This method replaces the original <INPUT> fields by <input> fields. > Of course, it doesn't matter how <input> elements become part of a page. > In oamSetHiddenInput() <input> should be treated like <INPUT>. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (MYFACES-2256) oamSetHiddenInput should not ignore nodeName=='input' (lower case characters)[ https://issues.apache.org/jira/browse/MYFACES-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721709#action_12721709 ] Lutz Ulruch commented on MYFACES-2256: -------------------------------------- The patch for this issue seems to be quite simple: In MyFaces org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.prepareScript(ScriptContext context, boolean autoScroll) and Tomahawk org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils.prepareScript(ScriptContext context, boolean autoScroll) replace: context.append("if(typeof form.elements[name]!='undefined' && form.elements[name].nodeName=='INPUT')"); with: context.append("if(typeof form.elements[name]!='undefined' && (form.elements[name].nodeName=='INPUT' || form.elements[name].nodeName=='input'))"); > oamSetHiddenInput should not ignore nodeName=='input' (lower case characters) > ----------------------------------------------------------------------------- > > Key: MYFACES-2256 > URL: https://issues.apache.org/jira/browse/MYFACES-2256 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 1.2.6 > Environment: Windows XP Professional, Firefox 3.0.11, MyFaces 1.2.6 Tomahawk-12 1.1.8 (and RichFaces 3.3.1 GA), Tomcat 6. > Reporter: Lutz Ulruch > > In > function oamSetHiddenInput(formname, name, value) > the test > if(typeof form.elements[name]!='undefined' && form.elements[name].nodeName=='INPUT') > does not cover <input> elements where nodeName is 'input' (that is: lower case characters instead of upper case 'INPUT'). > This results in the following error: > If the form already contains an input element with the specified name, but nodeName=='input', the test fails and a new input element with the same name is added to the form. > If the form is submitted, the HTTP request will contain 2 values for the parameter referenced by 'name': > one is the value of the unchanged <INPUT> field, the other is the value of the newly created <input> field. > Most UIComponents do not check if there is more than one value for a parameter. > Probably they will just interpret the first value - which might be the 'wrong' value of the <INPUT> field instead of the 'valid' value of the <input> field. > How I achieved this situation: > Even though MyFaces typically renders input fields with lower case characters (XHTML), when a page is rendered by Firefox, the nodeName of input elements seems to be the upper case variant. I wonder why. > Now, we use RichFaces' a4j:poll in order to perform periodical partial page updates. > The updated part of the page may contain locically equivalent input fields, but in lower case. > The JavaScript behind a4j:poll uses the W3C DOM method replaceChild() in order to update page fragments. > This method replaces the original <INPUT> fields by <input> fields. > Of course, it doesn't matter how <input> elements become part of a page. > In oamSetHiddenInput() <input> should be treated like <INPUT>. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (MYFACES-2256) oamSetHiddenInput should not ignore nodeName=='input' (lower case characters)[ https://issues.apache.org/jira/browse/MYFACES-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lutz Ulruch updated MYFACES-2256: --------------------------------- Status: Open (was: Patch Available) > oamSetHiddenInput should not ignore nodeName=='input' (lower case characters) > ----------------------------------------------------------------------------- > > Key: MYFACES-2256 > URL: https://issues.apache.org/jira/browse/MYFACES-2256 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 1.2.6 > Environment: Windows XP Professional, Firefox 3.0.11, MyFaces 1.2.6 Tomahawk-12 1.1.8 (and RichFaces 3.3.1 GA), Tomcat 6. > Reporter: Lutz Ulruch > > In > function oamSetHiddenInput(formname, name, value) > the test > if(typeof form.elements[name]!='undefined' && form.elements[name].nodeName=='INPUT') > does not cover <input> elements where nodeName is 'input' (that is: lower case characters instead of upper case 'INPUT'). > This results in the following error: > If the form already contains an input element with the specified name, but nodeName=='input', the test fails and a new input element with the same name is added to the form. > If the form is submitted, the HTTP request will contain 2 values for the parameter referenced by 'name': > one is the value of the unchanged <INPUT> field, the other is the value of the newly created <input> field. > Most UIComponents do not check if there is more than one value for a parameter. > Probably they will just interpret the first value - which might be the 'wrong' value of the <INPUT> field instead of the 'valid' value of the <input> field. > How I achieved this situation: > Even though MyFaces typically renders input fields with lower case characters (XHTML), when a page is rendered by Firefox, the nodeName of input elements seems to be the upper case variant. I wonder why. > Now, we use RichFaces' a4j:poll in order to perform periodical partial page updates. > The updated part of the page may contain locically equivalent input fields, but in lower case. > The JavaScript behind a4j:poll uses the W3C DOM method replaceChild() in order to update page fragments. > This method replaces the original <INPUT> fields by <input> fields. > Of course, it doesn't matter how <input> elements become part of a page. > In oamSetHiddenInput() <input> should be treated like <INPUT>. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Resolved: (MYFACES-2256) oamSetHiddenInput should not ignore nodeName=='input' (lower case characters)[ https://issues.apache.org/jira/browse/MYFACES-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leonardo Uribe resolved MYFACES-2256. ------------------------------------- Resolution: Fixed Fix Version/s: 1.2.8-SNAPSHOT Assignee: Leonardo Uribe Thanks to Lutz Ulruch for this patch > oamSetHiddenInput should not ignore nodeName=='input' (lower case characters) > ----------------------------------------------------------------------------- > > Key: MYFACES-2256 > URL: https://issues.apache.org/jira/browse/MYFACES-2256 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 1.2.6 > Environment: Windows XP Professional, Firefox 3.0.11, MyFaces 1.2.6 Tomahawk-12 1.1.8 (and RichFaces 3.3.1 GA), Tomcat 6. > Reporter: Lutz Ulruch > Assignee: Leonardo Uribe > Fix For: 1.2.8-SNAPSHOT > > > In > function oamSetHiddenInput(formname, name, value) > the test > if(typeof form.elements[name]!='undefined' && form.elements[name].nodeName=='INPUT') > does not cover <input> elements where nodeName is 'input' (that is: lower case characters instead of upper case 'INPUT'). > This results in the following error: > If the form already contains an input element with the specified name, but nodeName=='input', the test fails and a new input element with the same name is added to the form. > If the form is submitted, the HTTP request will contain 2 values for the parameter referenced by 'name': > one is the value of the unchanged <INPUT> field, the other is the value of the newly created <input> field. > Most UIComponents do not check if there is more than one value for a parameter. > Probably they will just interpret the first value - which might be the 'wrong' value of the <INPUT> field instead of the 'valid' value of the <input> field. > How I achieved this situation: > Even though MyFaces typically renders input fields with lower case characters (XHTML), when a page is rendered by Firefox, the nodeName of input elements seems to be the upper case variant. I wonder why. > Now, we use RichFaces' a4j:poll in order to perform periodical partial page updates. > The updated part of the page may contain locically equivalent input fields, but in lower case. > The JavaScript behind a4j:poll uses the W3C DOM method replaceChild() in order to update page fragments. > This method replaces the original <INPUT> fields by <input> fields. > Of course, it doesn't matter how <input> elements become part of a page. > In oamSetHiddenInput() <input> should be treated like <INPUT>. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free embeddable forum powered by Nabble | Forum Help |