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

MergeIteratorTagDemo

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

Fields Summary
private static final long
serialVersionUID
private String
iteratorValue1
private String
iteratorValue2
Constructors Summary
Methods Summary
public java.lang.StringgetIteratorValue1()

        return this.iteratorValue1;
    
public java.lang.StringgetIteratorValue2()

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

        return SUCCESS;
    
public voidsetIteratorValue1(java.lang.String iteratorValue1)

        this.iteratorValue1 = iteratorValue1;
    
public voidsetIteratorValue2(java.lang.String iteratorValue2)

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

        return SUCCESS;
    
public voidvalidate()



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