Skip to content

Commit

Permalink
Fix jakartaee/faces#1999: default of STATE_SAVING_METHOD is "server"
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Jan 25, 2025
1 parent e3a8563 commit d08f227
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@

import java.io.IOException;

import com.sun.faces.renderkit.RenderKitUtils.PredefinedPostbackParameter;
import com.sun.faces.util.RequestStateManager;

import jakarta.faces.FacesException;
import jakarta.faces.annotation.FacesConfig.ContextParam;
import jakarta.faces.application.StateManager.StateSavingMethod;
import jakarta.faces.context.FacesContext;
import jakarta.faces.render.ResponseStateManager;

import com.sun.faces.renderkit.RenderKitUtils.PredefinedPostbackParameter;
import com.sun.faces.util.RequestStateManager;

/**
* <p>
* A <code>ResonseStateManager</code> implementation for the default HTML render kit.
Expand All @@ -38,7 +39,7 @@ public class ResponseStateManagerImpl extends ResponseStateManager {

public ResponseStateManagerImpl() {
FacesContext context = FacesContext.getCurrentInstance();
helper = ContextParam.STATE_SAVING_METHOD.isDefault(context) ? new ClientSideStateHelper() : new ServerSideStateHelper();
helper = ContextParam.STATE_SAVING_METHOD.getValue(context) == StateSavingMethod.CLIENT ? new ClientSideStateHelper() : new ServerSideStateHelper();
}

// --------------------------------------- Methods from ResponseStateManager
Expand Down

0 comments on commit d08f227

Please sign in to comment.