| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.seasar.teeda.core.util; |
| 17 | |
|
| 18 | |
import javax.faces.component.UIViewRoot; |
| 19 | |
import javax.faces.context.FacesContext; |
| 20 | |
import javax.faces.internal.FactoryFinderUtil; |
| 21 | |
import javax.faces.render.RenderKit; |
| 22 | |
import javax.faces.render.RenderKitFactory; |
| 23 | |
import javax.faces.render.ResponseStateManager; |
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
public class ResponseStateManagerUtil { |
| 29 | |
|
| 30 | 0 | private ResponseStateManagerUtil() { |
| 31 | 0 | } |
| 32 | |
|
| 33 | |
public static ResponseStateManager getResponseStateManager( |
| 34 | |
FacesContext context) { |
| 35 | 1 | UIViewRoot viewRoot = context.getViewRoot(); |
| 36 | 1 | String renderKitId = viewRoot.getRenderKitId(); |
| 37 | 1 | return getResponseStateManager(context, renderKitId); |
| 38 | |
} |
| 39 | |
|
| 40 | |
public static ResponseStateManager getResponseStateManager( |
| 41 | |
FacesContext context, String renderKitId) { |
| 42 | 5 | RenderKitFactory factory = FactoryFinderUtil.getRenderKitFactory(); |
| 43 | 5 | RenderKit renderKit = factory.getRenderKit(context, renderKitId); |
| 44 | 5 | return renderKit.getResponseStateManager(); |
| 45 | |
} |
| 46 | |
} |