Examples of ClientAction


Examples of com.fathomdb.cli.output.ClientAction

      } else {
        throw new IllegalArgumentException("Cannot choose between: " + bestEndpoint + " and " + candidate);
      }
    }

    ClientAction action = null;

    if (bestEndpoint != null) {
      // TODO: How do we want to do this? A new tag??
      String id = key.getServiceType().getKey() + ":" + key.getItemType().getKey();
      if (id.equals("jenkins:jenkinsService")) {
        action = new ClientAction(ClientAction.ClientActionType.BROWSER, "http://" + bestEndpoint.publicIp
            + ":" + bestEndpoint.publicIp);
      }
    }

    return action;
View Full Code Here

Examples of com.fathomdb.cli.output.ClientAction

    UntypedItem untypedItem = client.getItemUntyped(key, Format.XML);

    InetAddress sshAddress = findSshAddress(client, untypedItem);

    ClientAction action = null;
    if (sshAddress != null) {
      String user = "root";

      ProjectId project = key.getProject();
      if (project == null) {
        project = client.getProject();
      }
      if (project == null) {
        throw new CliException("Cannot determine project");
      }
      String projectKey = project.getKey();
      String serviceKey = "service-" + key.getServiceType().getKey();

      File sshKey = IoUtils.resolve("~/.credentials/ssh/" + projectKey + "/" + serviceKey);

      // Hmmm... user? key?
      action = new ClientAction(ClientAction.ClientActionType.SSH, user + "@" + sshAddress.getHostAddress(),
          sshKey.getAbsolutePath());
    }

    return action;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

            "NAME_VALUES_ATTR only supports String arrays");
      return (String[]) nameValues;
    }
    else
    {
      ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                     node);
      Parameter[] params = null;
      String[] map = null;
      // If there's an action, and it can render on a link, then...
      if ((action != null) && (!action.renderAsEvent(context, node)))
      {
        // ...get the parameters from the client action, and use them
        params = action.getParameters(context, node);
      }

      if (params != null)
      {
        map = new String[params.length * 2];
 
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

    {
      String destination = getDestination(context, node);

      if (destination != null)
      {
        ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                       node);
        if ((action != null) && (!action.renderAsEvent(context, node)))
        {
          // The action says it can be rendered as a simple href, so we build
          // up a full destination by appending the parameters to the current
          // destination.
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

    if (isEmpty(context, node))
      return;

    // If we've got a ClientAction, let it write its dependencies
    // before we start rendering the link
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    if (action != null)
      action.writeDependencies(context, node);

    super.prerender(context, node);

    Object styleClass = getStyleClass(context, node);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

                                           _NONE);
    if (prop != _NONE)
      return prop;

    Object onClick = super.getOnClick(context, node);
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    String actionScript = null;

    // TODO: This is a temporary way of setting blocking. Once the
    // AutoSubmitUtils makes it into the main branch, dump this and pass a
    // parameter to getSubmitScript(), which will tell it to look for and turn
    // on blocking. Similar code in ButtonRenderer also has to change.
    if (action instanceof FireAction)
    {
      UIComponent component;
      component = node.getUIComponent();
      if ((component != null)
          && Boolean.TRUE.equals(component.getAttributes().get("blocking")))
        ((FireAction) action).setBlocking(true);
    }

    if (action != null)
    {
      if (action.renderAsEvent(context, node) &&
          (getDestinationAttr(context, node) == null))
      {
        // We must ignore actionScript if there is a destination or else the
        // destination will never execute because the onclick will run first.
        actionScript = action.getScript(context, node, Boolean.FALSE);
      }
    }
    else
    {
      // If we don't have a ClientAction, check to see if we've got
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

  protected void prerender(UIXRenderingContext context, UINode node)
    throws IOException
  {
   // If we've got a ClientAction, let it write its dependencies
    // before we start rendering the link
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    if (action != null)
      action.writeDependencies(context, node);
    super.prerender(context, node);

    Object iconURI = node.getAttributeValue(context, ICON_ATTR);

View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

                                           _NONE);
    if (prop != _NONE)
      return prop;

    Object onClick = super.getOnClick(context, node);
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);

    String actionScript = null;

    if (action != null)
    {
      if (action.renderAsEvent(context, node) &&
          (getDestinationAttr(context, node) == null))
      {
        // We must ignore actionScript if there is a destination or else the
        // destination will never execute because the onclick will run first.
        actionScript = action.getScript(context, node, Boolean.FALSE);
      }
    }
    /*
    else
    {
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

  private static void _writeClientActionDependency(
    UIXRenderingContext context,
    UINode node
    ) throws IOException
  {
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    if (action != null)
    {
      action.writeDependencies(context, node);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

    UINode           node
    ) throws IOException
  {
    // If we've got a ClientAction, let it write its dependencies
    // before we start rendering the link
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    if (action != null)
      action.writeDependencies(context, node);

    super.prerender( context, node);

    // Is this choice in a branch of the tree that is repeated
    boolean isRepeatingChoice = _isRepeatingChoice(context, node);
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.