FileDocCategorySizeDatePackage
SubsetIteratorTagDemo.javaAPI DocApache Struts 2.0.9 Apps2384Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.tag.nonui.iteratortag

SubsetIteratorTagDemo

public class SubsetIteratorTagDemo extends com.opensymphony.xwork2.ActionSupport implements com.opensymphony.xwork2.Validateable

Fields Summary
private static final long
serialVersionUID
private String
iteratorValue
private Integer
count
private Integer
start
Constructors Summary
Methods Summary
public java.lang.IntegergetCount()

        return this.count;
    
public java.lang.StringgetIteratorValue()

        return this.iteratorValue;
    
public java.lang.IntegergetStart()

        return this.start;
    
public java.lang.Stringinput()

        return SUCCESS;
    
public voidsetCount(java.lang.Integer count)

        this.count = count;
    
public voidsetIteratorValue(java.lang.String iteratorValue)

        this.iteratorValue = iteratorValue;
    
public voidsetStart(java.lang.Integer start)

        this.start = start;
    
public java.lang.Stringsubmit()

        return SUCCESS;
    
public voidvalidate()



       
        if (iteratorValue == null || iteratorValue.trim().length() <= 0 ) {
            addFieldError("iteratorValue1", "iterator value 1 cannot be empty");
        }
        else if (iteratorValue.trim().indexOf(",") <= 0) {
            addFieldError("iteratorValue1", "iterator value 1 needs to be comma separated");
        }