Package org.springmodules.xt.ajax.component

Examples of org.springmodules.xt.ajax.component.Option


        // Get offices:
        Collection<IOffice> offices = store.getOffices();
       
        // Create the component to render (a list of html option elements):
        List options = new LinkedList();
        Option first = new Option("-1", "Select one ...");
        options.add(first);
        for(IOffice office : offices) {
            Option option = new Option(office, "officeId", "name");
            options.add(option);
        }
        // Create an ajax action for replacing the content of the "offices" element with the components just created:
        ReplaceContentAction action = new ReplaceContentAction("offices", options);
       
View Full Code Here


        // Create the employee selection box (binding to employees) and add it to a column:
        BindStatusHelper helper = new BindStatusHelper("command.employees");
        Select selectionList = new Select(helper.getStatusExpression());
        for (IEmployee emp : employees) {
            Option o = new Option(emp, "matriculationCode", "surname");
            selectionList.addOption(o);
        }
        TableData td1 = new TableData(selectionList);

        // Create the remove button and add it to another column:
View Full Code Here

        // Upon office selection, get employees related to the selected office:
        Collection<IEmployee> employees = store.getEmployeesByOffice(store.getOffice(officeId));
       
        // Create the component to render (a list of html option element):
        List options = new LinkedList();
        Option first = new Option("-1", "Select one ...");
        options.add(first);
        for(IEmployee emp : employees) {
            Option option = new Option(emp, "matriculationCode", "surname");
            options.add(option);
        }
        // Create an ajax action for replacing the content of the "employees" element:
        ReplaceContentAction action = new ReplaceContentAction("employees", options);
       
View Full Code Here

TOP

Related Classes of org.springmodules.xt.ajax.component.Option

Copyright © 2018 www.massapicom. 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.