@Override public boolean canRead(EvaluationContext context, @Nullable Object target, String name) throws AccessException { return (target == null && (resolveImplicitVariable(name) != null || this.pageContext.findAttribute(name) != null)); }
@Override public boolean canRead(EvaluationContext context, @Nullable Object target, String name) throws AccessException { return (target == null && (resolveImplicitVariable(name) != null || this.pageContext.findAttribute(name) != null)); }
@Override public TypedValue read(EvaluationContext context, @Nullable Object target, String name) throws AccessException { Object implicitVar = resolveImplicitVariable(name); if (implicitVar != null) { return new TypedValue(implicitVar); } return new TypedValue(this.pageContext.findAttribute(name)); }
@Override public TypedValue read(EvaluationContext context, @Nullable Object target, String name) throws AccessException { Object implicitVar = resolveImplicitVariable(name); if (implicitVar != null) { return new TypedValue(implicitVar); } return new TypedValue(this.pageContext.findAttribute(name)); }
PageContext ctxt = (PageContext) context.getContext(JspContext.class); return ctxt.findAttribute(attribute);
public TemplateModel get(String key) throws TemplateModelException { Object bean = scope == ANY_SCOPE ? pageContext.findAttribute(key) : pageContext.getAttribute(key, scope); return BeansWrapper.getDefaultInstance().wrap(bean); }
PageContext ctxt = (PageContext) context.getContext(JspContext.class); Object value = ctxt.findAttribute(attribute);
/** * Returns <code>pageContext.findAttribute(property)</code>. * @param pageContext to search * @param property name * @return Object value */ public Object getProperty(Object pageContext, String property) { return ((PageContext) pageContext).findAttribute(property); }
/** * Retrieves the bundle cached in the page by a previous call to * getBundle(PageContext,String). This is used by the MessageTag since * the bundle name is provided once, by the BundleTag. * @return java.util.ResourceBundle the cached bundle */ static public ResourceBundle getBundle(PageContext pageContext) { return (ResourceBundle)pageContext.findAttribute(BUNDLE_REQUEST_KEY); }
protected Collection getRulesForCommand() { Collection rules = (Collection) pageContext.findAttribute(VALANG_RULES_KEY_PREFIX + commandName); Assert.notNull(rules, "No valang rules for command '" + commandName + "' were found in the page context."); return rules; }
public static Object find(PageContext pageContext, String name) { Object object = pageContext.findAttribute(name); if (object != null) return object; return pageContext.getServletContext().getInitParameter(name); }
public Object lookupVariable(String name) { Object result = delegate.lookupVariable(name); if (result == null) { result = pageContext.findAttribute(name); } return result; } }
protected final Locale getLocale() { if (localeRef != null) { locale = (Locale)pageContext.findAttribute(localeRef); } if (locale == null) { locale = createLocale(); } return locale; }
public String getTheme() { // If theme set is not explicitly given, // try to find attribute which states the theme set to use if ((theme == null) || (theme == "")) { theme = (String) pageContext.findAttribute("theme"); } // Default template set if ((theme == null) || (theme == "")) { theme = Configuration.getString("webwork.ui.theme"); } return theme; }
/** * {@inheritDoc} */ @Override public int doStartTag() throws JspException { final FormWrapperFactory formWrapperFactory = (FormWrapperFactory) pageContext .findAttribute(ATTR_FORM_WRAPPER_FACTORY); this.formWrapper = formWrapperFactory.create(this.value); return EVAL_BODY_BUFFERED; }
private String getPutContents(PageContext pageContext) { String putContents = (String) pageContext.findAttribute(getBlockContentsAttributeName(name)); if (putContents == null) { return ""; } return putContents; } }
@Override public int doEndTag() throws JspException { if (StringUtils.isEmpty(name)) throw new JspException("Illegal node parameter!!!"); Object obj = pageContext.findAttribute(name); if (obj instanceof XMLNode) ((XMLNode) obj).write(pageContext.getOut(), 0); else throw new JspException("XMLNode " + name + " not founded in page context"); return SKIP_BODY; } }
private String createCollectionPages() throws JspException { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); StringBuilder stringBuilder = new StringBuilder(); final int lastPage = ((Integer) pageContext.findAttribute(getNumberOfPagesAttributeName())).intValue(); final int pageNumber = ((Integer) pageContext.findAttribute(getPageNumberAttributeName())).intValue(); addFirstSymbols(stringBuilder, request, pageNumber); generatePageNumbers(stringBuilder, request, lastPage, pageNumber); addLastSymbols(stringBuilder, request, lastPage, pageNumber); return stringBuilder.toString(); }
public String writeInstitutionTree() { StringBuilder buffer = new StringBuilder(); Unit unit = (Unit) pageContext.findAttribute(this.getInitialUnit()); YearMonthDay currentDate = new YearMonthDay(); buffer.append("<ul class='padding1 nobullet'>"); getSubUnitsList(unit, null, buffer, currentDate, this.getUnitParamName(), this.getPath()); buffer.append("</ul>"); return buffer.toString(); }
public TemplateModel get(String key) throws TemplateModelException { Object bean = scope == ANY_SCOPE ? pageContext.findAttribute(key) : pageContext.getAttribute(key, scope); return BeansWrapper.getDefaultInstance().wrap(bean); }