ICEfaces
  1. ICEfaces
  2. ICE-10468

ace:tree - Add ability to get relavant node objects for different events

    Details

      Description

      Feature Request: A request was made to be able to get the expanded node when an expand Ajax event was fired. Currently the states are just stored in the NodeStateMap. It would be good to have more details/objects available for the tree ajax events.

        Issue Links

          Activity

          Arran Mccullough created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Fix Version/s 4.1 [ 11375 ]
          Ken Fyten made changes -
          Fix Version/s EE-4.1.0.GA [ 12171 ]
          Fix Version/s 4.1 [ 11375 ]
          Ken Fyten made changes -
          Assignee Arturo Zambrano [ artzambrano ]
          Assignee Priority P2 [ 10011 ]
          Hide
          Arturo Zambrano added a comment -

          r48498: added TreeEvent event object to use in all ace:tree ajax event, providing a reference to the underlying data object related to the node involved in the event as well as the event type

          Show
          Arturo Zambrano added a comment - r48498: added TreeEvent event object to use in all ace:tree ajax event, providing a reference to the underlying data object related to the node involved in the event as well as the event type
          Arturo Zambrano made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Arturo Zambrano added a comment - - edited

          An example of its usage within the Showcase demos would be like this:

          	public void treeEvent(AjaxBehaviorEvent event) {
          		if (event instanceof TreeEvent) {
          			TreeEvent treeEvent = (TreeEvent) event;
          			System.out.println("*** Tree event");
          			System.out.println("expand event? " + treeEvent.isExpandEvent());
          			System.out.println("contract event? " + treeEvent.isContractEvent());
          			System.out.println("select event? " + treeEvent.isSelectEvent());
          			System.out.println("deselect event? " + treeEvent.isDeselectEvent());
          			System.out.println("reorder event? " + treeEvent.isReorderEvent());
          			Object data = treeEvent.getObject();
          			if (data != null) {
          				LocationNodeImpl locationNode = (LocationNodeImpl) data;
          				System.out.println("NAME: " + locationNode.getName());
          				System.out.println("TYPE: " + locationNode.getType());
          			}
          		}
          	}
          
          Show
          Arturo Zambrano added a comment - - edited An example of its usage within the Showcase demos would be like this: public void treeEvent(AjaxBehaviorEvent event) { if (event instanceof TreeEvent) { TreeEvent treeEvent = (TreeEvent) event; System .out.println( "*** Tree event" ); System .out.println( "expand event? " + treeEvent.isExpandEvent()); System .out.println( "contract event? " + treeEvent.isContractEvent()); System .out.println( "select event? " + treeEvent.isSelectEvent()); System .out.println( "deselect event? " + treeEvent.isDeselectEvent()); System .out.println( "reorder event? " + treeEvent.isReorderEvent()); Object data = treeEvent.getObject(); if (data != null ) { LocationNodeImpl locationNode = (LocationNodeImpl) data; System .out.println( "NAME: " + locationNode.getName()); System .out.println( "TYPE: " + locationNode.getType()); } } }
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #48498 Tue Mar 08 15:29:19 MST 2016 art.zambrano ICE-10468 added TreeEvent event object to use in all ace:tree ajax event, providing a reference to the underlying data object related to the node involved in the event as well as the event type
          Files Changed
          Commit graph ADD /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/event/TreeEvent.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tree/Tree.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tree/TreeDecoder.java
          Carmen Cristurean made changes -
          Assignee Arturo Zambrano [ artzambrano ] Carmen Cristurean [ ccristurean ]
          Carmen Cristurean made changes -
          Attachment Capture.PNG [ 22109 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #48502 Wed Mar 09 17:25:01 MST 2016 carmen.cristurean ICE-10468 Add showcase - ace:tree > Event demo.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/view/menu/data/CentralDataList.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/resources/org/icefaces/samples/showcase/view/resources/messages.properties
          Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/tree/treeEvent.xhtml
          Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/tree/TreeEventBean.java
          Hide
          Arturo Zambrano added a comment -

          r48503: fix to provide the node being dragged during reorder events

          Previously the code was trying to get the node being reordered after the reordering had already taken place in the model. This fix calculates the node key in the new location to provide the correct node in the event object.

          Please re-test reorder events.

          Show
          Arturo Zambrano added a comment - r48503: fix to provide the node being dragged during reorder events Previously the code was trying to get the node being reordered after the reordering had already taken place in the model. This fix calculates the node key in the new location to provide the correct node in the event object. Please re-test reorder events.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #48503 Wed Mar 09 17:54:22 MST 2016 art.zambrano ICE-10468 fix to provide the node being dragged during reorder events
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tree/TreeDecoder.java
          Carmen Cristurean made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Carmen Cristurean made changes -
          Assignee Carmen Cristurean [ ccristurean ] Arturo Zambrano [ artzambrano ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #48521 Thu Mar 17 14:18:24 MDT 2016 carmen.cristurean ICE-10468 update showcase ace:tree > Event demo.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/tree/treeEvent.xhtml
          Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/tree/TreeEventBean.java
          Hide
          Arturo Zambrano added a comment -

          r48553: added logic to determine the right node key in special reordering cases, in particular when a node reordering alters the indexes of the entire tree or subtree

          Show
          Arturo Zambrano added a comment - r48553: added logic to determine the right node key in special reordering cases, in particular when a node reordering alters the indexes of the entire tree or subtree
          Arturo Zambrano made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #48553 Wed Mar 23 17:35:43 MDT 2016 art.zambrano ICE-10468 added logic to determine the right node key in special reordering cases, in particular when a node reordering alters the indexes of the entire tree or subtree
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tree/TreeDecoder.java
          Hide
          Carmen Cristurean added a comment -

          ICEfaces4 trunk r48560: verified showcase > ace:tree > all demos; ran ace:tree QA regressions on FF41, Chrome49, IE11, no issues found.

          Show
          Carmen Cristurean added a comment - ICEfaces4 trunk r48560: verified showcase > ace:tree > all demos; ran ace:tree QA regressions on FF41, Chrome49, IE11, no issues found.
          Ken Fyten made changes -
          Fix Version/s EE-4.1.0.BETA [ 13072 ]
          Ken Fyten made changes -
          Fix Version/s 4.2.BETA [ 13091 ]
          Fix Version/s 4.2 [ 12870 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Arturo Zambrano made changes -
          Link This issue is duplicated by ICE-11458 [ ICE-11458 ]

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: