Package org.openfaces.component.ajax

Examples of org.openfaces.component.ajax.Ajax


    private AjaxRendererHelper helper = new AjaxRendererHelper();

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        Ajax ajax = (Ajax) component;
        if (ajax.isStandalone())
            encodeStandaloneInvocationMode(context, ajax);
        else
            helper.encodeAutomaticInvocationMode(context, ajax);
    }
View Full Code Here


* @author Dmitry Pikhulya
*/
public class AjaxRendererHelper extends OUIClientActionRendererHelper {

    protected void encodeAdditionalScript(FacesContext context, ScriptBuilder javaScript, OUIClientAction clientAction) {
        Ajax ajax = (Ajax) clientAction;
        appendMissingParameters(context, ajax, javaScript);
    }
View Full Code Here

        Ajax ajax = (Ajax) clientAction;
        appendMissingParameters(context, ajax, javaScript);
    }

    protected String getClientActionScript(FacesContext context, OUIClientAction clientAction) {
        Ajax ajax = (Ajax) clientAction;
        AjaxInitializer initializer = new AjaxInitializer();
        ScriptBuilder script = new ScriptBuilder();
        script.functionCall("O$._ajaxReload",
                initializer.getRenderArray(context, ajax, ajax.getRender()),
                initializer.getAjaxParams(context, ajax)).semicolon();
        if (isDisableDefaultRequired(ajax))
            script.append("return false;");
        return script.toString();
    }
View Full Code Here

                applyButton.setValue("Apply");
            applyButton.getAttributes().put("onclick", new ScriptBuilder().O$(compositeFilter).dot().functionCall("apply").append(";return false;").toString());
            applyButton.encodeAll(context);

            String ajaxForApplyId = Components.generateIdWithSuffix(compositeFilter, "ajaxForApply");
            Ajax ajaxForApply = (Ajax) compositeFilter.findComponent(ajaxForApplyId);
            if (ajaxForApply == null) {
                ajaxForApply = new Ajax();
                ajaxForApply.setId(ajaxForApplyId);
                ajaxForApply.setExecute(new ArrayList<String>(Collections.singletonList(":" + compositeFilter.getClientId(context))));
                ajaxForApply.setRender(new ArrayList<String>(Collections.singletonList(_for)));
                ajaxForApply.setStandalone(true);
                compositeFilter.getChildren().add(ajaxForApply);
            }
            ajaxForApply.encodeAll(context);
        }


        renderInitScript(context, compositeFilter);
View Full Code Here

TOP

Related Classes of org.openfaces.component.ajax.Ajax

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.