Package org.apache.myfaces.trinidadinternal.ui.action

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 checkBox
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    if (action != null)
      action.writeDependencies(context, node);

    // get the image source
    Object source = _getLocalSource(context, node);

    // get the destination
View Full Code Here


    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

  {
    super.postrender(context, node);

    // If we have a ClientAction which requires an explicit
    // trigger, render the trigger now...
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    if ((action != null) && action.isTriggerRequired(context, node))
    {
      renderTrigger(context, node, action);
    }
  }
View Full Code Here

    UIXRenderingContext context,
    UINode           node)
  {

    // Check for a ClientAction
    ClientAction action = ClientActionUtils.getPrimaryClientAction(context,
                                                                   node);
    // If we've got a ClientAction and it does not require an
    // explicit trigger, get the script for the action.
    if ((action != null) && !action.isTriggerRequired(context, node))
    {
      return action.getScript(context, node, Boolean.FALSE);
    }
    else
    {
      return null;
    }
View Full Code Here

    if (_isInput(context, node))
    {
      // render the id
      renderID(context, node);
      renderAttributesExceptID(context, node);
      ClientAction action = ClientActionUtils.getPrimaryClientAction
                                                     (context, node);
      String nameAttr = null;
      if(action != null)
      {
        String source = ((FireAction) action).getSource();
View Full Code Here

    {
      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

    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

                                           _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

        context.getResponseWriter().startElement(elementName, component);
        renderAttributes(context, node);

        // 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);
      }
    }
    else
    {
      // use link behavior
View Full Code Here

            "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

TOP

Related Classes of org.apache.myfaces.trinidadinternal.ui.action.ClientAction

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.