You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2011/01/04 12:29:47 UTC
[jira] Created: (MYFACES-3009) Flash scope looses values on
redirect
Flash scope looses values on redirect
-------------------------------------
Key: MYFACES-3009
URL: https://issues.apache.org/jira/browse/MYFACES-3009
Project: MyFaces Core
Issue Type: Bug
Components: JSR-314
Affects Versions: 2.0.3
Reporter: Jakob Korherr
Assignee: Jakob Korherr
Example as follows:
1) A facelet called Entry.xhtml
<h:form>
<table>
<tr>
<td>First Name:</td>
<td>
<h:inputText id="fname" value="#{flash.firstName}"required="true"/>
</td>
</tr>
<tr>
<td>Last Name:</td>
<td>
<h:inputText id="lname" value="#{flash.lastName}" required="true"/>
</td>
</tr>
</table
<p><h:commandButton value="Submit" action="confirmation?faces-redirect=true"
/></p>
</h:form>
and the confirmation.xhtml:
<table>
<tr>
<td>First Name:</td>
<td>
<h:outputText value="#{flash.keep.firstName}" />
</td>
</tr>
<tr>
<td>Last Name:</td>
<td>
<h:outputText value="#{flash.keep.lastName}"/>
</td>
</tr>
</table>
<h:form>
<p><h:commandButton value="Confirm" action="finished?faces-redirect=true" /></p>
</h:form>
But when the confirmation page is loaded, the firstName and lastName I submitted
is missing. Why? I am using flash.keep. According to what I read it should
keep the values more than a PRG cycle.
It works if I use Mojarra.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3009) Flash scope looses values on
redirect
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977247#action_12977247 ]
Jakob Korherr commented on MYFACES-3009:
----------------------------------------
Thread on the myfaces user mailing list: http://www.mail-archive.com/users@myfaces.apache.org/msg56758.html
> Flash scope looses values on redirect
> -------------------------------------
>
> Key: MYFACES-3009
> URL: https://issues.apache.org/jira/browse/MYFACES-3009
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.3
> Reporter: Jakob Korherr
> Assignee: Jakob Korherr
>
> Example as follows:
> 1) A facelet called Entry.xhtml
> <h:form>
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:inputText id="fname" value="#{flash.firstName}"required="true"/>
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:inputText id="lname" value="#{flash.lastName}" required="true"/>
> </td>
> </tr>
> </table
> <p><h:commandButton value="Submit" action="confirmation?faces-redirect=true"
> /></p>
> </h:form>
> and the confirmation.xhtml:
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:outputText value="#{flash.keep.firstName}" />
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:outputText value="#{flash.keep.lastName}"/>
> </td>
> </tr>
> </table>
> <h:form>
> <p><h:commandButton value="Confirm" action="finished?faces-redirect=true" /></p>
> </h:form>
> But when the confirmation page is loaded, the firstName and lastName I submitted
> is missing. Why? I am using flash.keep. According to what I read it should
> keep the values more than a PRG cycle.
> It works if I use Mojarra.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MYFACES-3009) Flash scope looses values on
redirect
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated MYFACES-3009:
------------------------------------
Resolution: Fixed
Assignee: Leonardo Uribe (was: Jakob Korherr)
Status: Resolved (was: Patch Available)
> Flash scope looses values on redirect
> -------------------------------------
>
> Key: MYFACES-3009
> URL: https://issues.apache.org/jira/browse/MYFACES-3009
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.3
> Reporter: Jakob Korherr
> Assignee: Leonardo Uribe
> Attachments: MYFACES-3009-1.patch
>
>
> Example as follows:
> 1) A facelet called Entry.xhtml
> <h:form>
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:inputText id="fname" value="#{flash.firstName}"required="true"/>
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:inputText id="lname" value="#{flash.lastName}" required="true"/>
> </td>
> </tr>
> </table
> <p><h:commandButton value="Submit" action="confirmation?faces-redirect=true"
> /></p>
> </h:form>
> and the confirmation.xhtml:
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:outputText value="#{flash.keep.firstName}" />
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:outputText value="#{flash.keep.lastName}"/>
> </td>
> </tr>
> </table>
> <h:form>
> <p><h:commandButton value="Confirm" action="finished?faces-redirect=true" /></p>
> </h:form>
> But when the confirmation page is loaded, the firstName and lastName I submitted
> is missing. Why? I am using flash.keep. According to what I read it should
> keep the values more than a PRG cycle.
> It works if I use Mojarra.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MYFACES-3009) Flash scope looses values on
redirect
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated MYFACES-3009:
------------------------------------
Status: Patch Available (was: Open)
> Flash scope looses values on redirect
> -------------------------------------
>
> Key: MYFACES-3009
> URL: https://issues.apache.org/jira/browse/MYFACES-3009
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.3
> Reporter: Jakob Korherr
> Assignee: Jakob Korherr
> Attachments: MYFACES-3009-1.patch
>
>
> Example as follows:
> 1) A facelet called Entry.xhtml
> <h:form>
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:inputText id="fname" value="#{flash.firstName}"required="true"/>
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:inputText id="lname" value="#{flash.lastName}" required="true"/>
> </td>
> </tr>
> </table
> <p><h:commandButton value="Submit" action="confirmation?faces-redirect=true"
> /></p>
> </h:form>
> and the confirmation.xhtml:
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:outputText value="#{flash.keep.firstName}" />
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:outputText value="#{flash.keep.lastName}"/>
> </td>
> </tr>
> </table>
> <h:form>
> <p><h:commandButton value="Confirm" action="finished?faces-redirect=true" /></p>
> </h:form>
> But when the confirmation page is loaded, the firstName and lastName I submitted
> is missing. Why? I am using flash.keep. According to what I read it should
> keep the values more than a PRG cycle.
> It works if I use Mojarra.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3009) Flash scope looses values on
redirect
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981939#action_12981939 ]
Jakob Korherr commented on MYFACES-3009:
----------------------------------------
No objections on my side!
It seems like a hack at first sight, but I agree that this is better than having to rely on FlashImpl internals!
> Flash scope looses values on redirect
> -------------------------------------
>
> Key: MYFACES-3009
> URL: https://issues.apache.org/jira/browse/MYFACES-3009
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.3
> Reporter: Jakob Korherr
> Assignee: Jakob Korherr
> Attachments: MYFACES-3009-1.patch
>
>
> Example as follows:
> 1) A facelet called Entry.xhtml
> <h:form>
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:inputText id="fname" value="#{flash.firstName}"required="true"/>
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:inputText id="lname" value="#{flash.lastName}" required="true"/>
> </td>
> </tr>
> </table
> <p><h:commandButton value="Submit" action="confirmation?faces-redirect=true"
> /></p>
> </h:form>
> and the confirmation.xhtml:
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:outputText value="#{flash.keep.firstName}" />
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:outputText value="#{flash.keep.lastName}"/>
> </td>
> </tr>
> </table>
> <h:form>
> <p><h:commandButton value="Confirm" action="finished?faces-redirect=true" /></p>
> </h:form>
> But when the confirmation page is loaded, the firstName and lastName I submitted
> is missing. Why? I am using flash.keep. According to what I read it should
> keep the values more than a PRG cycle.
> It works if I use Mojarra.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-3009) Flash scope looses values on
redirect
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980431#action_12980431 ]
Leonardo Uribe commented on MYFACES-3009:
-----------------------------------------
Attached to this mail there is a patch for this issue. After doing some step-by-step on the example, I notice we are not calling elContext.setPropertyResolved(true) when flash.keep is used, and in this specific case, the value to be promoted is not on request map, so we are not returning it correctly.
It is weird that flash.keep() method does not return the value. I would like to have a simple method for this one instead do a workaround through request map, but I think it is the most simple solution we have without introduce some coupling between FlashELResolver and FlashImpl.
If no objections, I'll commit this patch soon.
> Flash scope looses values on redirect
> -------------------------------------
>
> Key: MYFACES-3009
> URL: https://issues.apache.org/jira/browse/MYFACES-3009
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.3
> Reporter: Jakob Korherr
> Assignee: Jakob Korherr
> Attachments: MYFACES-3009-1.patch
>
>
> Example as follows:
> 1) A facelet called Entry.xhtml
> <h:form>
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:inputText id="fname" value="#{flash.firstName}"required="true"/>
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:inputText id="lname" value="#{flash.lastName}" required="true"/>
> </td>
> </tr>
> </table
> <p><h:commandButton value="Submit" action="confirmation?faces-redirect=true"
> /></p>
> </h:form>
> and the confirmation.xhtml:
> <table>
> <tr>
> <td>First Name:</td>
> <td>
> <h:outputText value="#{flash.keep.firstName}" />
> </td>
> </tr>
> <tr>
> <td>Last Name:</td>
> <td>
> <h:outputText value="#{flash.keep.lastName}"/>
> </td>
> </tr>
> </table>
> <h:form>
> <p><h:commandButton value="Confirm" action="finished?faces-redirect=true" /></p>
> </h:form>
> But when the confirmation page is loaded, the firstName and lastName I submitted
> is missing. Why? I am using flash.keep. According to what I read it should
> keep the values more than a PRG cycle.
> It works if I use Mojarra.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.