Examples of JspWriter


Examples of javax.servlet.jsp.JspWriter

 
    String value = encodeURL(pageContext, _url);

    try {
      if (_var == null) {
        JspWriter out = pageContext.getOut();

        out.print(value);
      }
      else
        CoreSetTag.setValue(pageContext, _var, _scope, value);
    } catch (IOException e) {
      throw new JspException(e);
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

   * Process the tag.
   */
  public int doStartTag()
    throws JspException
  {
    JspWriter jspWriter = null;

    _query.clear();

    PageContextImpl pageContext = (PageContextImpl) this.pageContext;
   
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

    else if (url.indexOf('?') > 0)
      url = url + '&' + _query;
    else
      url = url + '?' + _query;

    JspWriter out = pageContext.getOut();
    if (out instanceof FlushBuffer)
      ((FlushBuffer) out).flushBuffer();
    else
      out.flush();

    if (_contextExpr != null) {
      String context = _contextExpr.evalString(env);

      if (! url.startsWith("/"))
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

          in.setEncoding(encoding);
        }
      }
     
      JspWriter out = pageContext.getOut();

      int ch;
      while ((ch = in.readChar()) >= 0)
        out.print((char) ch);
    } finally {
      is.close();
    }
  }
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

        expect(service.getSupportedWidgetTypes()).andReturn(strings);
        expect(service.render(isA(RegionWidgetWrapper.class), same(context))).andReturn(RENDERED);
        replay(service);

        JspWriter writer = createNiceMock(JspWriter.class);
        writer.print(RENDERED);
        expectLastCall();
        replay(writer);

        expect(pageContext.getOut()).andReturn(writer);
        replay(pageContext);
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

        strings.add(WIDGET_TYPE);

        expect(service.getSupportedWidgetTypes()).andReturn(strings);
        replay(service);

        JspWriter writer = createNiceMock(JspWriter.class);
        writer.print(RENDERED);
        expectLastCall().andThrow(new IOException());
        replay(writer);

        replay(pageContext);
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

        expect(service.getSupportedWidgetTypes()).andReturn(strings);
        scriptManager.registerScriptBlock(anyObject(String.class), anyObject(String.class), anyObject(ScriptLocation.AFTER_RAVE.getClass()), anyObject(RenderScope.CURRENT_REQUEST.getClass()), anyObject(RenderContext.class));
        expectLastCall();
        replay(service, scriptManager);

        JspWriter writer = createNiceMock(JspWriter.class);
        expect(pageContext.getOut()).andReturn(writer);
        replay(pageContext, writer);

        tag.setRegionWidget(regionWidget);
        tag.setWidget(widget);
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

  public void init() {
    log.info("init");
    encodeTag = new EncodeTag();

    sb = new StringBuilder();
    final JspWriter w = new JspWriter(0, false){
      public void newLine() throws IOException {
        throw new UnsupportedOperationException();
      }
      public void print(boolean paramBoolean) throws IOException {
        sb.append(paramBoolean);
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

    @Override
    public int doEndTag() throws JspException {
        SlingHttpServletRequest request = TagUtil.getRequest(pageContext);
        Component component = WCMUtils.getComponent(request.getResource());
        if (componentHelper.isEditMode(request)) {
            JspWriter writer = pageContext.getOut();
            String placeholder;

            String bodyContentString = bodyContent != null ? bodyContent.getString() : null;
            if (StringUtils.isNotBlank(bodyContentString)) {
                // use the body content as the default placeholder
                placeholder = Placeholder.getDefaultPlaceholder(request, component, bodyContentString, getDdClass());
            } else {
                String classicUIPlaceholder = componentHelper.generateClassicUIPlaceholder(getAllClassNames(), null);
                placeholder = Placeholder.getDefaultPlaceholder(request, component, classicUIPlaceholder, getDdClass());
            }

            try {
                writer.print(placeholder);
            } catch (IOException e) {
                throw new JspException(e);
            }

        }
View Full Code Here

Examples of javax.servlet.jsp.JspWriter

        // Find the point.
        DataPointVO dataPointVO = getDataPointVO(view, xid);

        // Write the value into the page.
        JspWriter out = pageContext.getOut();
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

        DataPointRT dataPointRT = Common.runtimeManager.getDataPoint(dataPointVO.getId());
        if (dataPointRT == null)
            write(out, disabledValue);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.