Package org.apache.myfaces.trinidad.context

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


          _LOG.warning("Could not locate parent form for "
                       + " formValue " + name);
        return;
      }

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


      if (requiredField ||
          (converter != null) ||
          validators.hasNext())
      {

        FormData fData = arc.getFormData();

        boolean immediate = isImmediate(bean);
        ((CoreFormData) fData).addOnSubmitConverterValidators(component,
                                             converter,
                                             validators,
View Full Code Here

      // gives some beans the chance to cleanup:
      renderStage.setStage(RenderStage.END_STAGE);
      renderSingleRow(context, arc, tContext, component);

      String tid = tContext.getTableId();
      FormData formData = arc.getFormData();
      if (formData != null)
      {
        // Add sorting parameters.
        // =-=AdamWiner FIXME: only really needed with sorting.
        formData.addNeededValue(XhtmlConstants.STATE_PARAM);
        formData.addNeededValue(XhtmlConstants.VALUE_PARAM);

        rw.startElement(XhtmlConstants.SCRIPT_ELEMENT, null);
        renderScriptDeferAttribute(context, arc);
        // Bug #3426092:
        // render the type="text/javascript" attribute in accessibility mode
        renderScriptTypeAttribute(context, arc);

        String formName = formData.getName();

        rw.writeText(tContext.getJSVarName()+"="+
                     TreeUtils.createNewJSCollectionComponentState(formName, tid)+";", null);
        rw.endElement(XhtmlConstants.SCRIPT_ELEMENT);
      }
View Full Code Here

      if(
         domLevel == null ||
         domLevel == TrinidadAgent.DOM_CAP_NONE ||
         domLevel == TrinidadAgent.DOM_CAP_FORM)
      {
        FormData formData = arc.getFormData();
        if(formData != null)
        {
          // =-=AdamWiner: this isn't really 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);
          }
          else
          {
            formData.addNeededValue(XhtmlConstants.SOURCE_PARAM);
            formData.addNeededValue(XhtmlConstants.EVENT_PARAM);
          }
        }
      }

      _renderNeededValues(context, arc);
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

    boolean isInTable = _isInTable();

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

    if (isInTable)
    {
      ResponseWriter rw = context.getResponseWriter();
View Full Code Here

  /**
   * render form value needed values and javascript code.
   */
  public static void addHiddenFields(RenderingContext arc)
  {
    FormData fData = arc.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

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

    String formName;
    FormData fData = arc.getFormData();
    if (fData == null)
      formName =  null;
    else
      formName = fData.getName();
   
    if(formName!=null)
    {
      sw.append("apacheChart.setFormName(");
      _writeJSObject(sw, formName);
View Full Code Here

    if (isAutoSubmit(bean))
      AutoSubmitUtils.writeDependencies(context, arc);

    // 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 = arc.getFormData();
    if (fData != null)
    {
      ((CoreFormData) fData).addOnSubmitConverterValidators(component,
                      valuePassThru ? converter : null,
                      valuePassThru ? getValidators(bean) : null,
View Full Code Here

    if (isAutoSubmit(bean))
      AutoSubmitUtils.writeDependencies(context, arc);

    // 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 = arc.getFormData();
    if (fData != null)
    {
      ((CoreFormData) fData).addOnSubmitConverterValidators(component,
                      valuePassThru ? converter : null,
                      valuePassThru ? getValidators(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.