Package pl.zgora.uz.wmie.fe.gui.common.tag

Source Code of pl.zgora.uz.wmie.fe.gui.common.tag.ColumnLabel

package pl.zgora.uz.wmie.fe.gui.common.tag;

import java.io.Writer;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;

import pl.zgora.uz.wmie.fe.gui.common.util.ColumnLabelsUtil;

public class ColumnLabel implements Tag {
  private PageContext pageContext;
  private Tag parent;
  private String id;
  private String source;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getSource() {
    return source;
  }

  public void setSource(String source) {
    this.source = source;
  }

  @Override
  public int doEndTag() throws JspException {
    return SKIP_BODY;
  }

  @Override
  public int doStartTag() throws JspException {
    try {
      ColumnLabelsUtil label = new ColumnLabelsUtil();
      Writer out = pageContext.getOut();
      // System.out.print("poszlo");
      out.write(label.getLabelByName(id, source));
      // out.write("TEST");
    } catch (Exception e) {
      throw new JspTagException("IO Error: " + e.getMessage());
    }
    return SKIP_BODY;
  }

  @Override
  public Tag getParent() {
    return parent;
  }

  @Override
  public void release() {

  }

  @Override
  public void setPageContext(PageContext arg0) {
    this.pageContext = arg0;

  }

  @Override
  public void setParent(Tag arg0) {
    this.parent = arg0;

  }
}
TOP

Related Classes of pl.zgora.uz.wmie.fe.gui.common.tag.ColumnLabel

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.