Package loxia.struts2.taglib.tag

Source Code of loxia.struts2.taglib.tag.NumberFieldTag

package loxia.struts2.taglib.tag;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;

import loxia.struts2.taglib.model.NumberField;

import com.opensymphony.xwork2.util.ValueStack;

public class NumberFieldTag extends TextFieldTag {
 
    /**
   *
   */
  private static final long serialVersionUID = 5801392039734102013L;
 
  protected String decimal;
    protected String min;
    protected String max;
 
  @Override
  public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
    return new NumberField(stack,req,res);
  }
 
  protected void populateParams() {
        super.populateParams();
        NumberField numberField = ((NumberField) component);
        numberField.setDecimal(decimal);
        numberField.setMin(min);
        numberField.setMax(max);
  }

  public void setDecimal(String decimal) {
    this.decimal = decimal;
  }

  public void setMin(String min) {
    this.min = min;
  }

  public void setMax(String max) {
    this.max = max;
  }
 
}
TOP

Related Classes of loxia.struts2.taglib.tag.NumberFieldTag

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.