Package org.apache.myfaces.trinidad.component

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


    if ( !isDisabled ||
         Boolean.TRUE.equals(rc.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, rc);
           }
         }
      }
      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(rc.getCurrentClientId() == null);
          rc.setCurrentClientId(clientId);

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


  // Test sibling components
  @SuppressWarnings("unchecked")
  public void testSiblingButtons()
  {

      UIXCommand button1 = new UIXCommand();
      button1.setId("commandButton1");
      UIXCommand button2 = new UIXCommand();
      button2.setId("commandButton2");
      UIXPanel rootPanel = new UIXPanel();
      rootPanel.getChildren().add(button1);
      rootPanel.getChildren().add(button2);
     
      UIComponent cmp =
View Full Code Here

  {
      // panel
      //    table1
      //       tableChild
      //    button1 (table1 & button1 peers)
      UIXCommand button1 = new UIXCommand();
      button1.setId("commandButton1");
 
      UIXTable table1 = new UIXTable();
      table1.setId("table1");
      UIXPanel rootPanel = new UIXPanel();
      rootPanel.getChildren().add(button1);
View Full Code Here

     */

    // set up component hierarchy
    UIForm form = new UIForm();
    TestNamingContainer ncRoot = new TestNamingContainer(); ncRoot.setId("ncRoot");
    UIXCommand button1 = new UIXCommand();
    button1.setId("commandButton1");
    UIXCommand button2 = new UIXCommand();
    button2.setId("commandButton2");
   
    form.getChildren().add(ncRoot);
    ncRoot.getChildren().add(button1);
    ncRoot.getChildren().add(button2);
     
View Full Code Here

      // we aren't stamping, but rather have explicitly defined children:
      for(UIComponent child : (List<UIComponent>)component.getChildren())
      {
        try
        {
          UIXCommand navItem = (UIXCommand)child;
          if (navItem.isRendered())
          {
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navItem, -1, component);
          }
        }
        catch (ClassCastException cce)
        {
          _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED", cce);
        }
      }
    }
    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

    {
      rw.write(toString(itemData.get("text")));
      return;
    }

    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

      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())
      {
        try
        {
          UIXCommand navItem = (UIXCommand)child;
          if (navItem.isRendered())
          {
            // collect the information needed to render this nav item:
            _collectNavItemData(navItemData, navItem, -1, component);
          }
        }
        catch (ClassCastException cce)
        {
          _LOG.severe("ILLEGAL_COMPONENT_HIERARCHY_UIXCOMMAND_EXPECTED", cce);
        }
      }
    }
    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

    {
      rw.write(toString(itemData.get("text")));
      return;
    }

    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

      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

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.