You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Thomas Fischer (JIRA)" <de...@myfaces.apache.org> on 2007/10/11 09:54:50 UTC

[jira] Created: (TOMAHAWK-1128) Sandbox & myfaces 1.2: browser back button does not work

Sandbox & myfaces 1.2: browser back button does not work
--------------------------------------------------------

                 Key: TOMAHAWK-1128
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1128
             Project: MyFaces Tomahawk
          Issue Type: Bug
    Affects Versions: 1.1.6
         Environment: myfaces 1.2.0, server-side state saving
            Reporter: Thomas Fischer


In the faces-config.xml of the sandbox jar, the standard renderer for the html form is overridden:
#begin snip from META-INF/faces-config.xml in tomahawk-sandbox.jar
<!-- extended standard renderers -->
<renderer>
   <component-family>javax.faces.Form</component-family>
   <renderer-type>javax.faces.Form</renderer-type>
   <renderer-class>org.apache.myfaces.renderkit.html.ext.HtmlFormRenderer</renderer-class>
</renderer>
#end snip from META-INF/faces-config.xml in tomahawk-sandbox.jar

This makes the sandbox jar practically inusable with any faces 1.2 implementation and server-side state saving, as the token for identifying the state to deserialize after a postback is not rendered by the tomahawk-sandbox renderer. This leads to ViewExpiredExceptions when pressing the back button an re-submitting an already submitted form.

Apart from this specific misbehaviour, personally I think it is good style to leave the choice to the user whether he wants to override the standard behaviour or not. There might be people who want to retain standard behaviour but still want to use some sandbox components.

My suggested solution would be to remove the above snippet from the sandboxes faces-config.xml. Then, the user can override standard behaviour in his own faces-config.xml if he wishes to do so. 
Additionally, an extra form component+tag could be created for the sandbox form renderer.

If the myfaces developers think the addition of a custom component + rendere would be a good thing, I'd offer to write a patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.