Package org.richfaces.component

Examples of org.richfaces.component.AbstractAjaxStatus


    @Override
    public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
        super.doEncodeEnd(writer, context, component);

        AbstractAjaxStatus ajaxStatus = (AbstractAjaxStatus) component;
        writer.startElement(HtmlConstants.SPAN_ELEM, component);
        String clientId = component.getClientId(context);
        writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, clientId, "id");

        for (StatusState state : StatusState.values()) {
            encodeState(context, ajaxStatus, state);
        }

        writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
        writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.TEXT_JAVASCRIPT_TYPE, null);

        JSFunction statusConstructor = new JSFunction("new RichFaces.ui.Status", clientId);

        Map<String, Object> options = new HashMap<String, Object>();

        Map<String, Object> attributes = ajaxStatus.getAttributes();
        for (String eventName : EVENT_NAMES) {
            String eventAttribute = "on" + eventName;
            HandlersChain handlersChain = new HandlersChain(context, component, true);
            handlersChain.addInlineHandlerFromAttribute(eventAttribute);
            handlersChain.addBehaviors(eventName);
View Full Code Here


    @Override
    public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        super.encodeEnd(context, component);

        AbstractAjaxStatus ajaxStatus = (AbstractAjaxStatus) component;
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement(HtmlConstants.SPAN_ELEM, component);
        String clientId = component.getClientId(context);
        writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, clientId, "id");

        for (StatusState state : StatusState.values()) {
            encodeState(context, ajaxStatus, state);
        }

        writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
        writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.TEXT_JAVASCRIPT_TYPE, null);

        JSFunction statusConstructor = new JSFunction("new RichFaces.ui.Status", clientId);

        Map<String, Object> options = new HashMap<String, Object>();

        Map<String, Object> attributes = ajaxStatus.getAttributes();
        for (String eventName : EVENT_NAMES) {
            String eventAttribute = "on" + eventName;
            HandlersChain handlersChain = new HandlersChain(context, component, true);
            handlersChain.addInlineHandlerFromAttribute(eventAttribute);
            handlersChain.addBehaviors(eventName);
View Full Code Here

TOP

Related Classes of org.richfaces.component.AbstractAjaxStatus

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.