Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent behavior in state saving when using upper case #1010

Closed
eclipse-faces-bot opened this issue May 26, 2011 · 8 comments
Closed

inconsistent behavior in state saving when using upper case #1010

eclipse-faces-bot opened this issue May 26, 2011 · 8 comments

Comments

@eclipse-faces-bot
Copy link

There is a description about "Javax.faces.STATE_SAVING_METHOD" in 11.1.3 Application Configuration Parameters saying to use "client" or "server" to specify where state info is saved. When "Client" (that contains upper case) is used, state will be saved on server side though javax.faces.application.StateManager#isSavingStateInClient returns true.
If upper case is not allowed by the specification?

Affected Versions

[2.0, 2.1]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by @edburns

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Issue-Links:
is duplicated by
JAVASERVERFACES-2080

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Committed to Mojarra trunk.

Sending jsf-ri/src/main/java/com/sun/faces/renderkit/ResponseStateManagerImpl.java
Transmitting file data .
Committed revision 9102.

http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1010

Check existing usages of the state saving method parameter to ensure
case insensitivity.

  • javax.faces.application.StateManager.isSavingStateInClient()

public boolean isSavingStateInClient(FacesContext context) {
if (null != savingStateInClient)

{ return savingStateInClient.booleanValue(); }

savingStateInClient = Boolean.FALSE;

String saveStateParam = context.getExternalContext().
getInitParameter(STATE_SAVING_METHOD_PARAM_NAME);
if (saveStateParam != null &&
saveStateParam.equalsIgnoreCase(STATE_SAVING_METHOD_CLIENT))

{ savingStateInClient = Boolean.TRUE; }

return savingStateInClient.booleanValue();
}

  • com.sun.faces.renderkit.ResponseStateManagerImpl
  1. This patch file was generated by NetBeans IDE
  2. It uses platform neutral UTF-8 encoding and \n newlines.
      • Base (BASE)
        +++ Locally Modified (Based On LOCAL)
        @@ -65,7 +65,7 @@
        WebConfiguration webConfig = WebConfiguration.getInstance();
        String stateMode =
        webConfig.getOptionValue(StateSavingMethod);
  • helper = ((StateManager.STATE_SAVING_METHOD_CLIENT.equals(stateMode)

    • helper = ((StateManager.STATE_SAVING_METHOD_CLIENT.equalsIgnoreCase(stateMode)
      ? new ClientSideStateHelper()
      : new ServerSideStateHelper()));
  • usingFacesInWebapps.fm

12.1.3 add this text to the javax.faces.STATE_SAVING_METHOD spec.

When examining the value, the runtime must ignore the case.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Committed to spec trunk.

Sending usingFacesInWebapps.fm
Transmitting file data .
Committed revision 1016.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Thursday, May 26th 2011, 1:54:20 am

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Closing resolved issue out

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1010

@eclipse-faces-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant