Save This Page
Home » Mojarra-2.0.1 » com.sun » faces » taglib » html_basic » [javadoc | source]
    1   /*
    2    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    3    * 
    4    * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    5    * 
    6    * The contents of this file are subject to the terms of either the GNU
    7    * General Public License Version 2 only ("GPL") or the Common Development
    8    * and Distribution License("CDDL") (collectively, the "License").  You
    9    * may not use this file except in compliance with the License. You can obtain
   10    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   11    * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
   12    * language governing permissions and limitations under the License.
   13    * 
   14    * When distributing the software, include this License Header Notice in each
   15    * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
   16    * Sun designates this particular file as subject to the "Classpath" exception
   17    * as provided by Sun in the GPL Version 2 section of the License file that
   18    * accompanied this code.  If applicable, add the following below the License
   19    * Header, with the fields enclosed by brackets [] replaced by your own
   20    * identifying information: "Portions Copyrighted [year]
   21    * [name of copyright owner]"
   22    * 
   23    * Contributor(s):
   24    * 
   25    * If you wish your version of this file to be governed by only the CDDL or
   26    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   27    * elects to include this software in this distribution under the [CDDL or GPL
   28    * Version 2] license."  If you don't indicate a single choice of license, a
   29    * recipient has the option to distribute your version of this file under
   30    * either the CDDL, the GPL Version 2 or to extend the choice of license to
   31    * its licensees as provided above.  However, if you add GPL Version 2 code
   32    * and therefore, elected the GPL Version 2 license, then the option applies
   33    * only if the new code is made subject to such option by the copyright
   34    * holder.
   35    */
   36   
   37   package com.sun.faces.taglib.html_basic;
   38   
   39   import com.sun.faces.util.Util;
   40   import java.io.IOException;
   41   import javax.el;
   42   import javax.faces;
   43   import javax.faces.component;
   44   import javax.faces.context;
   45   import javax.faces.convert;
   46   import javax.faces.el;
   47   import javax.faces.event;
   48   import javax.faces.validator;
   49   import javax.faces.webapp;
   50   import javax.servlet.jsp.JspException;
   51   
   52   
   53   /*
   54    * ******* GENERATED CODE - DO NOT EDIT *******
   55    */
   56   
   57   
   58   public class InputTextTag extends UIComponentELTag {
   59   
   60   
   61       // Setter Methods
   62       // PROPERTY: converter
   63       private javax.el.ValueExpression converter;
   64       public void setConverter(javax.el.ValueExpression converter) {
   65           this.converter = converter;
   66       }
   67   
   68       // PROPERTY: converterMessage
   69       private javax.el.ValueExpression converterMessage;
   70       public void setConverterMessage(javax.el.ValueExpression converterMessage) {
   71           this.converterMessage = converterMessage;
   72       }
   73   
   74       // PROPERTY: immediate
   75       private javax.el.ValueExpression immediate;
   76       public void setImmediate(javax.el.ValueExpression immediate) {
   77           this.immediate = immediate;
   78       }
   79   
   80       // PROPERTY: required
   81       private javax.el.ValueExpression required;
   82       public void setRequired(javax.el.ValueExpression required) {
   83           this.required = required;
   84       }
   85   
   86       // PROPERTY: requiredMessage
   87       private javax.el.ValueExpression requiredMessage;
   88       public void setRequiredMessage(javax.el.ValueExpression requiredMessage) {
   89           this.requiredMessage = requiredMessage;
   90       }
   91   
   92       // PROPERTY: validator
   93       private javax.el.MethodExpression validator;
   94       public void setValidator(javax.el.MethodExpression validator) {
   95           this.validator = validator;
   96       }
   97   
   98       // PROPERTY: validatorMessage
   99       private javax.el.ValueExpression validatorMessage;
  100       public void setValidatorMessage(javax.el.ValueExpression validatorMessage) {
  101           this.validatorMessage = validatorMessage;
  102       }
  103   
  104       // PROPERTY: value
  105       private javax.el.ValueExpression value;
  106       public void setValue(javax.el.ValueExpression value) {
  107           this.value = value;
  108       }
  109   
  110       // PROPERTY: valueChangeListener
  111       private javax.el.MethodExpression valueChangeListener;
  112       public void setValueChangeListener(javax.el.MethodExpression valueChangeListener) {
  113           this.valueChangeListener = valueChangeListener;
  114       }
  115   
  116       // PROPERTY: accesskey
  117       private javax.el.ValueExpression accesskey;
  118       public void setAccesskey(javax.el.ValueExpression accesskey) {
  119           this.accesskey = accesskey;
  120       }
  121   
  122       // PROPERTY: alt
  123       private javax.el.ValueExpression alt;
  124       public void setAlt(javax.el.ValueExpression alt) {
  125           this.alt = alt;
  126       }
  127   
  128       // PROPERTY: autocomplete
  129       private javax.el.ValueExpression autocomplete;
  130       public void setAutocomplete(javax.el.ValueExpression autocomplete) {
  131           this.autocomplete = autocomplete;
  132       }
  133   
  134       // PROPERTY: dir
  135       private javax.el.ValueExpression dir;
  136       public void setDir(javax.el.ValueExpression dir) {
  137           this.dir = dir;
  138       }
  139   
  140       // PROPERTY: disabled
  141       private javax.el.ValueExpression disabled;
  142       public void setDisabled(javax.el.ValueExpression disabled) {
  143           this.disabled = disabled;
  144       }
  145   
  146       // PROPERTY: label
  147       private javax.el.ValueExpression label;
  148       public void setLabel(javax.el.ValueExpression label) {
  149           this.label = label;
  150       }
  151   
  152       // PROPERTY: lang
  153       private javax.el.ValueExpression lang;
  154       public void setLang(javax.el.ValueExpression lang) {
  155           this.lang = lang;
  156       }
  157   
  158       // PROPERTY: maxlength
  159       private javax.el.ValueExpression maxlength;
  160       public void setMaxlength(javax.el.ValueExpression maxlength) {
  161           this.maxlength = maxlength;
  162       }
  163   
  164       // PROPERTY: onblur
  165       private javax.el.ValueExpression onblur;
  166       public void setOnblur(javax.el.ValueExpression onblur) {
  167           this.onblur = onblur;
  168       }
  169   
  170       // PROPERTY: onchange
  171       private javax.el.ValueExpression onchange;
  172       public void setOnchange(javax.el.ValueExpression onchange) {
  173           this.onchange = onchange;
  174       }
  175   
  176       // PROPERTY: onclick
  177       private javax.el.ValueExpression onclick;
  178       public void setOnclick(javax.el.ValueExpression onclick) {
  179           this.onclick = onclick;
  180       }
  181   
  182       // PROPERTY: ondblclick
  183       private javax.el.ValueExpression ondblclick;
  184       public void setOndblclick(javax.el.ValueExpression ondblclick) {
  185           this.ondblclick = ondblclick;
  186       }
  187   
  188       // PROPERTY: onfocus
  189       private javax.el.ValueExpression onfocus;
  190       public void setOnfocus(javax.el.ValueExpression onfocus) {
  191           this.onfocus = onfocus;
  192       }
  193   
  194       // PROPERTY: onkeydown
  195       private javax.el.ValueExpression onkeydown;
  196       public void setOnkeydown(javax.el.ValueExpression onkeydown) {
  197           this.onkeydown = onkeydown;
  198       }
  199   
  200       // PROPERTY: onkeypress
  201       private javax.el.ValueExpression onkeypress;
  202       public void setOnkeypress(javax.el.ValueExpression onkeypress) {
  203           this.onkeypress = onkeypress;
  204       }
  205   
  206       // PROPERTY: onkeyup
  207       private javax.el.ValueExpression onkeyup;
  208       public void setOnkeyup(javax.el.ValueExpression onkeyup) {
  209           this.onkeyup = onkeyup;
  210       }
  211   
  212       // PROPERTY: onmousedown
  213       private javax.el.ValueExpression onmousedown;
  214       public void setOnmousedown(javax.el.ValueExpression onmousedown) {
  215           this.onmousedown = onmousedown;
  216       }
  217   
  218       // PROPERTY: onmousemove
  219       private javax.el.ValueExpression onmousemove;
  220       public void setOnmousemove(javax.el.ValueExpression onmousemove) {
  221           this.onmousemove = onmousemove;
  222       }
  223   
  224       // PROPERTY: onmouseout
  225       private javax.el.ValueExpression onmouseout;
  226       public void setOnmouseout(javax.el.ValueExpression onmouseout) {
  227           this.onmouseout = onmouseout;
  228       }
  229   
  230       // PROPERTY: onmouseover
  231       private javax.el.ValueExpression onmouseover;
  232       public void setOnmouseover(javax.el.ValueExpression onmouseover) {
  233           this.onmouseover = onmouseover;
  234       }
  235   
  236       // PROPERTY: onmouseup
  237       private javax.el.ValueExpression onmouseup;
  238       public void setOnmouseup(javax.el.ValueExpression onmouseup) {
  239           this.onmouseup = onmouseup;
  240       }
  241   
  242       // PROPERTY: onselect
  243       private javax.el.ValueExpression onselect;
  244       public void setOnselect(javax.el.ValueExpression onselect) {
  245           this.onselect = onselect;
  246       }
  247   
  248       // PROPERTY: readonly
  249       private javax.el.ValueExpression readonly;
  250       public void setReadonly(javax.el.ValueExpression readonly) {
  251           this.readonly = readonly;
  252       }
  253   
  254       // PROPERTY: size
  255       private javax.el.ValueExpression size;
  256       public void setSize(javax.el.ValueExpression size) {
  257           this.size = size;
  258       }
  259   
  260       // PROPERTY: style
  261       private javax.el.ValueExpression style;
  262       public void setStyle(javax.el.ValueExpression style) {
  263           this.style = style;
  264       }
  265   
  266       // PROPERTY: styleClass
  267       private javax.el.ValueExpression styleClass;
  268       public void setStyleClass(javax.el.ValueExpression styleClass) {
  269           this.styleClass = styleClass;
  270       }
  271   
  272       // PROPERTY: tabindex
  273       private javax.el.ValueExpression tabindex;
  274       public void setTabindex(javax.el.ValueExpression tabindex) {
  275           this.tabindex = tabindex;
  276       }
  277   
  278       // PROPERTY: title
  279       private javax.el.ValueExpression title;
  280       public void setTitle(javax.el.ValueExpression title) {
  281           this.title = title;
  282       }
  283   
  284   
  285       // General Methods
  286       public String getRendererType() {
  287           return "javax.faces.Text";
  288       }
  289   
  290       public String getComponentType() {
  291           return "javax.faces.HtmlInputText";
  292       }
  293   
  294       protected void setProperties(UIComponent component) {
  295           super.setProperties(component);
  296           javax.faces.component.UIInput input = null;
  297           try {
  298               input = (javax.faces.component.UIInput) component;
  299           } catch (ClassCastException cce) {
  300               throw new IllegalStateException("Component " + component.toString() + " not expected type.  Expected: javax.faces.component.UIInput.  Perhaps you're missing a tag?");
  301           }
  302   
  303           if (converter != null) {
  304               if (!converter.isLiteralText()) {
  305                   input.setValueExpression("converter", converter);
  306               } else {
  307                   Converter conv = FacesContext.getCurrentInstance().getApplication().createConverter(converter.getExpressionString());
  308                   input.setConverter(conv);
  309               }
  310           }
  311   
  312           if (converterMessage != null) {
  313               input.setValueExpression("converterMessage", converterMessage);
  314           }
  315           if (immediate != null) {
  316               input.setValueExpression("immediate", immediate);
  317           }
  318           if (required != null) {
  319               input.setValueExpression("required", required);
  320           }
  321           if (requiredMessage != null) {
  322               input.setValueExpression("requiredMessage", requiredMessage);
  323           }
  324           if (validator != null) {
  325               input.addValidator(new MethodExpressionValidator(validator));
  326           }
  327           if (validatorMessage != null) {
  328               input.setValueExpression("validatorMessage", validatorMessage);
  329           }
  330           if (value != null) {
  331               input.setValueExpression("value", value);
  332           }
  333           if (valueChangeListener != null) {
  334               input.addValueChangeListener(new MethodExpressionValueChangeListener(valueChangeListener));
  335           }
  336           if (accesskey != null) {
  337               input.setValueExpression("accesskey", accesskey);
  338           }
  339           if (alt != null) {
  340               input.setValueExpression("alt", alt);
  341           }
  342           if (autocomplete != null) {
  343               input.setValueExpression("autocomplete", autocomplete);
  344           }
  345           if (dir != null) {
  346               input.setValueExpression("dir", dir);
  347           }
  348           if (disabled != null) {
  349               input.setValueExpression("disabled", disabled);
  350           }
  351           if (label != null) {
  352               input.setValueExpression("label", label);
  353           }
  354           if (lang != null) {
  355               input.setValueExpression("lang", lang);
  356           }
  357           if (maxlength != null) {
  358               input.setValueExpression("maxlength", maxlength);
  359           }
  360           if (onblur != null) {
  361               input.setValueExpression("onblur", onblur);
  362           }
  363           if (onchange != null) {
  364               input.setValueExpression("onchange", onchange);
  365           }
  366           if (onclick != null) {
  367               input.setValueExpression("onclick", onclick);
  368           }
  369           if (ondblclick != null) {
  370               input.setValueExpression("ondblclick", ondblclick);
  371           }
  372           if (onfocus != null) {
  373               input.setValueExpression("onfocus", onfocus);
  374           }
  375           if (onkeydown != null) {
  376               input.setValueExpression("onkeydown", onkeydown);
  377           }
  378           if (onkeypress != null) {
  379               input.setValueExpression("onkeypress", onkeypress);
  380           }
  381           if (onkeyup != null) {
  382               input.setValueExpression("onkeyup", onkeyup);
  383           }
  384           if (onmousedown != null) {
  385               input.setValueExpression("onmousedown", onmousedown);
  386           }
  387           if (onmousemove != null) {
  388               input.setValueExpression("onmousemove", onmousemove);
  389           }
  390           if (onmouseout != null) {
  391               input.setValueExpression("onmouseout", onmouseout);
  392           }
  393           if (onmouseover != null) {
  394               input.setValueExpression("onmouseover", onmouseover);
  395           }
  396           if (onmouseup != null) {
  397               input.setValueExpression("onmouseup", onmouseup);
  398           }
  399           if (onselect != null) {
  400               input.setValueExpression("onselect", onselect);
  401           }
  402           if (readonly != null) {
  403               input.setValueExpression("readonly", readonly);
  404           }
  405           if (size != null) {
  406               input.setValueExpression("size", size);
  407           }
  408           if (style != null) {
  409               input.setValueExpression("style", style);
  410           }
  411           if (styleClass != null) {
  412               input.setValueExpression("styleClass", styleClass);
  413           }
  414           if (tabindex != null) {
  415               input.setValueExpression("tabindex", tabindex);
  416           }
  417           if (title != null) {
  418               input.setValueExpression("title", title);
  419           }
  420       }
  421       // Methods From TagSupport
  422       public int doStartTag() throws JspException {
  423           try {
  424               return super.doStartTag();
  425           } catch (Exception e) {
  426               Throwable root = e;
  427               while (root.getCause() != null) {
  428                   root = root.getCause();
  429               }
  430               throw new JspException(root);
  431           }
  432       }
  433   
  434       public int doEndTag() throws JspException {
  435           try {
  436               return super.doEndTag();
  437           } catch (Exception e) {
  438               Throwable root = e;
  439               while (root.getCause() != null) {
  440                   root = root.getCause();
  441               }
  442               throw new JspException(root);
  443           }
  444       }
  445   
  446       // RELEASE
  447       public void release() {
  448           super.release();
  449   
  450           // component properties
  451           this.converter = null;
  452           this.converterMessage = null;
  453           this.immediate = null;
  454           this.required = null;
  455           this.requiredMessage = null;
  456           this.validator = null;
  457           this.validatorMessage = null;
  458           this.value = null;
  459           this.valueChangeListener = null;
  460   
  461           // rendered attributes
  462           this.accesskey = null;
  463           this.alt = null;
  464           this.autocomplete = null;
  465           this.dir = null;
  466           this.disabled = null;
  467           this.label = null;
  468           this.lang = null;
  469           this.maxlength = null;
  470           this.onblur = null;
  471           this.onchange = null;
  472           this.onclick = null;
  473           this.ondblclick = null;
  474           this.onfocus = null;
  475           this.onkeydown = null;
  476           this.onkeypress = null;
  477           this.onkeyup = null;
  478           this.onmousedown = null;
  479           this.onmousemove = null;
  480           this.onmouseout = null;
  481           this.onmouseover = null;
  482           this.onmouseup = null;
  483           this.onselect = null;
  484           this.readonly = null;
  485           this.size = null;
  486           this.style = null;
  487           this.styleClass = null;
  488           this.tabindex = null;
  489           this.title = null;
  490       }
  491   
  492       public String getDebugString() {
  493           return "id: " + this.getId() + " class: " + this.getClass().getName();
  494       }
  495   
  496   }

Save This Page
Home » Mojarra-2.0.1 » com.sun » faces » taglib » html_basic » [javadoc | source]