Issue Details (XML | Word | Printable)

Key: JAVASERVERFACES_SPEC_PUBLIC-1010
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Ed Burns
Reporter: Ed Burns
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
javaserverfaces-spec-public

inconsistent behavior in state saving when using upper case

Created: 26/May/11 08:36 AM   Updated: 26/May/11 08:54 AM   Resolved: 26/May/11 08:54 AM
Component/s: Documentation: Javadoc, TLDDoc, RenderkitDoc, PDF
Affects Version/s: 2.0, 2.1
Fix Version/s: 2.2

Time Tracking:
Original Estimate: 1 hour
Original Estimate - 1 hour
Remaining Estimate: 1 hour
Remaining Estimate - 1 hour
Time Spent: Not Specified
Time Spent - Not Specified

Issue Links:
Duplicate
 

Tags:
Participants: Ed Burns


 Description  « Hide

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?



Ed Burns added a comment - 26/May/11 08:52 AM

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.


Ed Burns added a comment - 26/May/11 08:54 AM

Committed to spec trunk.

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