Package org.springmodules.xt.ajax.action

Examples of org.springmodules.xt.ajax.action.ReplaceContentAction


        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);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here


        Collection<IEmployee> employees = (Collection) model.get("employees");
       
        // Create the simple text message:
        SimpleText message = new SimpleText(new StringBuilder("Selected office: ").append(office.getName()).toString());
        // Create an ajax action for setting the message and hi:
        ReplaceContentAction setMessageAction = new ReplaceContentAction("message", message);
        // Create an highlighting effect action for the appearing message:
        Effect highlightAction = new Effect("Highlight", "message");
        highlightAction.addOption("duration", 0.5);
       
        // Create the components to render (a list of html table rows):
        List rows = new LinkedList();
        for(IEmployee emp : employees) {
            TableRow row = new TableRow(emp, new String[]{"firstname", "surname", "matriculationCode"}, null);
            rows.add(row);
        }
        // Create an ajax action for replacing the old table body content, inserting these new rows:
        ReplaceContentAction replaceRowsAction = new ReplaceContentAction("employees", rows);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add actions:
        response.addAction(setMessageAction);
View Full Code Here

        String number = new Integer((new Random()).nextInt()).toString();
       
        // Create the text component holding the number:
        SimpleText text = new SimpleText(number);
        // Create an ajax action for replacing all previously set numbers:
        ReplaceContentAction action = new ReplaceContentAction("num", text);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

        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);
       
        // Create the ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

TOP

Related Classes of org.springmodules.xt.ajax.action.ReplaceContentAction

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.