Package com.caucho.jsp

Examples of com.caucho.jsp.PageContextImpl$PageELContext


   * Process the tag.
   */
  public int doStartTag()
    throws JspException
  {
    PageContextImpl pc = (PageContextImpl) pageContext;

    Locale locale = null;

    if (_value == null || "".equals(_value)) {
    }
    else if (_value instanceof Locale) {
      locale = (Locale) _value;
    }
    else if (_value instanceof String) {
      locale = pc.getLocale((String) _value, _variant);
    }

    if (locale == null)
      locale = Locale.getDefault();

View Full Code Here


   * Process the tag.
   */
  public int doStartTag()
    throws JspException
  {
    PageContextImpl pc = (PageContextImpl) pageContext;

    _oldBundle = pc.getAttribute("caucho.bundle");
    _oldPrefix = pc.getAttribute("caucho.bundle.prefix");
   
    LocalizationContext bundle = pc.getBundle(_basename);

    Locale locale = bundle.getLocale();

    if (locale != null)
      setResponseLocale(pageContext, locale);

    pc.setAttribute("caucho.bundle", bundle);

    if (_prefix != null)
      pc.setAttribute("caucho.bundle.prefix", _prefix);
    else if (_oldPrefix != null)
      pc.removeAttribute("caucho.bundle.prefix");

    return EVAL_BODY_INCLUDE;
  }
View Full Code Here

  private TimeZone getTimeZone()
    throws ELException
  {
    if (_timeZoneExpr != null) {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
      Object timeZoneObj = _timeZoneExpr.evalObject(pageContext.getELContext());

      TimeZone zone = getTimeZone(timeZoneObj);
      if (zone != null)
        return zone;
    }

    Object timeZoneObj = pageContext.getAttribute("com.caucho.time-zone");

    if (timeZoneObj != null)
      return (TimeZone) timeZoneObj;
   
    timeZoneObj = Config.find(pageContext, Config.FMT_TIME_ZONE);
View Full Code Here

   */
  public int doStartTag()
    throws JspException
  {
    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;

      JspWriter out = pageContext.getOut();

      boolean doEscape = (_escapeXml == null ||
                          _escapeXml.evalBoolean(pageContext.getELContext()));

      toStream(out, pageContext, _select, doEscape);
    }
    catch (RuntimeException e) {
      throw e;
View Full Code Here

   */
  public int doStartTag()
    throws JspException
  {
    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
     
      Object value = evalObject(pageContext, _select);

      CoreSetTag.setValue(pageContext, _var, _scope, value);
    } catch (JspException e) {
View Full Code Here

   */
  public int doStartTag()
    throws JspException
  {
    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
   
      boolean test = _testExpr.evalBoolean(pageContext.getELContext());
      Boolean value = test ? Boolean.TRUE : Boolean.FALSE;

      if (_var == null) {
      }
      else
View Full Code Here

   */
  public int doEndTag()
    throws JspException
  {
    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
     
      JspWriter out = pageContext.getOut();

      String string;

      if (_valueExpr != null)
        string = _valueExpr.evalString(pageContext.getELContext());
      else
        string = bodyContent.getString().trim();
     
      DateFormat format = getFormat();

View Full Code Here

  }

  protected DateFormat getFormat()
    throws JspException, ELException
  {
    PageContextImpl pageContext = (PageContextImpl) this.pageContext;
    ELContext env = pageContext.getELContext();
   
    DateFormat format = null;
    Locale locale = null;

    if (_parseLocaleExpr != null) {
      Object localeObj = _parseLocaleExpr.evalObject(env);

      if (localeObj instanceof Locale)
        locale = (Locale) localeObj;
      else if (localeObj instanceof String)
        locale = pageContext.getLocale((String) localeObj, null);
    }
   
    if (locale == null)
      locale = pageContext.getLocale();

    String type = null;

    if (_typeExpr != null)
      type = _typeExpr.evalString(env);
View Full Code Here

  {
    try {
      if (_valueExpr == null)
        return EVAL_BODY_BUFFERED;

      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
      ELContext env = pageContext.getELContext();
   
      String name = _nameExpr.evalString(env);
      String value = _valueExpr.evalString(env);

      Object parent = getParent();
View Full Code Here

      if (this.bodyContent != null)
        value = this.bodyContent.getString().trim();
      else
        value = "";
   
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
   
      String name = _nameExpr.evalString(pageContext.getELContext());

      Object parent = getParent();
      if (! (parent instanceof NameValueTag))
        throw new JspException(L.l("c:param requires c:url or c:import parent."));
View Full Code Here

TOP

Related Classes of com.caucho.jsp.PageContextImpl$PageELContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.