Package javax.faces.component

Examples of javax.faces.component.UIForm


        {
            return;
        }
        */

        UIForm htmlForm = (UIForm)component;

        Map paramMap = facesContext.getExternalContext().getRequestParameterMap();
        String submittedValue = (String)paramMap.get(component.getClientId(facesContext) +
                                                     HIDDEN_SUBMIT_INPUT_SUFFIX);
        if (submittedValue != null && submittedValue.equals(HIDDEN_SUBMIT_INPUT_VALUE))
        {
            htmlForm.setSubmitted(true);
        }
        else
        {
            htmlForm.setSubmitted(false);
        }
    }
View Full Code Here


                    "If you need to disable this check (on your own risk!) set the param " +
                    "org.apache.myfaces.VALIDATE in your web.xml context parameters to false");
            }
        }

        UIForm htmlForm = (UIForm) component;

        ResponseWriter writer = facesContext.getResponseWriter();
        String clientId = htmlForm.getClientId(facesContext);
        String actionURL = getActionUrl(facesContext, htmlForm);
        String method = getMethod(facesContext, htmlForm);
        String acceptCharset = getAcceptCharset(facesContext, htmlForm);

        writer.startElement(HTML.FORM_ELEM, htmlForm);
View Full Code Here

        {
            return;
        }
        */

        UIForm htmlForm = (UIForm) component;

        Map paramMap = facesContext.getExternalContext().getRequestParameterMap();
        String submittedValue = (String) paramMap.get(component.getClientId(facesContext) +
            HIDDEN_SUBMIT_INPUT_SUFFIX);
        if (submittedValue != null && submittedValue.equals(HIDDEN_SUBMIT_INPUT_VALUE)) {
            htmlForm.setSubmitted(true);
        }
        else {
            htmlForm.setSubmitted(false);
        }
    }
View Full Code Here

                         * If the component is a UIForm and it is prepending its id
                         * then we can short circuit out of here if the the client
                         * id of the component we are trying to find does not begin
                         * with the id of the UIForm.
                         */
                        UIForm form = (UIForm) component;
                        if (form.isPrependId() && !clientId.startsWith(form.getClientId(visitContext.getFacesContext()))) {
                            result = VisitResult.REJECT;
                        }
                    } else if (component instanceof NamingContainer) {
                        /*
                         * If the component is a naming container then assume it is
View Full Code Here

                        * If the component is a UIForm and it is prepending its id
                        * then we can short circuit out of here if the the client
                        * id of the component we are trying to find does not begin
                        * with the id of the UIForm.
                        */
                        UIForm form = (UIForm) component;
                        if (form.isPrependId() && !clientId.startsWith(form.getClientId(visitContext.getFacesContext()))) {
                            result = VisitResult.REJECT;
                        }
                    } else if (component instanceof NamingContainer) {
                        /*
                        * If the component is a naming container then assume it is
View Full Code Here

    UIComponent parent = component.getParent();
    while (parent != null && !(parent instanceof UIForm)) {
      parent = parent.getParent();
    }

    UIForm nestingForm = null;
    if (parent != null) {
      // link is nested inside a form
      nestingForm = (UIForm) parent;
    }
    return nestingForm;
View Full Code Here

   * @return
   * @throws IOException
   */
  public void encodeBeginFormIfNessesary(FacesContext context,
      UIComponent component) throws IOException {
    UIForm form = getNestingForm(context, component);
    if (null == form) {
      ResponseWriter writer = context.getResponseWriter();
      String clientId = component.getClientId(context) + DUMMY_FORM_ID;
      encodeBeginForm(context, component, writer, clientId);
      // writer.writeAttribute(HTML.style_ATTRIBUTE, "margin:0;
View Full Code Here

   * @param component
   * @throws IOException
   */
  public void encodeEndFormIfNessesary(FacesContext context,
      UIComponent component) throws IOException {
    UIForm form = getNestingForm(context, component);
    if (null == form) {
      ResponseWriter writer = context.getResponseWriter();
      // TODO - hidden form parameters ?
      encodeEndForm(context, writer);
    }
View Full Code Here

        while ((parent != null) && !(parent instanceof UIForm)) {
            parent = parent.getParent();
        }

        UIForm nestingForm = null;

        if (parent != null) {

            // link is nested inside a form
            nestingForm = (UIForm) parent;
View Full Code Here

        initializeRequestParameterMap(new HashMap<String, String>() {
            {
                put("form", "form");
            }
        });
        UIForm form = mock(UIForm.class);
        UIViewRoot viewRoot = mock(UIViewRoot.class);

        when(facesContext.getViewRoot()).thenReturn(viewRoot);
        when(facesContext.getViewRoot().findComponent("form")).thenReturn(form);
        when(facesContext.isPostback()).thenReturn(true);
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.