// Decompiled by DJ v3.0.0.63 Copyright 2002 Atanas Neshkov  Date: 29/09/2006 14:23:07

// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!

// Decompiler options: packimports(3) 

// Source File Name:   Q70ListasEnlazadasTag.java



package q02b.tag;



import es.ejie.frmk.infraestructura.traza.Q70TraceLevel;

import es.ejie.frmk.infraestructura.traza.Q70Traza;



import es.ejie.frmk.presentacion.iu.taglib.html.Q70BaseHandlerTag;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.jsp.JspException;

//import javax.servlet.jsp.PageContext;

import org.apache.struts.util.RequestUtils;

import org.apache.struts.util.ResponseUtils;



import q02b.exe.utils.Q02bFormatData;



public class Q02bCombo extends Q70BaseHandlerTag

{

	 	protected static final String COMPONENTE = "COMBO_TAG";

	 	private static Q70Traza tr = Q70Traza.getSingleton();

	 	//Campos obligatorios

	 	private String 	javascriptCallerFunc;

	 	private String 	formName;

	 	private String 	sourceTag;

	 	private String 	targetTag;

	 	private String 	table;

	 	private String 	valueColumn;

	 	private String 	labelColumn;

	 	private String 	predicateColumn;

	 	private String 	modulo;

	 	//Campos opcionales

	    private boolean predicateColumnNumeric;

	    private String 	whereClause;

	    private String 	orderByClause;

	    private String 	ordenOrderBy;

	    private String 	separador;

	    

	    public Q02bCombo()

	    {

	    	//Campos obligatorios

	        javascriptCallerFunc 	= null;

	        formName 				= null;

	        sourceTag 				= "";

	        targetTag 				= "";

	        table 					= null;

	        valueColumn 			= null;

	        labelColumn 			= null;

	        predicateColumn 		= null;

	        modulo			 		= null;

	        //Campos opcionales

	        predicateColumnNumeric 	= true;

	        whereClause	 			= null;	        	     

	        orderByClause 			= "";

	        ordenOrderBy			= "";

	        separador				= "";

	    }



	    //MÉTODOS GET Y SET

	    //Campos obligatorios

	    public String getJavascriptCallerFunc(){

	        return javascriptCallerFunc;

	    }

	    public void setJavascriptCallerFunc(String s){

	        javascriptCallerFunc = s;

	    }

	    public String getFormName(){

	        return formName;

	    }

	    public void setFormName(String s){

	        formName = s;

	    }

	    public String getSourceTag(){

	        return sourceTag;

	    }

	    public void setSourceTag(String s){

	        sourceTag = s;

	    }

	    public String getTargetTag(){

	        return targetTag;

	    }

	    public void setTargetTag(String s){

	        targetTag = s;

	    }

	    public String getTable(){

	        return table;

	    }

	    public void setTable(String s){

	        table = s;

	    }

	    public String getValueColumn(){

	        return valueColumn;

	    }

	    public void setValueColumn(String s){

	        valueColumn = s;

	    }

	    public String getLabelColumn(){

	        return labelColumn;

	    }

	    public void setLabelColumn(String s){

	        labelColumn = s;

	    }

	    public String getPredicateColumn(){

	        return predicateColumn;

	    }

	    public void setPredicateColumn(String s){

	        predicateColumn = s;

	    }

	    public String getModulo(){

	        return modulo;

	    }

	    public void setModulo(String s){

	    	modulo = s;

	    }

	    //Campos opcionales	    	    	  

	    public boolean getPredicateColumnNumeric(){

	        return predicateColumnNumeric;

	    }

	    public void setPredicateColumnNumeric(boolean flag){

	        predicateColumnNumeric = flag;

	    }

	    public String getWhereClause() {

			return whereClause;

		}

		public void setWhereClause(String whereClause) {

			this.whereClause = whereClause;

		}

	    public String getOrderByClause(){

	        return orderByClause;

	    }

	    public void setOrderByClause(String s){

	    	orderByClause = s;

	    }

	    public String getOrdenOrderBy(){

	        return ordenOrderBy;

	    }

	    public void setOrdenOrderBy(String s){

	    	ordenOrderBy = s;

	    }

	    public String getSeparador(){

	        return separador;

	    }

	    public void setSeparador(String s){

	    	separador = s;

	    }



	    public int doStartTag()

	        throws JspException

	    {

	        if(tr.isTraceActive()){

	            tr.trace("COMBO_TAG", Q70TraceLevel.DEBUG, "Generando tag de tipo " + getClass().toString());
            }
	        return 1;

	    }



	    public int doEndTag()

	        throws JspException

	    {

	        verifyAtributes();

	        String s = Q02bJavascriptUtils.renderComboHtmlCode((HttpServletRequest)pageContext.getRequest(), this);

	        ResponseUtils.write(pageContext, s);

	        super.putBridgeCounter();

	        return 6;

	    }



	    public void release()

	    {

	        super.release();

	    }



	    private void verifyAtributes()

	        throws JspException

	    {

	        if(Q02bFormatData.esVacio(this.javascriptCallerFunc))

	        {

	            JspException jspexception = new JspException("Debe especificar un valor para el atrito javascriptCallerFunc.");

	            RequestUtils.saveException(pageContext, jspexception);

	            throw jspexception;

	        }

	        if(Q02bFormatData.esVacio(this.formName))

	        {

	            JspException jspexception1 = new JspException("Debe especificar un valor para el atributo formName.");

	            RequestUtils.saveException(pageContext, jspexception1);

	            throw jspexception1;

	        }

	        if(Q02bFormatData.esVacio(this.sourceTag))

	        {

	            JspException jspexception2 = new JspException("Debe especificar un valor para el atributo sourceTag.");

	            RequestUtils.saveException(pageContext, jspexception2);

	            throw jspexception2;

	        } 

	        if(Q02bFormatData.esVacio(this.targetTag))

	        {

	            JspException jspexception2 = new JspException("Debe especificar un valor para el atributo targetTag.");

	            RequestUtils.saveException(pageContext, jspexception2);

	            throw jspexception2;

	        }

	        if(Q02bFormatData.esVacio(this.table))

	        {

	            JspException jspexception2 = new JspException("Debe especificar un valor para el atributo table.");

	            RequestUtils.saveException(pageContext, jspexception2);

	            throw jspexception2;

	        }

	        if(Q02bFormatData.esVacio(this.valueColumn))

	        {

	            JspException jspexception2 = new JspException("Debe especificar un valor para el atributo valueColumn.");

	            RequestUtils.saveException(pageContext, jspexception2);

	            throw jspexception2;

	        }

	        if(Q02bFormatData.esVacio(this.labelColumn))

	        {

	            JspException jspexception2 = new JspException("Debe especificar un valor para el atributo labelColumn.");

	            RequestUtils.saveException(pageContext, jspexception2);

	            throw jspexception2;

	        }

	        if(Q02bFormatData.esVacio(this.predicateColumn))

	        {

	            JspException jspexception2 = new JspException("Debe especificar un valor para el atributo predicateColumn.");

	            RequestUtils.saveException(pageContext, jspexception2);

	            throw jspexception2;

	        }

	        if(Q02bFormatData.esVacio(this.modulo))

	        {

	            JspException jspexception2 = new JspException("Debe especificar un valor para el atributo modulo.");

	            RequestUtils.saveException(pageContext, jspexception2);

	            throw jspexception2;

	        }

	    }	

}