/** * {@inheritDoc} */ @Override public ViewMetadata getViewMetadata(FacesContext context, String viewId) { checkNull(viewId, "viewId"); return new FaceletViewMetadata(viewId); }
/** * */ public FaceletViewDeclarationLanguage(FacesContext context) { initialize(context); _strategy = new FaceletViewDeclarationLanguageStrategy(); }
public void apply(FaceletContext ctx, UIComponent parent, String nameStr, ValueExpression valueVE) throws IOException, FacesException, FaceletException, ELException { AbstractFaceletContext actx = ((AbstractFaceletContext) ctx); actx.getTemplateContext().setParameter(nameStr, valueVE); if (actx.getTemplateContext().isAllowCacheELExpressions()) { if (ELExpressionCacheMode.strict.equals(actx.getELExpressionCacheMode()) || ELExpressionCacheMode.allowCset.equals(actx.getELExpressionCacheMode())) { actx.getTemplateContext().setAllowCacheELExpressions(false); } } }
/** * {@inheritDoc} */ @Override public StateManagementStrategy getStateManagementStrategy(FacesContext context, String viewId) { // Use partial state saving strategy only if javax.faces.PARTIAL_STATE_SAVING is "true" and // the current view is not on javax.faces.FULL_STATE_SAVING_VIEW_IDS. if (_partialStateSaving && _stateMgmtStrategy == null) { _stateMgmtStrategy = new DefaultFaceletsStateManagementStrategy(); } return _usePartialStateSavingOnThisView(viewId) ? _stateMgmtStrategy : null; }
/** * Check if the section to be processed is being refreshed. * * since 2.1.7, 2.0.13 * @return */ public boolean isRefreshingSection() { return isRefreshingTransientBuild() || (!isBuildingViewMetadata() && isInMetadataSection()); }
/** * {@inheritDoc} */ @Override public void includeFacelet(UIComponent parent, URL absolutePath) throws IOException, FacesException, ELException { _facelet.include(this, parent, absolutePath); }
public void release() { // remove from FacesContext attribute Map setCurrentInstance(null); }
/** * Return an identifier used to derive an unique id per facelet instance. This * value should be the same for viewMetadata and normal facelet instances. * * @return */ public String getFaceletId() { return getAlias(); } }
@Override public boolean isRefreshingTransientBuild() { if (_isRefreshingTransientBuild == null) { _isRefreshingTransientBuild = FaceletViewDeclarationLanguage. isRefreshingTransientBuild(_facesContext); } return _isRefreshingTransientBuild; }
@Override public boolean isUsingPSSOnThisView() { if (_usingPSSOnThisView == null) { _usingPSSOnThisView = FaceletViewDeclarationLanguage. isUsingPSSOnThisView(_facesContext); } return _usingPSSOnThisView; }
@Override public void applyCompositeComponent(UIComponent parent, Resource resource) throws IOException, FaceletException, FacesException, ELException { _facelet.applyCompositeComponent(this, parent, resource); }
@Override public boolean isBuildingViewMetadata() { if (_isBuildingViewMetadata == null) { _isBuildingViewMetadata = FaceletViewDeclarationLanguage. isBuildingViewMetadata(_facesContext); } return _isBuildingViewMetadata; }
@Override public boolean isBuildingCompositeComponentMetadata() { return _facelet.isBuildingCompositeComponentMetadata(); }
@Override public boolean isMarkInitialState() { if (_isMarkInitialState == null) { _isMarkInitialState = FaceletViewDeclarationLanguage. isMarkInitialState(_facesContext); } return _isMarkInitialState; }
/** * {@inheritDoc} */ @Override public ExpressionFactory getExpressionFactory() { return _facelet.getExpressionFactory(); }
private ViewPoolProcessor getViewPoolProcessor(FacesContext context) { if (!initialized) { viewPoolProcessor = ViewPoolProcessor.getInstance(context); initialized = true; } return viewPoolProcessor; } }
protected void clearTransientAndNonFaceletComponentsForStaticView(final FacesContext context, final UIViewRoot root) { // In a static view, clear components that are both transient and non bound to any facelet tag handler // is quite simple. Since the structure of the view is static, there is no need to check component resources. clearTransientAndNonFaceletComponents(context, root); }
/** * {@inheritDoc} */ @Override public ViewMetadata getViewMetadata(FacesContext context, String viewId) { checkNull(context, "facesContext"); checkNull(viewId, "viewId"); return new FaceletViewMetadata(viewId); }
/** * {@inheritDoc} */ @Override public void includeFacelet(UIComponent parent, String relativePath) throws IOException { _facelet.include(this, parent, relativePath); }
/** * {@inheritDoc} */ @Override public void includeFacelet(UIComponent parent, URL absolutePath) throws IOException, FacesException, ELException { _facelet.include(this, parent, absolutePath); }