[JBoss JIRA] (RF-13221) Incorrect XML encoding in AJAX response
by Stan Silvert (JIRA)
[ https://issues.jboss.org/browse/RF-13221?page=com.atlassian.jira.plugin.s... ]
Stan Silvert commented on RF-13221:
-----------------------------------
First, I'd check to see if MyFaces has the same behavior. But either way, the issue should be reported to the Mojarra team:
https://java.net/jira/browse/JAVASERVERFACES/
> Incorrect XML encoding in AJAX response
> ---------------------------------------
>
> Key: RF-13221
> URL: https://issues.jboss.org/browse/RF-13221
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.4
> Reporter: Jonáš Trantina
>
> Consider the following example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <script src="path_to_some_script?param=asd&important=param"></script>
> </h:form>
> {noformat}
> when commandButton is clicked, the form is rerendered and the response looks like this:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <script src="path_to_some_script?param=asd&important=param"></script>
> ]]</ ... >
> {noformat}
> But this is wrong. Because script tag is already in CDATA, so there is no need for XML encoding for '&' entity.
> This further causes script loading to fail (performed by jsf.js), whenever parameters are needed (e.g. portal environment),
> because script is downloaded from {noformat}"path_to_some_script?param=asd&important=param" {noformat}
> instead of {noformat}"path_to_some_script?param=asd&important=param"{noformat}.
> Another very similar issue is when CDATA element is present in a re-rendered fragment. Example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <style type="text/css">
> /* <![CDATA[ */
> .somecssclass {...}
> /* ]] */
> </style>
> </h:form>
> {noformat}
> The AJAX response then looks like so:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <![CDATA[
> ...
> ]]
> ...
> ]]</ ... >
> {noformat}
> And this is incorrect XML, since CDATA cannot contain ']]', so the response is discarded.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13221) Incorrect XML encoding in AJAX response
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13221?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13221:
------------------------------------
[~ssilvert] do you have any insight on this issue? Is this something we can fix in JSF?
> Incorrect XML encoding in AJAX response
> ---------------------------------------
>
> Key: RF-13221
> URL: https://issues.jboss.org/browse/RF-13221
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.4
> Reporter: Jonáš Trantina
>
> Consider the following example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <script src="path_to_some_script?param=asd&important=param"></script>
> </h:form>
> {noformat}
> when commandButton is clicked, the form is rerendered and the response looks like this:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <script src="path_to_some_script?param=asd&important=param"></script>
> ]]</ ... >
> {noformat}
> But this is wrong. Because script tag is already in CDATA, so there is no need for XML encoding for '&' entity.
> This further causes script loading to fail (performed by jsf.js), whenever parameters are needed (e.g. portal environment),
> because script is downloaded from {noformat}"path_to_some_script?param=asd&important=param" {noformat}
> instead of {noformat}"path_to_some_script?param=asd&important=param"{noformat}.
> Another very similar issue is when CDATA element is present in a re-rendered fragment. Example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <style type="text/css">
> /* <![CDATA[ */
> .somecssclass {...}
> /* ]] */
> </style>
> </h:form>
> {noformat}
> The AJAX response then looks like so:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <![CDATA[
> ...
> ]]
> ...
> ]]</ ... >
> {noformat}
> And this is incorrect XML, since CDATA cannot contain ']]', so the response is discarded.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13216) PoupPanel doesn't disappear when rendered="false" and rerender it.
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13216?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13216:
-----------------------------
Assignee: (was: Juraj Húska)
> PoupPanel doesn't disappear when rendered="false" and rerender it.
> ------------------------------------------------------------------
>
> Key: RF-13216
> URL: https://issues.jboss.org/browse/RF-13216
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.3
> Reporter: Takayuki Konishi
> Attachments: rf3_3_4-modalpanel.zip, rf4_3_3-popuppanel.zip
>
>
> If you use the richfaces popupPanel in the default domElementAttachment="body" mode it will not disappear under specific conditions.
> {code:xml}
> <h:body title="page 1">
> <a4j:outputPanel id="myPanel">
> <rich:popupPanel domElementAttachment="body" show="true" rendered="#{test.showPopup}">
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}" value="switch off" render="myPanel"/>
> </h:form>
> </rich:popupPanel>
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}" value="switch on" render="myPanel"/>
> </h:form>
> </a4j:outputPanel>
> </h:body>
> {code}
> In Richfaces 3.3.x, on the other hand, there was a component cleanup system ({{memory.js _cleanComponentNodes}}) which was responsible to remove components after ajax calls if the component was removed from the current view.
> Therefore the above example (revert {{popupPanel}} to {{modalPanel}}) works in RF3.3.4.Final.
> Note:
> In case {{domElementAttachment="parent"}}, it will show [the other JSF2 bug|https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790] where the view state was lost, therefore you must click the action button twice to really call the function.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13216) PoupPanel doesn't disappear when rendered="false" and rerender it.
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13216?page=com.atlassian.jira.plugin.s... ]
Juraj Húska edited comment on RF-13216 at 9/27/13 9:28 AM:
-----------------------------------------------------------
I have tried to reproduce the issue on [this|https://github.com/richfaces/richfaces-qa/tree/RF-13216] branch.
* reproducer facelet [here|https://github.com/richfaces/richfaces-qa/blob/RF-13216/metamer/appl...]
* managed bean [here|https://github.com/richfaces/richfaces-qa/blob/RF-13216/metamer/appl...]
I am able to reproduce the second mentioned issue:
Invoking request from the outside form is broken. However, I can reproduce the issue with {{h:commandButton}}. When using {{a4j:commandButton}} from outside form, the action method is called and an AJAX request is made.
Steps to reproduce:
# load the reproducer page: http://localhost:8080/metamer/faces/components/richPopupPanel/rf-13216.xhtml
# click on the button: "outside full page"
# see that no message is logged in the server console - also no request is fired - full request expected
# when clicking on the button: "outside Ajax" - there is message logged on the console - expected AJAX request is fired
Should I do something more ?
was (Author: jhuska):
I have tried to reproduce the issue on [this|https://github.com/richfaces/richfaces-qa/tree/RF-13216] branch.
* reproducer facelet [here|https://github.com/richfaces/richfaces-qa/blob/RF-13216/metamer/appl...]
* managed bean [here|https://github.com/richfaces/richfaces-qa/blob/RF-13216/metamer/appl...]
I am able to reproduce the second mentioned issue:
Invoking request from the outside form is broken. However, I can reproduce the issue with {{h:commandButton}}. When using {{a4j:commandButton}} from outside form, the action method is called.
Steps to reproduce:
# load the reproducer page: http://localhost:8080/metamer/faces/components/richPopupPanel/rf-13216.xhtml
# click on the button: "outside full page"
# see that no message is logged in the server console
# when clicking on the button: "outside Ajax" - there is message logged on the console
Should I do something more ?
> PoupPanel doesn't disappear when rendered="false" and rerender it.
> ------------------------------------------------------------------
>
> Key: RF-13216
> URL: https://issues.jboss.org/browse/RF-13216
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.3
> Reporter: Takayuki Konishi
> Assignee: Juraj Húska
> Attachments: rf3_3_4-modalpanel.zip, rf4_3_3-popuppanel.zip
>
>
> If you use the richfaces popupPanel in the default domElementAttachment="body" mode it will not disappear under specific conditions.
> {code:xml}
> <h:body title="page 1">
> <a4j:outputPanel id="myPanel">
> <rich:popupPanel domElementAttachment="body" show="true" rendered="#{test.showPopup}">
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}" value="switch off" render="myPanel"/>
> </h:form>
> </rich:popupPanel>
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}" value="switch on" render="myPanel"/>
> </h:form>
> </a4j:outputPanel>
> </h:body>
> {code}
> In Richfaces 3.3.x, on the other hand, there was a component cleanup system ({{memory.js _cleanComponentNodes}}) which was responsible to remove components after ajax calls if the component was removed from the current view.
> Therefore the above example (revert {{popupPanel}} to {{modalPanel}}) works in RF3.3.4.Final.
> Note:
> In case {{domElementAttachment="parent"}}, it will show [the other JSF2 bug|https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790] where the view state was lost, therefore you must click the action button twice to really call the function.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13221) Incorrect XML encoding in AJAX response
by Jonáš Trantina (JIRA)
[ https://issues.jboss.org/browse/RF-13221?page=com.atlassian.jira.plugin.s... ]
Jonáš Trantina commented on RF-13221:
-------------------------------------
Vanilla JSF behaves exactly the same. Both issues (XML entity and CDATA) are present.
JSF also displays a dialog message "emptyResponse: An empty response was received from the server. Check server error logs." when reproducing the CDATA issue. Server logs are empty, of course.
> Incorrect XML encoding in AJAX response
> ---------------------------------------
>
> Key: RF-13221
> URL: https://issues.jboss.org/browse/RF-13221
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.4
> Reporter: Jonáš Trantina
> Labels: waiting_on_user
>
> Consider the following example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <script src="path_to_some_script?param=asd&important=param"></script>
> </h:form>
> {noformat}
> when commandButton is clicked, the form is rerendered and the response looks like this:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <script src="path_to_some_script?param=asd&important=param"></script>
> ]]</ ... >
> {noformat}
> But this is wrong. Because script tag is already in CDATA, so there is no need for XML encoding for '&' entity.
> This further causes script loading to fail (performed by jsf.js), whenever parameters are needed (e.g. portal environment),
> because script is downloaded from {noformat}"path_to_some_script?param=asd&important=param" {noformat}
> instead of {noformat}"path_to_some_script?param=asd&important=param"{noformat}.
> Another very similar issue is when CDATA element is present in a re-rendered fragment. Example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <style type="text/css">
> /* <![CDATA[ */
> .somecssclass {...}
> /* ]] */
> </style>
> </h:form>
> {noformat}
> The AJAX response then looks like so:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <![CDATA[
> ...
> ]]
> ...
> ]]</ ... >
> {noformat}
> And this is incorrect XML, since CDATA cannot contain ']]', so the response is discarded.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13221) Incorrect XML encoding in AJAX response
by Jonáš Trantina (JIRA)
[ https://issues.jboss.org/browse/RF-13221?page=com.atlassian.jira.plugin.s... ]
Jonáš Trantina updated RF-13221:
--------------------------------
Labels: (was: waiting_on_user)
> Incorrect XML encoding in AJAX response
> ---------------------------------------
>
> Key: RF-13221
> URL: https://issues.jboss.org/browse/RF-13221
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.4
> Reporter: Jonáš Trantina
>
> Consider the following example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <script src="path_to_some_script?param=asd&important=param"></script>
> </h:form>
> {noformat}
> when commandButton is clicked, the form is rerendered and the response looks like this:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <script src="path_to_some_script?param=asd&important=param"></script>
> ]]</ ... >
> {noformat}
> But this is wrong. Because script tag is already in CDATA, so there is no need for XML encoding for '&' entity.
> This further causes script loading to fail (performed by jsf.js), whenever parameters are needed (e.g. portal environment),
> because script is downloaded from {noformat}"path_to_some_script?param=asd&important=param" {noformat}
> instead of {noformat}"path_to_some_script?param=asd&important=param"{noformat}.
> Another very similar issue is when CDATA element is present in a re-rendered fragment. Example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <style type="text/css">
> /* <![CDATA[ */
> .somecssclass {...}
> /* ]] */
> </style>
> </h:form>
> {noformat}
> The AJAX response then looks like so:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <![CDATA[
> ...
> ]]
> ...
> ]]</ ... >
> {noformat}
> And this is incorrect XML, since CDATA cannot contain ']]', so the response is discarded.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13216) PoupPanel doesn't disappear when rendered="false" and rerender it.
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13216?page=com.atlassian.jira.plugin.s... ]
Juraj Húska reassigned RF-13216:
--------------------------------
Assignee: Juraj Húska (was: Pavol Pitonak)
> PoupPanel doesn't disappear when rendered="false" and rerender it.
> ------------------------------------------------------------------
>
> Key: RF-13216
> URL: https://issues.jboss.org/browse/RF-13216
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.3
> Reporter: Takayuki Konishi
> Assignee: Juraj Húska
> Attachments: rf3_3_4-modalpanel.zip, rf4_3_3-popuppanel.zip
>
>
> If you use the richfaces popupPanel in the default domElementAttachment="body" mode it will not disappear under specific conditions.
> {code:xml}
> <h:body title="page 1">
> <a4j:outputPanel id="myPanel">
> <rich:popupPanel domElementAttachment="body" show="true" rendered="#{test.showPopup}">
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}" value="switch off" render="myPanel"/>
> </h:form>
> </rich:popupPanel>
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}" value="switch on" render="myPanel"/>
> </h:form>
> </a4j:outputPanel>
> </h:body>
> {code}
> In Richfaces 3.3.x, on the other hand, there was a component cleanup system ({{memory.js _cleanComponentNodes}}) which was responsible to remove components after ajax calls if the component was removed from the current view.
> Therefore the above example (revert {{popupPanel}} to {{modalPanel}}) works in RF3.3.4.Final.
> Note:
> In case {{domElementAttachment="parent"}}, it will show [the other JSF2 bug|https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790] where the view state was lost, therefore you must click the action button twice to really call the function.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13221) Incorrect XML encoding in AJAX response
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13221?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13221:
-------------------------------
Labels: waiting_on_user (was: )
> Incorrect XML encoding in AJAX response
> ---------------------------------------
>
> Key: RF-13221
> URL: https://issues.jboss.org/browse/RF-13221
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.4
> Reporter: Jonáš Trantina
> Labels: waiting_on_user
>
> Consider the following example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <script src="path_to_some_script?param=asd&important=param"></script>
> </h:form>
> {noformat}
> when commandButton is clicked, the form is rerendered and the response looks like this:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <script src="path_to_some_script?param=asd&important=param"></script>
> ]]</ ... >
> {noformat}
> But this is wrong. Because script tag is already in CDATA, so there is no need for XML encoding for '&' entity.
> This further causes script loading to fail (performed by jsf.js), whenever parameters are needed (e.g. portal environment),
> because script is downloaded from {noformat}"path_to_some_script?param=asd&important=param" {noformat}
> instead of {noformat}"path_to_some_script?param=asd&important=param"{noformat}.
> Another very similar issue is when CDATA element is present in a re-rendered fragment. Example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <style type="text/css">
> /* <![CDATA[ */
> .somecssclass {...}
> /* ]] */
> </style>
> </h:form>
> {noformat}
> The AJAX response then looks like so:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <![CDATA[
> ...
> ]]
> ...
> ]]</ ... >
> {noformat}
> And this is incorrect XML, since CDATA cannot contain ']]', so the response is discarded.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months
[JBoss JIRA] (RF-13221) Incorrect XML encoding in AJAX response
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13221?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13221:
------------------------------------
[~jtrantin] have you tried reproducing this with _vanilla JSF_? ie. remove all references to RichFaces from the project, and see if you get the same behaviour. This will help us narrow down if the problem is in RichFaces or in JSF.
> Incorrect XML encoding in AJAX response
> ---------------------------------------
>
> Key: RF-13221
> URL: https://issues.jboss.org/browse/RF-13221
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.4
> Reporter: Jonáš Trantina
>
> Consider the following example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <script src="path_to_some_script?param=asd&important=param"></script>
> </h:form>
> {noformat}
> when commandButton is clicked, the form is rerendered and the response looks like this:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <script src="path_to_some_script?param=asd&important=param"></script>
> ]]</ ... >
> {noformat}
> But this is wrong. Because script tag is already in CDATA, so there is no need for XML encoding for '&' entity.
> This further causes script loading to fail (performed by jsf.js), whenever parameters are needed (e.g. portal environment),
> because script is downloaded from {noformat}"path_to_some_script?param=asd&important=param" {noformat}
> instead of {noformat}"path_to_some_script?param=asd&important=param"{noformat}.
> Another very similar issue is when CDATA element is present in a re-rendered fragment. Example:
> {noformat}
> <h:form>
> <a4j:commandButton render="@form" value="rerender me"/>
> <style type="text/css">
> /* <![CDATA[ */
> .somecssclass {...}
> /* ]] */
> </style>
> </h:form>
> {noformat}
> The AJAX response then looks like so:
> {noformat}
> <partial-response><changes><update id="someID"><![CDATA[
> ...
> <![CDATA[
> ...
> ]]
> ...
> ]]</ ... >
> {noformat}
> And this is incorrect XML, since CDATA cannot contain ']]', so the response is discarded.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 2 months