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

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


        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


                                           _ON_CLICK_NONE);
    if (prop != _ON_CLICK_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 LinkRenderer 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)
      actionScript = action.getScript(context, node, Boolean.FALSE);

    Object chainedScript = BaseDesktopUtils.getChainedJS(onClick,
                                                      actionScript,
                                                      true);
View Full Code Here

  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

    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

    {
      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

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

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

    if (action != null)
    {
      actionScript = action.getScript(context, node, Boolean.FALSE);
    }

    Object chainedScript = XhtmlLafUtils.getChainedJS(onClick,
                                                      actionScript,
                                                      true);
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.