Package org.apache.myfaces.trinidad.context

Examples of org.apache.myfaces.trinidad.context.FormData


    RenderingContext rc,
    UIComponent      component,
    FacesBean        bean
    ) throws IOException
  {
    FormData fData = rc.getFormData();
    if (fData != null)
    {
      fData.addNeededValue(XhtmlConstants.PARTIAL_TARGETS_PARAM);
      fData.addNeededValue(XhtmlConstants.PARTIAL_PARAM);
    }

    // we cannot render without a nodeStamp:
    if (((UIXTreeTable) component).getNodeStamp() == null)
    {
View Full Code Here


    throws IOException
  {
    if((train.getFormName() != null) && supportsScripting(rc))
    {
      // render hidden fields to hold the form data
      FormData formData = rc.getFormData();
      if (formData != null)
      {
        formData.addNeededValue(XhtmlConstants.EVENT_PARAM);
        formData.addNeededValue(XhtmlConstants.SOURCE_PARAM);
        formData.addNeededValue(XhtmlConstants.VALUE_PARAM);
        formData.addNeededValue(XhtmlConstants.SIZE_PARAM);
      }

      // Render script submission code.
      ProcessUtils.renderNavSubmitScript(context, rc);
    }
View Full Code Here

    sw.append("apacheChart.setMaxPrecision(");
    _writeJSObject(sw, getMaxPrecision(component, bean));
    sw.append(");\n");

    String formName;
    FormData fData = rc.getFormData();
    if (fData == null)
      formName =  null;
    else
      formName = fData.getName();

    if(formName!=null)
    {
      sw.append("apacheChart.setFormName(");
      _writeJSObject(sw, formName);
View Full Code Here

    String           name2,
    String           name3,
    String           name4
    )
  {
    FormData fd = RenderingContext.getCurrentInstance().getFormData();
    fd.addNeededValue(name1);
    if (name2!=null)
    {
      fd.addNeededValue(name2);
      if (name3!=null)
      {
        fd.addNeededValue(name3);
        if (name4!=null)
        {
          fd.addNeededValue(name4);
        }
      }
    }
  }
View Full Code Here

        if (_LOG.isWarning())
          _LOG.warning("CANNOT_LOCATE_PARENT_FORM", name);
        return;
      }

      FormData fd = RenderingContext.getCurrentInstance().getFormData();
      fd.addRenderedValue(name.toString());
    }
  }
View Full Code Here

      if(
         domLevel == null ||
         domLevel == TrinidadAgent.DOM_CAP_NONE ||
         domLevel == TrinidadAgent.DOM_CAP_FORM)
      {
        FormData formData = rc.getFormData();
        if(formData != null)
        {
          boolean isPIE = Agent.PLATFORM_PPC.equalsIgnoreCase(
                       rc.getAgent().getPlatformName());

          // =-=AdamWiner: this isn't correct - these
          // parameters should be added by the components that need
          // them, not globally by the form control
          if (isPIE)
          {
            formData.addNeededValue(XhtmlConstants.SOURCE_PARAM);
            formData.addNeededValue(XhtmlConstants.EVENT_PARAM);
            formData.addNeededValue(XhtmlConstants.PARTIAL_TARGETS_PARAM);
            formData.addNeededValue(XhtmlConstants.PARTIAL_PARAM);

            // In the case of Windows-mobile(WM) browsers, store the value of
            // the request-header field, UA-pixels, into a hidden-parameter's
            // value attribute. WM browsers' PPRs don't contain UA-pixels in
            // their request-headers. So during a WM browser's PPR, we need to
            // manually (using JavaScript) set the field, UA-pixels, into
            // the request-header with the hidden parameter's value.

            Map<String, String> headerMap =
                        context.getExternalContext().getRequestHeaderMap();

            _renderHiddenField(writer,
                               XhtmlConstants.WINDOWS_MOBILE_UAPIXELS,
                               headerMap.get("UA-pixels"));

          }
          else
          {
            formData.addNeededValue(XhtmlConstants.SOURCE_PARAM);
            formData.addNeededValue(XhtmlConstants.EVENT_PARAM);
          }
        }
      }

      _renderNeededValues(context, rc);
View Full Code Here

  public static void addLabelMapping(
    String targetID,
    String label
    )
  {
    FormData fData = RenderingContext.getCurrentInstance().getFormData();
    fData.addLabel(targetID, label);
  }
View Full Code Here

   * render form value needed values and javascript code.
   */
  public static void addHiddenFields(
    RenderingContext rc)
  {
    FormData fData = rc.getFormData();
    fData.addNeededValue(XhtmlConstants.EVENT_PARAM);
    fData.addNeededValue(XhtmlConstants.SOURCE_PARAM);
    fData.addNeededValue(XhtmlConstants.PARTIAL_PARAM);
    fData.addNeededValue(XhtmlConstants.VALUE_PARAM);
  }
View Full Code Here

    boolean isInTable = _isInTable();

    if (hasOwnLabel(component, bean) || isInTable)
    {
      String value = getLabel(component, bean);
      FormData fd = rc.getFormData();
      if (fd != null)
        fd.addLabel(clientId, value);
    }

    RequestContext requestContext = RequestContext.getCurrentInstance();
    boolean needsPanelFormLayout = _isParentPanelForm(context, component);
    boolean isInline = (requestContext.getClientValidation() ==
View Full Code Here

    if (isAutoSubmit(component, bean))
      AutoSubmitUtils.writeDependencies(context, rc);

    // Only add in validators and converters when we're in valuePassThru
    // mode; otherwise, there's not enough on the client to even consider
    FormData fData = rc.getFormData();
    if (fData != null)
    {
      ((CoreFormData) fData).addOnSubmitConverterValidators(component,
                      valuePassThru ? converter : null,
                      valuePassThru ? getValidators(component, bean) : null,
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.context.FormData

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.