Package javax.faces.component.behavior

Examples of javax.faces.component.behavior.ClientBehaviorContext


    }

    @Test
    public void testGetAjaxScript() throws Exception {
        setupRenderer(AjaxBehavior.BEHAVIOR_ID);
        ClientBehaviorContext clientBehaviorContext = setupBehaviorContext(input);
        controller.replay();
        String script = behavior.getAjaxScript(clientBehaviorContext);
        controller.verify();
        assertEquals(CLIENT_VALIDATION_FUNCTION, script);
    }
View Full Code Here


        expect(renderKit.getClientBehaviorRenderer(rendererType)).andReturn(behaviorRenderer);
        expect(behaviorRenderer.getScript(behaviorContext, behavior)).andReturn(CLIENT_VALIDATION_FUNCTION);
    }

    private String getScript(UIComponent component) {
        ClientBehaviorContext clientBehaviorContext = setupBehaviorContext(component);
        controller.replay();
        String script = behavior.getScript(clientBehaviorContext);
        controller.verify();
        return script;
    }
View Full Code Here

        if (behaviorsList == null) {
            return;
        }

        ClientBehaviorContext behaviorContext = ClientBehaviorContext.createClientBehaviorContext(facesContext, component,
            name, includeClientId ? component.getClientId(facesContext) : null, getParameters());

        for (ClientBehavior clientBehavior : behaviorsList) {
            String behaviorScript = clientBehavior.getScript(behaviorContext);
View Full Code Here

                paramList.add(new ClientBehaviorContext.Parameter(paramEntry
                        .getKey(), paramEntry.getValue()));
            }
        }

        ClientBehaviorContext context = ClientBehaviorContext
                .createClientBehaviorContext(facesContext, uiComponent,
                        eventName, uiComponent.getClientId(facesContext),
                        paramList);

View Full Code Here

                    value);
        }
        else
        {
            //Only 1 behavior and attrValue == null, so just render it directly
            ClientBehaviorContext behaviorContext = ClientBehaviorContext
                .createClientBehaviorContext(facesContext, component,
                    eventName, component.getClientId(facesContext),
                    null);
            return renderHTMLAttribute(writer, componentProperty, htmlAttrName,
                    cbl.get(0).getScript(behaviorContext));
View Full Code Here

                || attachedEventBehaviors.size() == 0)
        {
            target.append(STR_EMPTY);
            return false;
        }
        ClientBehaviorContext context = ClientBehaviorContext
                .createClientBehaviorContext(facesContext, uiComponent,
                        eventName, targetClientId, params);
        boolean submitting = false;
        Iterator<ClientBehavior> clientIterator = attachedEventBehaviors
                .iterator();
View Full Code Here

                || attachedEventBehaviors.size() == 0)
        {
            target.append(STR_EMPTY);
            return false;
        }
        ClientBehaviorContext context = ClientBehaviorContext
                .createClientBehaviorContext(facesContext, uiComponent,
                        eventName, targetClientId, params);
        boolean submitting = false;
       
        // List<ClientBehavior>  attachedEventBehaviors is  99% _DeltaList created in
View Full Code Here

                || attachedEventBehaviors.size() == 0)
        {
            target.append(STR_EMPTY);
            return false;
        }
        ClientBehaviorContext context = ClientBehaviorContext
                .createClientBehaviorContext(facesContext, uiComponent,
                        eventName, targetClientId, params);
        boolean submitting = false;
        Iterator<ClientBehavior> clientIterator = attachedEventBehaviors
                .iterator();
View Full Code Here

                || attachedEventBehaviors.size() == 0)
        {
            target.append(STR_EMPTY);
            return false;
        }
        ClientBehaviorContext context = ClientBehaviorContext
                .createClientBehaviorContext(facesContext, uiComponent,
                        eventName, targetClientId, params);
        boolean submitting = false;
       
        // List<ClientBehavior>  attachedEventBehaviors is  99% _DeltaList created in
View Full Code Here

                for (String eventName : eventNames) {
                    if (behaviorsMap.containsKey(eventName)) {
                        List<ClientBehavior> behaviorsList = behaviorsMap.get(eventName);
                        if (!behaviorsList.isEmpty()) {
                            // TODO - parameters handling
                            ClientBehaviorContext behaviorContext = ClientBehaviorContext.createClientBehaviorContext(
                                    facesContext, component, eventName, null, null);
                            attributeValue = createBehaviorsChain(attributeValue, behaviorContext, behaviorsList);
                        }
                        break;
                    }
View Full Code Here

TOP

Related Classes of javax.faces.component.behavior.ClientBehaviorContext

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.