Examples of componentAddedDynamically()


Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

        List<UIComponent> children = parent.getChildren();
        List<UIComponent> dynamicChildren = Collections.emptyList();

        for (UIComponent cur : children) {
            if (stateContext.componentAddedDynamically(cur)) {
                if (dynamicChildren.isEmpty()) {
                    dynamicChildren = new ArrayList<UIComponent>(children.size());
                }
                dynamicChildren.add(cur);
            }
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

            viewRoot.visitTree(visitContext, new VisitCallback() {
                public VisitResult visit(VisitContext context, UIComponent target) {
                    VisitResult result = VisitResult.ACCEPT;
                    Object stateObj;
                    if (!target.isTransient()) {
                        if (stateContext.componentAddedDynamically(target)) {
                            stateObj = new StateHolderSaver(finalContext, target);
                            Map<String, ComponentStruct> dynamicAdds = stateContext.getDynamicAdds();
                            assert(null != dynamicAdds);
                            String clientId = target.getClientId(finalContext);
                            if (!dynamicAdds.containsKey(clientId)) {
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

                    public VisitResult visit(VisitContext context, UIComponent target) {
                        VisitResult result = VisitResult.ACCEPT;
                        String cid = target.getClientId(context.getFacesContext());
                        Object stateObj = state.get(cid);
                        if (stateObj != null && !stateContext.componentAddedDynamically(target)) {
                            boolean restoreStateNow = true;
                            if (stateObj instanceof StateHolderSaver) {
                                restoreStateNow = !((StateHolderSaver)stateObj).componentAddedDynamically();
                            }
                            if (restoreStateNow) {
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

        List<UIComponent> children = parent.getChildren();
        List<UIComponent> dynamicChildren = Collections.emptyList();

        for (UIComponent cur : children) {
            if (stateContext.componentAddedDynamically(cur)) {
                if (dynamicChildren.isEmpty()) {
                    dynamicChildren = new ArrayList<UIComponent>(children.size());
                }
                dynamicChildren.add(cur);
            }
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

                    VisitResult result = VisitResult.ACCEPT;

                    String cid = component.getClientId(context);
                    Object stateObj = state.get(cid);

                    if (stateObj != null && !stateContext.componentAddedDynamically(component)) {
                        boolean restoreStateNow = true;
                        if (stateObj instanceof StateHolderSaver) {
                            restoreStateNow = !((StateHolderSaver) stateObj).componentAddedDynamically();
                        }
                        if (restoreStateNow) {
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

                public VisitResult visit(VisitContext context, UIComponent component) {
                    VisitResult result = VisitResult.ACCEPT;
                    Object stateObj;
                    if (!component.isTransient()) {
                        if (stateContext.componentAddedDynamically(component)) {
                            component.getAttributes().put(DYNAMIC_COMPONENT, new Integer(getProperChildIndex(component)));
                            stateObj = new StateHolderSaver(finalContext, component);
                        } else {
                            stateObj = component.saveState(finalContext);
                        }
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

                    public VisitResult visit(VisitContext context, UIComponent target) {
                        VisitResult result = VisitResult.ACCEPT;
                        String cid = target.getClientId(context.getFacesContext());
                        Object stateObj = state.get(cid);
                        if (stateObj != null && !stateContext.componentAddedDynamically(target)) {
                            boolean restoreStateNow = true;
                            if (stateObj instanceof StateHolderSaver) {
                                restoreStateNow = !((StateHolderSaver) stateObj).componentAddedDynamically();
                            }
                            if (restoreStateNow) {
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

                public VisitResult visit(VisitContext context, UIComponent target) {
                    VisitResult result = VisitResult.ACCEPT;
                    Object stateObj;
                    if (!target.isTransient()) {
                        if (stateContext.componentAddedDynamically(target)) {
                            target.getAttributes().put(DYNAMIC_COMPONENT, new Integer(target.getParent().getChildren().indexOf(target)));
                            stateObj = new StateHolderSaver(finalContext, target);
                        } else {
                            stateObj = target.saveState(context.getFacesContext());
                        }
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

                    VisitResult result = VisitResult.ACCEPT;

                    String cid = component.getClientId(context);
                    Object stateObj = state.get(cid);

                    if (stateObj != null && !stateContext.componentAddedDynamically(component)) {
                        boolean restoreStateNow = true;
                        if (stateObj instanceof StateHolderSaver) {
                            restoreStateNow = !((StateHolderSaver) stateObj).componentAddedDynamically();
                        }
                        if (restoreStateNow) {
View Full Code Here

Examples of com.sun.faces.context.StateContext.componentAddedDynamically()

                public VisitResult visit(VisitContext context, UIComponent component) {
                    VisitResult result = VisitResult.ACCEPT;
                    Object stateObj;
                    if (!component.isTransient()) {
                        if (stateContext.componentAddedDynamically(component)) {
                            component.getAttributes().put(DYNAMIC_COMPONENT,
                                    new Integer(component.getParent().getChildren().indexOf(component)));
                            stateObj = new StateHolderSaver(finalContext, component);
                        } else {
                            stateObj = component.saveState(finalContext);
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.