Examples of AjaxResponse


Examples of org.springmodules.xt.ajax.AjaxResponse

        assertXpathExists("//execute-javascript/content/script", rendering);
        assertTrue(rendering.indexOf("new Effect.Highlight(\"ErrorCode1\",{\"startcolor\":\"#FF0A0A\"});") != -1);
    }
   
    public void testValidateWithNoErrorsPart1() throws Exception {
        AjaxResponse response = null;
        String rendering = null;
        DefaultValidationHandler handler = new DefaultValidationHandler();
        handler.setMessageSource(new DelegatingMessageSource());
       
        response = handler.validate(submitEvent);
        rendering = response.render();
        System.out.println(rendering);
       
        assertXpathNotExists("/ajax-response/*", rendering);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

        }
        // 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);
       
        return response;
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

        // 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);

        return response;
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

        }
        // 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);
        response.addAction(highlightAction);
        response.addAction(replaceRowsAction);
       
        return response;
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

            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;
        }
        else {
            return null;
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

        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);
       
        return response;
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

        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);
       
        return response;
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

    public AjaxResponse removeNumbers(AjaxActionEvent event) {
        // Create an ajax action for removing all numbers:
        RemoveContentAction action = new RemoveContentAction("num");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
       
        return response;
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

        InputField field = new InputField("replaced", "Replaced", InputField.InputType.TEXT);
        // Create an ajax action for replacing the old element:
        ReplaceElementAction action = new ReplaceElementAction("toReplace", field);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
       
        return response;
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxResponse

    public AjaxResponse removeElement(AjaxActionEvent event) {
        // Create an ajax action for removing the element:
        RemoveElementAction action = new RemoveElementAction("toRemove");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
       
        return response;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.