Package org.springmodules.xt.ajax.action.prototype.scriptaculous

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect


    /**
     * Get the default error action.<br>
     * This renders the error by highlighting it in red.
     */
    public AjaxAction[] getErrorActions(AjaxSubmitEvent event, ObjectError error){
        Effect highlight = new Effect("Highlight", error.getCode());
        highlight.addOption("startcolor", "#FF0A0A");
        return new AjaxAction[]{highlight};
    }
View Full Code Here


        TaggedText msg = new TaggedText(
                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

        Image img = new Image(event.getHttpRequest().getContextPath() + "/images/error.gif", "error");
        TaggedText txt = new TaggedText(message, TaggedText.Tag.SPAN);
        // Put the message in its proper web page space:
        ReplaceContentAction action1 = new ReplaceContentAction("message", img, txt);
        // Shake the message:
        Effect action2 = new Effect("Shake", "message");
        // Add actions to response:
        response.addAction(action1);
        response.addAction(action2);
    }
View Full Code Here

            Component errorMessage = new TaggedText(
                    this.messageSource.getMessage("message.error", null, "Error", LocaleContextHolder.getLocale()),
                    TaggedText.Tag.SPAN);
            AjaxAction removeAction = new RemoveContentAction("onSuccessMessage");
            AjaxAction replaceAction = new ReplaceContentAction("onErrorsMessage", errorImage, errorMessage);
            AjaxAction effectAction = new Effect("Shake", "onErrorsMessage");
            response.addAction(removeAction);
            response.addAction(replaceAction);
            response.addAction(effectAction);
        } else {
            AjaxAction removeAction = new RemoveContentAction("onErrorsMessage");
View Full Code Here

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

        return response;
    }
   
    public AjaxResponse highlightElement(AjaxActionEvent event) {
        // Create an ajax action for highlighting an element:
        Effect action = new Effect("Highlight", "toApplyEffect");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

        return response;
    }
   
    public AjaxResponse puffElement(AjaxActionEvent event) {
        // Create an ajax action for making an element puff:
        Effect action = new Effect("Puff", "toApplyEffect");
        action.addOption("duration", "3");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

        return response;
    }
   
    public AjaxResponse pulsateElement(AjaxActionEvent event) {
        // Create an ajax action for making pulsate an element:
        Effect action = new Effect("Pulsate", "toApplyEffect");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

        return response;
    }
   
    public AjaxResponse shrinkElement(AjaxActionEvent event) {
        // Create an ajax action for shrinking an element:
        Effect action = new Effect("Shrink", "toApplyEffect");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

        return response;
    }
   
    public AjaxResponse growElement(AjaxActionEvent event) {
        // Create an ajax action for making grow an element:
        Effect action = new Effect("Grow", "toApplyEffect");
       
        // 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.prototype.scriptaculous.Effect

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.