// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package demo;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

public class ListAction extends ActionSupport {
    // execute action
    public String execute() {
        // forward to configured list view
        return "list";
    }
    // get data
    public List<T1> getData() {
        return DB.getAll();
    }
    // option list
    public List<String> getOptions() {
        List<String> res = new ArrayList<String>();
        res.add("");
        res.add(T1.VER);
        res.add(T1.NOTVER);
        return res;
    }
}
