Package org.apache.myfaces.trinidad.component

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


  public void testSiblingButtons()
  {
    RequestContext context = _createContext();
    try
    {
      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);
     
      String[] triggers = {"commandButton1"};
View Full Code Here


  public void testSiblingWithTable()
  {
    RequestContext context = _createContext();
    try
    {
      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
      UIViewRoot viewRoot = new UIViewRoot();
      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

  public void testSiblingButtons()
  {
    RequestContext context = _createContext();
    try
    {
      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);
     
      String[] triggers = {"commandButton1"};
View Full Code Here

  public void testSiblingWithTable()
  {
    RequestContext context = _createContext();
    try
    {
      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
      UIViewRoot viewRoot = new UIViewRoot();
      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

  // 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())
      {
        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

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.