Package org.springmodules.xt.ajax.action

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


                this.messageSource.getMessage("message.successful", null, "Successful", LocaleContextHolder.getLocale()),
                TaggedText.Tag.SPAN);
       
        ReplaceContentAction action1 = new ReplaceContentAction("onSuccessMessage", img, msg);
        Effect action2 = new Effect("Shake", "onSuccessMessage");
        SetAttributeAction action3 = new SetAttributeAction("name.field", "value", "");
        SetAttributeAction action4 = new SetAttributeAction("url.field", "value", "");
       
        return new AjaxAction[]{action1, action2, action3, action4};
    }
View Full Code Here


                    event.getHttpRequest().setAttribute("entry", entry);
                    // Render the entry via external JSP content:
                    JspComponent jsp = new JspComponent(event.getHttpRequest(), "/personal/includes/entryPanel.page");
                   
                    // Change the class of the web element that fired the event:
                    SetAttributeAction action1 = new SetAttributeAction(event.getElementId(), "class", "expanded");
                   
                    // Construct the CSS selector identifying the web page part that will be updated with the JSP content:
                    String selector = new StringBuilder("#").append(event.getElementId()).append("~").append("div.entryBody").toString();
                    ElementMatcher matcher = new SelectorMatcher(Arrays.asList(selector));
                    // Replace the content of the web page part identified by the selector:
View Full Code Here

     */
    private AjaxResponse hideEntry(AjaxActionEvent event) {
        AjaxResponse response = new AjaxResponseImpl("UTF-8");
       
        // Change the class of the web element that fired the event:
        SetAttributeAction action1 = new SetAttributeAction(event.getElementId(), "class", "closed");
       
        // Construct the CSS selector identifying the web page part that will be updated :
        String selector = new StringBuilder("#").append(event.getElementId()).append("~").append("div.entryBody").toString();
        ElementMatcher matcher = new SelectorMatcher(Arrays.asList(selector));
        // Call a client-side javascript function for hiding the entry:
View Full Code Here

   
    public AjaxResponse insertAfter(AjaxActionEvent event) {
        // Create an ajax action for inserting content after:
        InsertContentAfterAction action = new InsertContentAfterAction("toInsertAfter", new TaggedText(", Spring Modules user", TaggedText.Tag.SPAN));
        // Disable the event:
        SetAttributeAction disableAction = new SetAttributeAction("insertAfterButton", "onclick", "");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the actions:
        response.addAction(action);
View Full Code Here

   
    public AjaxResponse insertBefore(AjaxActionEvent event) {
        // Create an ajax action for inserting content before:
        InsertContentBeforeAction action = new InsertContentBeforeAction("toInsertBefore", new TaggedText("Hello, ", TaggedText.Tag.SPAN));
        // Disable the event:
        SetAttributeAction disableAction = new SetAttributeAction("insertBeforeButton", "onclick", "");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the actions:
        response.addAction(action);
View Full Code Here

   
    public AjaxResponse appendAsFirst(AjaxActionEvent event) {
        // Create an ajax action for appending content as first child:
        AppendAsFirstContentAction action = new AppendAsFirstContentAction("toAppendAsFirst", new TaggedText("Hello, ", TaggedText.Tag.SPAN));
        // Disable the event:
        SetAttributeAction disableAction = new SetAttributeAction("appendAsFirstButton", "onclick", "");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the actions:
        response.addAction(action);
View Full Code Here

   
    public AjaxResponse changeColor(AjaxActionEvent event) {
        // CSS Selector matcher for selecting list item elements descending by the element with changeColorDataRow id:
        SelectorMatcher matcher = new SelectorMatcher(Arrays.asList("#changeColorDataRow li"));
        // Action for changing the style attribute to matching elements:
        SetAttributeAction action = new SetAttributeAction(matcher, "style", "color : red");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the actions:
        response.addAction(action);
View Full Code Here

        String matriculationCode = event.getHttpRequest().getParameter(event.getElementName());
        // Get the selected employee:
        IEmployee e = store.getEmployee(matriculationCode);
       
        // Create an ajax action for setting the "value" attribute of the "firstname" html element:
        SetAttributeAction setFirstname = new SetAttributeAction("firstname", "value", e.getFirstname());
        // Create an ajax action for setting the "value" attribute of the "surname" html element:
        SetAttributeAction setSurname = new SetAttributeAction("surname", "value", e.getSurname());
       
        // Create the ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the actions to the response:
        response.addAction(setFirstname);
View Full Code Here

TOP

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

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.