Package javax.faces.component

Examples of javax.faces.component.UIForm


        checkDefaultState(state);

        SavedState inputState = new SavedState(new UIInput());
        checkDefaultState(inputState);

        SavedState formState = new SavedState(new UIForm());
        checkDefaultState(formState);

        SavedState iterationState = new SavedState(iterationStateHolder);
        checkDefaultState(iterationState);
    }
View Full Code Here


        assertEquals("some state", this.iterationState);
    }

    @Test
    public void testFormConstructor() {
        UIForm form = new UIForm();
        form.setSubmitted(true);

        SavedState formState = new SavedState(form);

        assertTrue(formState.isSubmitted());
View Full Code Here

    @Test
    public void testFormApply() {
        SavedState formState = new SavedState();
        formState.setSubmitted(true);

        UIForm form = new UIForm();
        formState.apply(form);

        assertTrue(form.isSubmitted());
    }
View Full Code Here

        } else if (component instanceof EditableValueHolder) {
            EditableValueHolder evh = (EditableValueHolder) component;

            state = new SavedState(evh);
        } else if (component instanceof UIForm) {
            UIForm form = (UIForm) component;

            state = new SavedState(form);
        }

        if (state != null) {
View Full Code Here

        } else if (component instanceof EditableValueHolder) {
            EditableValueHolder evh = (EditableValueHolder) component;

            savedState.apply(evh);
        } else if (component instanceof UIForm) {
            UIForm form = (UIForm) component;

            savedState.apply(form);
        }

        if (component.getChildCount() > 0) {
View Full Code Here

        }

        if (!context.isPostback()) {
            return true;
        } else {
            UIForm form = (UIForm) RENDERER_UTILS.getSubmittedForm(context);

            if (!FocusRendererUtils.hasFormFocus(form)) {
                return true;
            }
        }
View Full Code Here

        if (!context.isPostback()) {
            // candidate will be selected on client-side
            return null;
        } else {
            UIForm form = (UIForm) RENDERER_UTILS.getSubmittedForm(context);

            return getFocusCandidatesAsString(context, component, form);
        }
    }
View Full Code Here

*/
public class FormFocusRenderStrategy extends AbstractFocusRenderStrategy {

    @Override
    public void postAddToView(FacesContext context, AbstractFocus component) {
        UIForm form = (UIForm) RENDERER_UTILS.getNestingForm(component);
        FocusRendererUtils.markFormWithFocus(form);
    }
View Full Code Here

        if (component.isDelayed()) {
            return false;
        }

        UIForm form = (UIForm) RENDERER_UTILS.getNestingForm(component);

        if (!context.isPostback()) {
            if (FocusRendererUtils.hasViewFocus(context.getViewRoot())) {
                return false;
            } else if (isSomeAnotherFormFocusRendered(context, component)) {
View Full Code Here

        return !firstFormFocusRendered.equals(component.getClientId(context));
    }

    @Override
    public String getFocusCandidatesAsString(FacesContext context, AbstractFocus component) {
        UIForm form = (UIForm) RENDERER_UTILS.getNestingForm(component);

        if (!context.isPostback()) {
            return form.getClientId(context);
        }

        if (RENDERER_UTILS.isFormSubmitted(context, form)) {
            return getFocusCandidatesAsString(context, component, form);
        }
View Full Code Here

TOP

Related Classes of javax.faces.component.UIForm

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.