Package org.apache.myfaces.trinidad.component

Examples of org.apache.myfaces.trinidad.component.UIXCommand


    Map<String, Object> itemData,
    boolean isDisabled
    ) throws IOException
  {

    UIXCommand commandChild = (UIXCommand)itemData.get("component");
    if (isDisabled)
    {
      _renderText(rw, itemData);
      _renderCommandChildren(context, commandChild);
      return;
    }

    String destination = toString(itemData.get("destination"));
    boolean immediate = false;
    boolean partialSubmit = false;
    if (destination == null)
    {
      immediate = getBooleanFromProperty(itemData.get("immediate"));
      partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
      if (partialSubmit)
      {
        AutoSubmitUtils.writeDependencies(context, arc);
      }
      String clientId = commandChild.getClientId(context);
      // Make sure we don't have anything to save
      assert(arc.getCurrentClientId() == null);
      arc.setCurrentClientId(clientId);

      // Find the params up front, and save them off -
View Full Code Here


      rw.writeAttribute("title", itemData.get("shortDesc"), null);

      if (!isDisabled)
      {
        // Write the script to evaluate once the item is selected
        UIXCommand commandChild = (UIXCommand)itemData.get("component");
        String destination = toString(itemData.get("destination"));
        boolean immediate = false;
        boolean partialSubmit = false;
        if (destination == null)
        {
          immediate = getBooleanFromProperty(itemData.get("immediate"));
          partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
          if (partialSubmit)
          {
            AutoSubmitUtils.writeDependencies(context, arc);
          }
          String clientId = commandChild.getClientId(context);
          // Make sure we don't have anything to save
          assert(arc.getCurrentClientId() == null);
          arc.setCurrentClientId(clientId);

          // Find the params up front, and save them off -
View Full Code Here

      // we aren't stamping, but rather have explicitly defined children:
      for(UIComponent child : (List<UIComponent>)component.getChildren())
      {
        if (child.isRendered())
        {
          UIXCommand navItem;
          if (child instanceof UIXCommand)
          {
            navItem = (UIXCommand) child;
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navItem, -1, component);
          }
          else if(renderingHint == NavigationPaneRenderer._HINT_BAR ||
                  renderingHint == NavigationPaneRenderer._HINT_BUTTONS)
          {
            navItemData.addItemData(null);
            nonNavItemList.add(child);
          }
          else
          {
            // we don't support a non-command child for other hints.
            _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED");
            return;
          }
        }
      }
    }
    else
    {
      if (!(nodeStamp instanceof UIXCommand))
      {
        _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED");
        return;

      }

      UIXCommand navStamp = (UIXCommand) nodeStamp;

      // we are stamping the children:
      // Save the current key
      Object oldPath = component.getRowKey();

      _setStartDepthPath(component,
                         ((UIXNavigationLevel) component).getLevel());

      int componentRowCount = component.getRowCount();
      if (componentRowCount != 0)
      {
        int startIndex = component.getFirst();
        int endIndex = TableUtils.getLast(component, startIndex);

        for (int i = startIndex; i <= endIndex; i++)
        {
          component.setRowIndex(i);

          if (navStamp.isRendered())
          {
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navStamp, i, component);
          }
        }
View Full Code Here

    Map<String, Object> itemData,
    boolean isDisabled
    ) throws IOException
  {

    UIXCommand commandChild = (UIXCommand)itemData.get("component");
    if (isDisabled)
    {
      _renderText(rw, itemData);
      _renderCommandChildren(context, commandChild);
      return;
    }

    String destination = toResourceUri(context, (itemData.get("destination")));
    boolean immediate = false;
    boolean partialSubmit = false;
    if (destination == null)
    {
      immediate = getBooleanFromProperty(itemData.get("immediate"));
      partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
      if (partialSubmit)
      {
        AutoSubmitUtils.writeDependencies(context, arc);
      }
      String clientId = commandChild.getClientId(context);
      // Make sure we don't have anything to save
      assert(arc.getCurrentClientId() == null);
      arc.setCurrentClientId(clientId);

      // Find the params up front, and save them off -
View Full Code Here

    if ( !isDisabled ||
         Boolean.TRUE.equals(arc.getAgent().getCapabilities().get(
                TrinidadAgent.CAP_SUPPORTS_DISABLED_OPTIONS)))
    {
      boolean isActive = getBooleanFromProperty(itemData.get("isActive"));
      UIXCommand commandChild = null;
      String destination = null;
      boolean partialSubmit = false;
      if (!isDisabled)
      { 
         // Write the script to evaluate once the item is selected
         commandChild = (UIXCommand)itemData.get("component");
         destination = toString(itemData.get("destination"));
         if (destination == null)
         {
           partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
           if (partialSubmit)
           {
             AutoSubmitUtils.writeDependencies(context, arc);
           }
         }
      }
      rw.startElement("option", null);
      if (isActive)
      {
        rw.writeAttribute("selected", Boolean.TRUE, null);
      }
      rw.writeAttribute("disabled", isDisabled, null);
      rw.writeAttribute("title", itemData.get("shortDesc"), null);

      if (!isDisabled)
      {
        boolean immediate = false;
        if (destination == null)
        {
          immediate = getBooleanFromProperty(itemData.get("immediate"));
          String clientId = commandChild.getClientId(context);
          // Make sure we don't have anything to save
          assert(arc.getCurrentClientId() == null);
          arc.setCurrentClientId(clientId);

          // Find the params up front, and save them off -
View Full Code Here

      // we aren't stamping, but rather have explicitly defined children:
      for(UIComponent child : (List<UIComponent>)component.getChildren())
      {
        if (child.isRendered())
        {
          UIXCommand navItem;
          if (child instanceof UIXCommand)
          {
            navItem = (UIXCommand) child;
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navItem, -1, component);
          }
          else if(renderingHint == NavigationPaneRenderer._HINT_BAR ||
                  renderingHint == NavigationPaneRenderer._HINT_BUTTONS)
          {
            navItemData.addItemData(null);
            nonNavItemList.add(child);
          }
          else
          {
            // we don't support a non-command child for other hints.
            _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED");
            return;
          }
        }
      }
    }
    else
    {
      if (!(nodeStamp instanceof UIXCommand))
      {
        _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED");
        return;

      }

      UIXCommand navStamp = (UIXCommand) nodeStamp;

      // we are stamping the children:
      // Save the current key
      Object oldPath = component.getRowKey();

      _setStartDepthPath(component,
                         ((UIXNavigationLevel) component).getLevel());

      int componentRowCount = component.getRowCount();
      if (componentRowCount != 0)
      {
        int startIndex = component.getFirst();
        int endIndex = TableUtils.getLast(component, startIndex);

        for (int i = startIndex; i <= endIndex; i++)
        {
          component.setRowIndex(i);

          if (navStamp.isRendered())
          {
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navStamp, i, component);
          }
        }
View Full Code Here

    Map<String, Object> itemData,
    boolean isDisabled
    ) throws IOException
  {

    UIXCommand commandChild = (UIXCommand)itemData.get("component");
    if (isDisabled)
    {
      _renderText(rw, itemData);
      _renderCommandChildren(context, commandChild);
      return;
    }

    String destination = toResourceUri(context, (itemData.get("destination")));
    boolean immediate = false;
    boolean partialSubmit = false;
    if (destination == null)
    {
      immediate = getBooleanFromProperty(itemData.get("immediate"));
      partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
      if (partialSubmit)
      {
        AutoSubmitUtils.writeDependencies(context, arc);
      }
      String clientId = commandChild.getClientId(context);
      // Make sure we don't have anything to save
      assert(arc.getCurrentClientId() == null);
      arc.setCurrentClientId(clientId);

      // Find the params up front, and save them off -
View Full Code Here

    if ( !isDisabled ||
         Boolean.TRUE.equals(arc.getAgent().getCapabilities().get(
                TrinidadAgent.CAP_SUPPORTS_DISABLED_OPTIONS)))
    {
      boolean isActive = getBooleanFromProperty(itemData.get("isActive"));
      UIXCommand commandChild = null;
      String destination = null;
      boolean partialSubmit = false;
      if (!isDisabled)
      { 
         // Write the script to evaluate once the item is selected
         commandChild = (UIXCommand)itemData.get("component");
         destination = toString(itemData.get("destination"));
         if (destination == null)
         {
           partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
           if (partialSubmit)
           {
             AutoSubmitUtils.writeDependencies(context, arc);
           }
         }
      }
      rw.startElement("option", null);
      if (isActive)
      {
        rw.writeAttribute("selected", Boolean.TRUE, null);
      }
      rw.writeAttribute("disabled", isDisabled, null);
      rw.writeAttribute("title", itemData.get("shortDesc"), null);

      if (!isDisabled)
      {
        boolean immediate = false;
        if (destination == null)
        {
          immediate = getBooleanFromProperty(itemData.get("immediate"));
          String clientId = commandChild.getClientId(context);
          // Make sure we don't have anything to save
          assert(arc.getCurrentClientId() == null);
          arc.setCurrentClientId(clientId);

          // Find the params up front, and save them off -
View Full Code Here

      // we aren't stamping, but rather have explicitly defined children:
      for(UIComponent child : (List<UIComponent>)component.getChildren())
      {
        if (child.isRendered())
        {
          UIXCommand navItem;
          if (child instanceof UIXCommand)
          {
            navItem = (UIXCommand) child;
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navItem, -1, component);
          }
          else if(renderingHint == NavigationPaneRenderer._HINT_BAR ||
                  renderingHint == NavigationPaneRenderer._HINT_BUTTONS)
          {
            navItemData.addItemData(null);
            nonNavItemList.add(child);
          }
          else
          {
            // we don't support a non-command child for other hints.
            _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED");
            return;
          }
        }
      }
    }
    else
    {
      if (!(nodeStamp instanceof UIXCommand))
      {
        _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED");
        return;

      }

      UIXCommand navStamp = (UIXCommand) nodeStamp;

      // we are stamping the children:
      // Save the current key
      Object oldPath = component.getRowKey();

      _setStartDepthPath(component,
                         ((UIXNavigationLevel) component).getLevel());

      int componentRowCount = component.getRowCount();
      if (componentRowCount != 0)
      {
        int startIndex = component.getFirst();
        int endIndex = TableUtils.getLast(component, startIndex);

        for (int i = startIndex; i <= endIndex; i++)
        {
          component.setRowIndex(i);

          if (navStamp.isRendered())
          {
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navStamp, i, component);
          }
        }
View Full Code Here

    Map<String, Object> itemData,
    boolean             isDisabled
    ) throws IOException
  {

    UIXCommand commandChild = (UIXCommand)itemData.get("component");
    if (isDisabled)
    {
      _renderText(rw, itemData);
      _renderCommandChildren(context, commandChild);
      return;
    }

    String destination = toResourceUri(context, (itemData.get("destination")));
    boolean immediate = false;
    boolean partialSubmit = false;
    if (destination == null)
    {
      immediate = getBooleanFromProperty(itemData.get("immediate"));
      partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
      if (partialSubmit)
      {
        AutoSubmitUtils.writeDependencies(context, rc);
      }
      String clientId = commandChild.getClientId(context);
      // Make sure we don't have anything to save
      assert(rc.getCurrentClientId() == null);
      rc.setCurrentClientId(clientId);

      // Find the params up front, and save them off -
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.component.UIXCommand

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.