Package org.apache.myfaces.trinidad.component.core.nav

Examples of org.apache.myfaces.trinidad.component.core.nav.CoreGoButton


    //
    // 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[]{
                                        TrinidadRenderingConstants.EVENT_PARAM,
                                        TrinidadRenderingConstants.CANCEL_EVENT
                                      });

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

      String value = __getParam(context, TrinidadRenderingConstants.VALUE_PARAM);
      if (value != null)
      {
        long lg = Long.parseLong(value);
View Full Code Here


{
  static public CoreGoButton createGoButton(
    RenderingContext arc,
    String              textKey)
  {
    CoreGoButton button = new CoreGoButton();
    String selectText = arc.getTranslatedString(textKey);
    button.setText(StringUtils.stripMnemonic(selectText));
    char ch = _getMnemonic(selectText);
    if (ch != 0)
      button.setAccessKey(ch);
    return button;
  }
View Full Code Here

  {
    String elementID = getClientId(context, component);
    boolean isPartial = PartialPageUtils.supportsPartialRendering(rc);
    String onclick = _getScriptContents(rc, bean, elementID, isPartial, false);

    CoreGoButton goButton = new CoreGoButton();
    goButton.setOnclick(onclick);
    goButton.setText(rc.getTranslatedString("af_poll.MANUAL"));

    goButton.encodeBegin(context);
    goButton.encodeEnd(context);
  }
View Full Code Here

  {
    String elementID = getClientId(context, component);
    boolean isPartial = PartialPageUtils.supportsPartialRendering(rc);
    String onclick = _getScriptContents(rc, bean, elementID, isPartial, false);

    CoreGoButton goButton = new CoreGoButton();
    goButton.setOnclick(onclick);
    goButton.setText(rc.getTranslatedString("af_poll.MANUAL"));

    goButton.encodeBegin(context);
    goButton.encodeEnd(context);
  }
View Full Code Here

    //
    // 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);
View Full Code Here

{
  static public CoreGoButton createGoButton(
    RenderingContext arc,
    String              textKey)
  {
    CoreGoButton button = new CoreGoButton();
    String selectText = arc.getTranslatedString(textKey);
    button.setText(StringUtils.stripMnemonic(selectText));
    char ch = _getMnemonic(selectText);
    if (ch != 0)
      button.setAccessKey(ch);
    return button;
  }
View Full Code Here

    cf5.setHalign("end");
    CorePanelButtonBar bar = new CorePanelButtonBar();
    cf5.getChildren().add(bar);


    CoreGoButton cancel =
       JspUtils.createGoButton(arc, "af_inputColor.CANCEL");
    bar.getChildren().add(cancel);
    cancel.setOnclick("doCancel()");

    CoreGoButton select =
       JspUtils.createGoButton(arc, "af_inputColor.APPLY");
    bar.getChildren().add(select);
    select.setOnclick("return selectColor()");

    HtmlScript script = new HtmlScript();
    script.setText(_SCRIPT);
    doc.getChildren().add(script);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.component.core.nav.CoreGoButton

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.