Examples of UIForm


Examples of javax.faces.component.UIForm

    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

Examples of javax.faces.component.UIForm

   * @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

Examples of javax.faces.component.UIForm

   * @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

Examples of org.apache.myfaces.tobago.component.UIForm

    super.onComponentPopulated(faceletContext, panel, parent);
    if (panel.getChildCount() == 2) {
      Application application = faceletContext.getFacesContext().getApplication();
      UIViewRoot root = ComponentSupport.getViewRoot(faceletContext, parent);

      UIForm form = (UIForm) application.createComponent(UIForm.COMPONENT_TYPE);
      form.setRendererType(RendererTypes.FORM);
      form.setId(formIdAttribute != null ? formIdAttribute.getValue(faceletContext) : root.createUniqueId());
      panel.getChildren().add(form);

      UIDatePicker picker = (UIDatePicker) application.createComponent(UIDatePicker.COMPONENT_TYPE);
      picker.setRendererType(RendererTypes.DATE_PICKER);
      picker.setFor("@auto");
      picker.setId(pickerIdAttribute != null ? pickerIdAttribute.getValue(faceletContext) : root.createUniqueId());
      if (picker.getAttributes().get(OnComponentCreated.MARKER) == null) {
        picker.getAttributes().put(OnComponentCreated.MARKER, Boolean.TRUE);
        picker.onComponentCreated(faceletContext.getFacesContext(), panel);
      }
      if (markupAttribute != null) {
        if (markupAttribute.isLiteral()) {
          picker.setMarkup(Markup.valueOf(markupAttribute.getValue()));
        } else {
          ValueExpression expression = markupAttribute.getValueExpression(faceletContext, Object.class);
          ELAdaptor.setExpression(picker, Attributes.MARKUP, expression);
        }
      }
      form.getChildren().add(picker);
    }
  }
View Full Code Here

Examples of org.exoplatform.webui.form.UIForm

   {
      if (uiInput.getValue() == null || ((String)uiInput.getValue()).length() == 0)
         return;
      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
      catch (Exception e)
      {
         label = uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.form.UIForm

         return;
      String s = uiInput.getValue().toString().trim();
      if (s.matches(URL_REGEX))
         return;

      UIForm uiForm = ((UIComponent)uiInput).getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
      catch (Exception e)
      {
         label = uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.form.UIForm

   public void validate(UIFormInput uiInput) throws Exception
   {
      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
      catch (Exception e)
      {
         label = uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.form.UIForm

   {
      if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)
         return;
      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
      catch (Exception e)
      {
         label = uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.form.UIForm

      String s = (String)uiInput.getValue();
      DateFormat stFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
      UIFormDateTimeInput uiDateInput = (UIFormDateTimeInput)uiInput;
      SimpleDateFormat sdf = new SimpleDateFormat(uiDateInput.getDatePattern_().trim());

      UIForm uiForm = ((UIComponent)uiInput).getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
      catch (Exception e)
      {
         label = uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.form.UIForm

         }
      }

      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
      catch (Exception e)
      {
         label = uiInput.getName();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.