Examples of CoreForm


Examples of org.apache.myfaces.trinidad.component.core.CoreForm

    {


        super.setUpTestCase();

        CoreForm form = new CoreForm();
        facesContext.getViewRoot().getChildren().add(form);

        outputLabel = new CoreOutputLabel();
        //outputLabel.setParent(form);
        // For Trinidad we shouldn't set the parent our selves, it gives errors when running from SureFire.
        form.getChildren().add(outputLabel);

        inputComponent = new CoreInputText();
        inputComponent.setId("input");
        form.getChildren().add(inputComponent);

        inputHidden = new CoreInputHidden();
        inputHidden.setId("hidden");
        form.getChildren().add(inputHidden);


        bean = new DataBean();
        facesContext.getExternalContext().getRequestMap().put("testBean", bean);
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

    CoreDocument doc = new CoreDocument();
    context.getViewRoot().getChildren().add(doc);

    doc.setTitle(arc.getTranslatedString("af_inputColor.PICKER_TITLE"));
   
    CoreForm form = new CoreForm();
    form.setId("d");
    doc.getChildren().add(form);
   
    HtmlTableLayout tl = new HtmlTableLayout();
    form.getChildren().add(tl);
   
    HtmlRowLayout rl1 = new HtmlRowLayout();
    tl.getChildren().add(rl1);
    HtmlCellFormat cf1 = new HtmlCellFormat();
    rl1.getChildren().add(cf1);
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

    RenderingContext arc = RenderingContext.getCurrentInstance();
    CoreDocument doc = new CoreDocument();
    context.getViewRoot().getChildren().add(doc);
    doc.setTitle(arc.getTranslatedString(_DIALOG_TITLE_KEY));

    CoreForm form = new CoreForm();
    doc.getChildren().add(form);
    form.setId("a");

    boolean isDesktop = (arc.getAgent().getType().equals(Agent.TYPE_DESKTOP));

    //
    // Create the calendar row
    //
    UIComponent calendarRow = _createRow(isDesktop,
                                         XhtmlConstants.H_ALIGN_END);
    CoreChooseDate ccd = CalendarUtils.createChooseDate(context);
    calendarRow.getChildren().add(ccd);

    // Get a destination that points back to this dialog, including
    // any viewIDs
    String destination =
      GenericEntry.getGenericEntryURL(context,
                                      GenericEntry.CALENDAR_DIALOG_ENTRY);
    ccd.getAttributes().put("destination", destination);

    //
    // Create a spacer
    //
    UIComponent spacerRow = _createRow(isDesktop, null);
    CoreSpacer cos = new CoreSpacer();
    spacerRow.getChildren().add(cos);
    cos.setHeight("8");

    //
    // Create the button row
    //
    UIComponent buttonRow = _createRow(isDesktop, XhtmlConstants.H_ALIGN_END);

    CoreGoButton cancelButton =
       JspUtils.createGoButton(arc, _CANCEL_LABEL_KEY);
    buttonRow.getChildren().add(cancelButton);

    Object cap = arc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_MULTIPLE_WINDOWS);
    boolean multWindowsSupported = Boolean.TRUE.equals( cap );
    if (multWindowsSupported )
    {
      cancelButton.setOnclick("return _doCancel()");
    }
    else
    {
      // create the destination of the cancel button
      StringBuffer cancelDest = new StringBuffer();
      EncoderUtils.appendURLArguments(cancelDest,
                                      destination,
                                      new String[]{
                                        XhtmlConstants.EVENT_PARAM,
                                        XhtmlConstants.CANCEL_EVENT
                                      });

      // Prepend a slash, because this destination already
      // includes the context root
      cancelButton.setDestination("/" + cancelDest.toString());

      String value = __getParam(context, XhtmlConstants.VALUE_PARAM);
      if (value != null)
      {
        long lg = Long.parseLong(value);
        ccd.getAttributes().put("value", new Date(lg));
      }

      // get the scrolled value
      String month = __getParam(context,XhtmlConstants.MONTH_PARAM);
      String year = __getParam(context,XhtmlConstants.YEAR_PARAM);

      // try to create scrolledValue
      if ( month != null && year != null )
      {
        try
        {
          long scrolledValue = Long.parseLong(month) + Long.parseLong(year);


          ccd.getAttributes().put("scrolledValue", new Date(scrolledValue));
        }
        catch ( NumberFormatException nfe){;}
      }
    }

    if (multWindowsSupported )
    {
      CoreImportScript cis = new CoreImportScript();
      cis.setNames(new String[]{"_doCancel()", "_selectDate()"});
      doc.getFacets().put(CoreDocument.META_CONTAINER_FACET, cis);

      HtmlTableLayout htl = new HtmlTableLayout();
      form.getChildren().add(htl);

      //
      // Add the rows to the stacker
      //
      htl.getChildren().add(calendarRow);
      htl.getChildren().add(spacerRow);
      htl.getChildren().add(buttonRow);
    }
    else
    {
      CorePanelGroupLayout cpg = new CorePanelGroupLayout();
      form.getChildren().add(cpg);

      cpg.setLayout(CorePanelGroupLayout.LAYOUT_VERTICAL);
      cpg.getChildren().add(calendarRow);
      cpg.getChildren().add(spacerRow);
      cpg.getChildren().add(buttonRow);
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

      // We wrap all of our values/scripts inside of a span so that
      // they can be easily updated during a partial page render.
      // Note: it is essential that we call context.getResponseWriter()
      // *after* calling _startPartialPostscriptRender().  Otherwise,
      // we'll end up writing to the null output method.
      writer.startElement("span", new CoreForm()
      {
        public String getClientId(FacesContext context)
        {
          return postscriptId;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

      // We wrap all of our values/scripts inside of a span so that
      // they can be easily updated during a partial page render.
      // Note: it is essential that we call context.getResponseWriter()
      // *after* calling _startPartialPostscriptRender().  Otherwise,
      // we'll end up writing to the null output method.
      writer.startElement("span", new CoreForm()
      {
        public String getClientId(FacesContext context)
        {
          return postscriptId;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

      // We wrap all of our values/scripts inside of a span so that
      // they can be easily updated during a partial page render.
      // Note: it is essential that we call context.getResponseWriter()
      // *after* calling _startPartialPostscriptRender().  Otherwise,
      // we'll end up writing to the null output method.
      rw.startElement("span", new CoreForm()
      {
        public String getClientId(FacesContext context)
        {
          return postscriptId;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

      // We wrap all of our values/scripts inside of a span so that
      // they can be easily updated during a partial page render.
      // Note: it is essential that we call context.getResponseWriter()
      // *after* calling _startPartialPostscriptRender().  Otherwise,
      // we'll end up writing to the null output method.
      rw.startElement("span", new CoreForm()
      {
        public String getClientId(FacesContext context)
        {
          return postscriptId;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

      // We wrap all of our values/scripts inside of a span so that
      // they can be easily updated during a partial page render.
      // Note: it is essential that we call context.getResponseWriter()
      // *after* calling _startPartialPostscriptRender().  Otherwise,
      // we'll end up writing to the null output method.
      writer.startElement("span", new CoreForm()
      {
        public String getClientId(FacesContext context)
        {
          return postscriptId;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

      // We wrap all of our values/scripts inside of a span so that
      // they can be easily updated during a partial page render.
      // Note: it is essential that we call context.getResponseWriter()
      // *after* calling _startPartialPostscriptRender().  Otherwise,
      // we'll end up writing to the null output method.
      rw.startElement("span", new CoreForm()
      {
        public String getClientId(FacesContext context)
        {
          return postscriptId;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.core.CoreForm

      // We wrap all of our values/scripts inside of a span so that
      // they can be easily updated during a partial page render.
      // Note: it is essential that we call context.getResponseWriter()
      // *after* calling _startPartialPostscriptRender().  Otherwise,
      // we'll end up writing to the null output method.
      rw.startElement("span", new CoreForm()
      {
        public String getClientId(FacesContext context)
        {
          return postscriptId;
        }
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.