Package org.springmodules.xt.ajax.action

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


        // Put new errors into HTML:
        for (ObjectError error : errors) {
            if (this.rendersError(error)) {
                ElementMatcher matcher = this.getElementMatcherForError(error);
                Component renderingComponent = this.errorRenderingCallback.getErrorComponent(event, error, this.messageSource, locale);
                AppendContentAction appendAction = new AppendContentAction(matcher, renderingComponent);
                response.addAction(appendAction);
                // Get the actions to execute *after* rendering the component:
                AjaxAction[] renderingActions = this.errorRenderingCallback.getErrorActions(event, error);
                if (renderingActions != null) {
                    for (AjaxAction renderingAction : renderingActions) {
View Full Code Here


    public AjaxResponseImplTest(String testName) {
        super(testName);
    }

    public void testRender() throws Exception {
        AppendContentAction action1 = new AppendContentAction("action1", new SimpleText("Test Text"));
        ReplaceContentAction action2 = new ReplaceContentAction("action2", new SimpleText("Test Text"));
        AjaxResponseImpl response = new AjaxResponseImpl();
       
        response.addAction(action1);
        response.addAction(action2);
View Full Code Here

*/
public class DummySubmitHandler extends AbstractAjaxHandler {

    public AjaxResponse submit(AjaxSubmitEvent e) {
        AjaxResponseImpl response = new AjaxResponseImpl();
        AppendContentAction action = new AppendContentAction("submit", new SimpleText("submit"));
        response.addAction(action);
        return response;
    }
View Full Code Here

*/
public class DummyHandler extends AbstractAjaxHandler {
   
    public AjaxResponse action(AjaxActionEvent e) {
        AjaxResponseImpl response = new AjaxResponseImpl();
        AppendContentAction action = new AppendContentAction("action", new SimpleText("action"));
        response.addAction(action);
        return response;
    }
View Full Code Here

        // Add an onclick event to the remove button, which executes a client side javascript function for actually
        // removing the row:
        removeButton.addAttribute("onclick", new StringBuilder("removeRow('").append(rowId).append("');").toString());

        // Create an ajax action for appending the new row:
        AppendContentAction appendRowAction = new AppendContentAction("employees", row);

        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add actions:
        response.addAction(appendRowAction);
View Full Code Here

            BindStatusHelper helper = new BindStatusHelper("command.employees");
           
            ListItem item = new ListItem(new SimpleText(draggedEmployee.getFirstname() + " " + draggedEmployee.getSurname()));
            InputField hidden = new InputField(helper.getStatusExpression(), draggedEmployee.getMatriculationCode(), InputField.InputType.HIDDEN);
           
            AppendContentAction appendAction = new AppendContentAction("employees", new LinkedList<Component>(Arrays.asList(item, hidden)));
           
            AjaxResponse response = new AjaxResponseImpl();
            response.addAction(appendAction);
           
            return response;
View Full Code Here

        String number = new Integer((new Random()).nextInt()).toString();
       
        // Create the text component holding the number:
        SimpleText text = new SimpleText(number + "&#160;&#160;&#160;");
        // Create an ajax action for appending it:
        AppendContentAction action = new AppendContentAction("num", text);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

    public AjaxResponse includeJsp(AjaxActionEvent event) {
        // Create the component for including jsp content:
        event.getHttpRequest().setAttribute("jspVar2", event.getParameters().get("jspVar2"));
        JspComponent jsp = new JspComponent(event.getHttpRequest(), "/includes/include.jsp");
        // Create an ajax action for appending it:
        AppendContentAction action = new AppendContentAction("jsp", jsp);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

        TemplateComponent velocity = new TemplateComponent(this.velocityViewResolver, "include");
        Map model = new HashMap();
        model.put("velocity", "Velocity");
        velocity.setTemplateModel(model);
        // Create an ajax action for appending it:
        AppendContentAction action = new AppendContentAction("velocity", velocity);
       
        // Create a concrete 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.AppendContentAction

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.