Tree control loop through nodes

Hi All,
I have a tree control. I want to loop through the nodes and
add all the nodes to an array collection.
How do I do it?
Thanks in advance;
Josh

It depends on the data type of the dataProvider.
If XML, then myXML.descendants(); will return an xmlList of
all nodes. You could loop over the XMLList and build an
ArrayCollection
If the dataProvider is a collection, then you will need a
recursive function to process the dataProvider.
Tracy

Similar Messages

  • Tree control erroneously displays nodes multiple times

    I'm attempting to use a Tree control to display some data.
    I'm using an HierarchicalCollectionView as the dataProvider. All
    the data displays, but it appears on the wrong level. For instance,
    on the root level, it displays the root node (correctly marked with
    the folder icon as having children), plus all the children (on the
    root level!) If I expand the root node, underneath it it displays
    its children as expected -- now there are 2 copys of all the
    children, one in the correct place and one at the root level. If I
    expand 2nd-level nodes, their children (and children's children,
    etc) display underneath them... the pattern continues. It looks
    like every level of the hierarchy displays ALL the nodes underneath
    it, no matter how many levels down.
    I think I know why this happens: a
    HierarchicalCollectionView's createCursor() function returns an
    IViewCursor that treats the collection as linear instead of
    hierarchical. The Tree then uses this cursor to visit every node in
    the tree, displaying it. When expanding a node, it again uses one
    of these linear-type cursors, but on the children of the node
    clicked on, so it displays all the children underneath it and their
    children, etc. This seems like a major bug in the library -- I'm
    pretty sure this isn't a problem with my code. Doesn't it seem
    natural to use a HierarchicalCollectionView with a Tree control?
    Has no one else ever experienced this issue? I'd expect it to work,
    especially since HierarchicalCollectionView extends
    ICollectionView, which is what the dataProvider wants. I've looked
    through the source of the Tree class (and List, and ListBase) and I
    think it all boils down to not using the dataDescriptor's
    getChildren() method and instead using createCursor() directly on
    the dataProvider. The dataDescriptor's getChildren() method returns
    an ICollectionView that correctly only contains the next-level
    nodes, not all of the ones all the way to the bottom of the
    hierarchy. I think the bad behavior is inherited from ListBase (and
    in that class, it actually makes sense... too bad nobody overrode
    it in Tree).
    Am I wrong? Am I making a mistake somewhere in my code? If
    not, is there a workaround? Has a bug report been filed, and should
    I file one if this is indeed a bug? Any help or insight would be
    greatly appreciated.

    OK, after banging my head against this for a day and a half,
    I finally have an answer. It seems that the problem is my root node
    (and possibly others; I didn't delve that deep) is "open". I guess
    something, somewhere is calling
    IHierarchicalCollectionView.openNode() on it. Closing the node(s)
    makes the problem disappear. I've attached a reproduction script
    that's about as simple as I can make it (I guess it could be
    simpler with less data, but oh well). Why does this happen? Should
    I open a bug report? It seems to me that the correct behavior would
    be to have the open node(s) disclosure controls start out open
    rather than incorrectly displaying their children as on the same
    level as them.

  • Oracle Looping through XML nodes

    Hi,
    I have this XML which i m getting as response from a webservice. i need to loop through nodes and i m not sure how to go about it. i have done example using dbms_xmldom but i m literally stuck. this is the xml here i need to loop through
    statuslognotes for one enquiry, there may be multiple statuslognotes and need to insert into database....
    i also need to check for multiple updatedenquiry and if thats got statuslognotes....i hope you get me.
    <ProcessOperationsResult xmlns="http://www.abc.co.uk/schema/am/connector/webservice" >
    <Response SchemaVersion="1.4" xmlns="" >
    <OperationResponse>
    <GetEnquiryStatusChangesResponse>
    <UpdatedEnquiry>
    <EnquiryNumber>104</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>195</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1224</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>BBB</AssignedOfficerCode>
    <AssignedOfficerName>Testing</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>AAA</LoggedByUserId>
    </EnquiryStatusLog>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1225</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>DEF</AssignedOfficerCode>
    <AssignedOfficerName>Srinivas</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>AAA</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    <UpdatedEnquiry>
    <EnquiryNumber>105</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>196</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1226</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>Test</AssignedOfficerCode>
    <AssignedOfficerName>SS</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>BS</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    </GetEnquiryStatusChangesResponse>
    </OperationResponse>
    </Response>
    </ProcessOperationsResult>
    Any help appreciated....as i m new to this XPATH stuff in oracle.
    Cheers
    S

    hi,
    i have written this stored procedure, but i m sure this is not perfect. i want someone to help me out with this.
    CREATE OR REPLACE procedure ParseXML as
    l_xml XMLTYPE;
    l_value VARCHAR2(10);
    SCHEMALIST_DOM DBMS_XMLDOM.DOMDOCUMENT;
    SCHEMA_NODELIST DBMS_XMLDOM.DOMNODELIST;
    SCHEMA_NODELIST_SUB DBMS_XMLDOM.DOMNODELIST;
    SCHEMA_NODE DBMS_XMLDOM.DOMNODE;
    SCHEMA_sub_XPATH VARCHAR2(256);
    SCHEMA_XPATH VARCHAR2(256);
    CHILD_XPATH VARCHAR2(256);
    SOURCE_PATH VARCHAR2(256);
    XPATH_INDEX number(2);
    XPATH_sub_INDEX number(2);
    NODE_VALUE VARCHAR2(256);
    Statcode VARCHAR2(256);
    Statname VARCHAR2(256);
    Officer VARCHAR2(256);
    BEGIN
    l_xml := XMLTYPE.createXML('<ProcessOperationsResult xmlns="http://www.abc.co.uk/schema/am/connector/webservice">
    <Response SchemaVersion="1.4" xmlns="">
    <OperationResponse>
    <GetEnquiryStatusChangesResponse>
    <UpdatedEnquiry>
    <EnquiryNumber>104</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>195</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1224</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>TEST</AssignedOfficerCode>
    <AssignedOfficerName>test</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>BS</LoggedByUserId>
    </EnquiryStatusLog>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1225</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>DEF</AssignedOfficerCode>
    <AssignedOfficerName>SSi</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>SBS</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    <UpdatedEnquiry>
    <EnquiryNumber>105</EnquiryNumber>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ExternalSystemReference>196</ExternalSystemReference>
    <EnquiryStatusLog>
    <EnquiryStatusCode>1226</EnquiryStatusCode>
    <EnquiryStatusName>Cancelled By User</EnquiryStatusName>
    <AssignedOfficerCode>TEST</AssignedOfficerCode>
    <AssignedOfficerName>test</AssignedOfficerName>
    <LoggedTime>2007-12-11T14:44:53</LoggedTime>
    <LogEffectiveTime>2007-12-11T14:44:52</LogEffectiveTime>
    <StatusFollowUpTime>2007-12-11T14:44:52</StatusFollowUpTime>
    <LoggedByUserName>System Supervisor</LoggedByUserName>
    <LoggedByUserId>SBS</LoggedByUserId>
    </EnquiryStatusLog>
    </UpdatedEnquiry>
    </GetEnquiryStatusChangesResponse>
    </OperationResponse>
    </Response>
    </ProcessOperationsResult>');
    SCHEMALIST_DOM := DBMS_XMLDOM.newDOMDocument(L_XML);
    SCHEMA_NODELIST := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(SCHEMALIST_DOM,'GetEnquiryStatusChangesResponse');
    SCHEMA_NODELIST_SUB := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(SCHEMALIST_DOM,'/UpdatedEnquiry/EnquiryStatusLog');
    FOR i in 0 .. (DBMS_XMLDOM.GETLENGTH(SCHEMA_NODELIST) - 1) LOOP
    XPATH_INDEX := i+1;
    FOR j in 0 .. (DBMS_XMLDOM.GETLENGTH(SCHEMA_NODELIST_SUB) - 1) LOOP
    XPATH_SUB_INDEX := J+1;
    SCHEMA_SUB_XPATH := '/GetEnquiryStatusChangesResponse/UpdatedEnquiry[' || XPATH_INDEX || ']/EnquiryStatusLog[' || XPATH_sub_INDEX || ']/';
    --dbms_output.put_line(SCHEMA_SUB_XPATH);
    CHILD_XPATH := SCHEMA_SUB_XPATH || 'EnquiryStatusCode/text()';
    dbms_output.put_line('child path text ' || child_XPATH);
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Statcode);
    CHILD_XPATH := SCHEMA_SUB_XPATH || 'EnquiryStatusName/text()';
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Statname);
    CHILD_XPATH := SCHEMA_SUB_XPATH || 'AssignedOfficerCode/text()';
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Officer);
    dbms_output.put_line('EnquiryStatusCode => "' || Statcode || '",');
    dbms_output.put_line('EnquiryStatusname => "' || Statname || '",');
    dbms_output.put_line('AssignedOfficerCode => "' || Officer || '",');
    end loop;
    --GetEnquiryStatusChangesResponse/UpdatedEnquiry[2]
    schema_xpath := '/GetEnquiryStatusChangesResponse/UpdatedEnquiry[' || XPATH_INDEX || ']/EnquiryStatusLog['|| XPATH_INDEX || ']/' ;
    CHILD_XPATH := SCHEMA_XPATH || 'EnquiryStatusCode/text()';
    dbms_output.put_line('another node text ' || child_XPATH);
    DBMS_XSLPROCESSOR.VALUEOF(DBMS_XMLDOM.MAKENODE(SCHEMALIST_DOM),CHILD_XPATH, Statcode);
    end loop;
    end;
    Basically i may just get one UpdatedEnquiry record with multiple EnquiryStatusLog (changes),
    I need to get the EnquiryStatusLog nodes and create a insert stmt with the Enquiry Number.
    and if theres multiple <UpdatedEnquiry> nodes, i need the same thing done.
    Hope i make sense here.....
    Can someone help
    Cheers
    S

  • Problem when loop through a list within CollectionModel

    In my bean, I have these codes to define a node.
    Map<String, Object> node = new HashMap<String, Object>();
    node.put("Nodeid", nodeid);
    List theColors = new ArrayList();
    node.put("Colors", colors);
    node.put("Type", type);
    node.put("Desc", desc);
    Then, a list of these nodes are converted to CollectionModel using ModelUtils.toCollectionModel(nodes);
    In my jspx, I am able to loop through nodes, and get Type, Nodeid and Desc from the node to show on the screen.
    I am trying to loop through the list of colors within the node to draw circles with different diameter.
    <af:forEach var="theColor" items="#{node.Colors}" varStatus="vs">
    <dvt:pointLocation pointX="50%" pointY="50%">
    <dvt:marker id="mk2" scaleX="#{15-vs.index*2}" scaleY="#{15-vs.index*2}" shape="circle" fillColor="#{theColor}" />
    </dvt:pointLocation>
    </af:forEach>
    But above code does not work.
    Can someone help me? Any suggestions?
    Thanks.

    I want to call a javascript function inside a c:forEach loop.Nope sorry, won't work.
    Java/JSP runs on the server. At the server end, any html/script code is just template text to output to an html file.
    The server produces an html file, and sends it to the client.
    Java stops running.
    Java cannot call javascript, javascript can not call java. There is no direct communication.
    Java code can produce javascript code to run on a page.
    The only communication javascript has back with the server is if it makes a request (click a link, submit a button, Ajax call...)

  • Loop through tree node children recursively

    Is there an easy way of looping through all the child nodes of a MutableTreeNode and the children of those children if they have any?
    Thanks

    With a recursive function (this is depth first):
    public void traverse(Node node) {
      // do something with node
      for(Node child : node.getChildren()) {
        traverse(child);
    }You could also look at depthFirst/breathFirst/preorder/postorderEnumeration() methods on DefaultMutableTreeNode if that's what you actually got.

  • Need to loop through Recursive node

    Hi Everyone,
    I am having troubles looping through a node to get a boolean value called "Check".
    Basically I am using the TreeNesteedInTable UI.  One of the columns I display is the "Check" mentioned above.  Basically the user can go through the tree structure and check his/her options.  I should then be able to loop through this structure to get all the records "Checked".  My application is not doing this.
    At the moment I am looping through the top level node - think this is where my probelm is because this node can only be singleton!  This means that I then have to loop through the Recusrsive node of this type to get the values as the recusrive is always non-singleton en must therefor contain the elements I am looking for.  But, i do not know how tho get access to this node.  Is this the correct way of doing it, or how should it be done otherwise?
    Many thanks,
    Christiaan

    HI,
    I got it to work like this:
    public void addICAMForIncident( )  {
        //@@begin addICAMForIncident()
           IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
              try {
                   int count;
                   Bapi1240_Rc rootCause;
                   IPublicEhs_icam.IAbsentOrFailedControlsElement existingAbsentOrFailedControlsElement;
                   IPublicEhs_icam.IAbsentOrFailedControlsElement recursive;
                   IPublicEhs_icam.IAbsentOrFailedControlsElement recursiveChildElement;
                   IPublicEhs_icam.IAbsentOrFailedControlsNode      recursiveChildNode;
              //     if(wdContext.nodeAbsentOrFailedControls() != null){
                             // set header data:
                             wdContext.currentHeader_CreateElement().setRecord_No(wdContext.currentHeader_GDElement().getRecord_No());
                             wdContext.currentHeader_CreateElement().setRecno_Root(wdContext.currentHeader_GDElement().getRecno_Root());
                             wdContext.currentHeader_CreateElement().setIncident(wdContext.currentGPInputNodeElement().getIPIncidentNum());
                             //Top Level Node (Singleton)
                             existingAbsentOrFailedControlsElement = wdContext.currentAbsentOrFailedControlsElement();
                             //We need to go through the values of the RECURSIVE node as that is where the values are!
                             //Each time we expand a node in the tree this recursive node is filled with values
                             for(int i = 0;i<existingAbsentOrFailedControlsElement.nodeRecursiveAbsentOrFailedControl().size();i++)
                                       recursiveChildNode = existingAbsentOrFailedControlsElement.nodeRecursiveAbsentOrFailedControl().nodeRecursiveAbsentOrFailedControl(i);
                                       for(int m = 0;m<recursiveChildNode.size();m++)
                                            recursiveChildElement = recursiveChildNode.getAbsentOrFailedControlsElementAt(m);
                                            if(recursiveChildElement.getCheck())
                                                 //New line in the "table":
                                                 rootCause = new Bapi1240_Rc();
                                                 rootCause.setFunction("009");
                                                 rootCause.setHierarchy_Key("EHS_IAL_STD");
                                                 rootCause.setNode_Key(recursiveChildElement.getNODE_ID());
                                                 rootCause.setRef_Recno(wdContext.currentHeader_GDElement().getRecord_No());
                                                 rootCause.setRef_Object("IAL");
                                                 rootCause.setRef_Recno_Smeas("0");
                                                 rootCause.setPrimarykey("00000000000000000001");
                                                 rootCause.setForeignkey("00000000000000000001");
                                                 rootCause.setFlgfrgnkey(true);
                                                 rootCause.setFlgprimkey(true);
                                                 rootCause.setFlag_Selected(true);
                                                 //add the line to the "table":
                                                 createInput.addRootcause(rootCause);
                                            }//end if
                                       }//end for
                        }// end for
                   // execute:
                   wdContext.currentBapi_Bus1240_Create_InputElement().modelObject().execute();
                   // invalidate the output structure:
                   wdContext.nodeOutput_Create().invalidate();
              } catch (CMIException ex) {
                   msgMgr.reportException(ex.getLocalizedMessage(), true);
        //@@end

  • Cannot loop through values in Node

    Hi Everyone,
    I am using a TreeNestedInTable UI.  I have 2 columns: a Master Column with a TextView Cell Editor, and a field called "Check" whereby one of the values in the Master Column can be selected.  The "checked" attribute of the Check column is mapped to a isChecked attribute in my Node that contains all the data being displayed in the TreeNestedInTable (IncidentAgent Node).
    I would like to loop through all the Check boxes ticked in this TreeNestedInTable and get the corresponding Value to write to a Test Node (to make sure that I am in fact reading all cheked rows).
    I do not seem to, however, get all the values checked.  Please see my code below and comment.  I am testing and so I put a button on the screen that should loop through all the values and see which ones are checked.  It should then write these checked valus to a node that is also linked to a table control on the screen.  The Idea is that each time you check a few values they should be displayed in this table control when the button is pressed.  This is not happening - the table stays blank.
    public void onActionSeeIACollection(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSeeIACollection(ServerEvent)
           IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
           //New Element added each time:
           ITEST_IA_NODEElement newElement;
           //Incident Agent element:
           IIncidentAgentElement agentElement;
           //Loop through ALL the IncidentAgent Elements and see which ones hace got the "Check" value
           //flagged:
           for(int i=0;i<wdContext.nodeIncidentAgent().size();i++)
                //Get the currently processed element:
                agentElement = wdContext.nodeIncidentAgent().getIncidentAgentElementAt(i);
                //If the Check value is flagged, add it to the TEST_IA_NODE node:
                if(agentElement.getCheck())
                     newElement = wdContext.createAndAddTEST_IA_NODEElement();
                     newElement.setVALUE(agentElement.getVALUE());
                     msgMgr.reportSuccess(agentElement.getVALUE());
                }//end if
           }//end for
        //@@end

    Sure.  Thank you for your help.
    "Data Containing" Node:
    h1  IncidentAgent(Top Level Node)
         h2 RecursiveNode(Pointing to IncidentAgent as recursiveNode)
           h4 Check (boolean attribute)
           h4 ChildrenLoaded (boolean attribute for TreeNestedInTable)
           h4 Expanded (boolean attribute for TreeNestedInTable)
           h4 IsLeaf (boolean attribute for TreeNestedInTable)
           h4 NODE_ID (attribute)
           h4 PARENT_ID (attribute)
           h4 VALUE (attribute)
    Collection Cardinality: 0...N
    Selection Cardinality: 0...N
    Singleton: TRUE
    Node that should contain VALUE attribute from node above if Check attribute above is checked
    h1 TEST_IA_NODE
           h4 VALUE
    Collection Cardinality: 0...N
    Selection Cardinality: 0...N
    Singleton: TRUE

  • Looping through DOM nodes ....

    Hi,
    I am having a problem looping through the DOM tree and inserting the nodes into my table correctly.
    here is the basic structure of my XML file:
    <root>
    <row>
    <user>
    <db>
    <data>A</data>
    <data>B</data>
    </db>
    </user>
    <user>
    <db>
    <data>A</data>
    <data>B</data>
    <data>C</data>
    </db>
    </user>
    </row>
    </root>
    now, I need to put the text in the data-tag into a table, but since I dont know how many elements there are how in the world would one be able to insert the correct amount? Is there an Xpath-function that can count the nodes for me? I need some assistance or examples on PLSQL code for this please. I have so far just gone through with a for-loop with a delimiter=xmldom.getLength(mynodes) but that only measures the very first users data-tag, and that leaves the rest kinda in a lotto situation if the db-elements below have more or less data-elements than the first one. In addition its inserted a blank in the field in the table(not good).....
    thanks for any help or assistance,
    Sven

    Hi,
    I am having a problem looping through the DOM tree and inserting the nodes into my table correctly.
    here is the basic structure of my XML file:
    <root>
    <row>
    <user>
    <db>
    <data>A</data>
    <data>B</data>
    </db>
    </user>
    <user>
    <db>
    <data>A</data>
    <data>B</data>
    <data>C</data>
    </db>
    </user>
    </row>
    </root>
    now, I need to put the text in the data-tag into a table, but since I dont know how many elements there are how in the world would one be able to insert the correct amount? Is there an Xpath-function that can count the nodes for me? I need some assistance or examples on PLSQL code for this please. I have so far just gone through with a for-loop with a delimiter=xmldom.getLength(mynodes) but that only measures the very first users data-tag, and that leaves the rest kinda in a lotto situation if the db-elements below have more or less data-elements than the first one. In addition its inserted a blank in the field in the table(not good).....
    thanks for any help or assistance,
    Sven

  • Looping through XML tree

    Hi All,
    I need help in retrieving the values of nodes in a XML tree
    If I have a xml document like
    <form>
    <item>
    <form_seq_no>1</form_inst_seq_no>
    <patientid>21</patientid>
    <facilityid>23</facilityid>
    </item>
    <item>
    <form_seq_no>2</form_inst_seq_no>
    <patientid>212</patientid>
    <facilityid>233</facilityid>
    </item>
    <item>
    <form_seq_no>3</form_inst_seq_no>
    <patientid>213</patientid>
    <facilityid>234</facilityid>
    </item>
    How can I get the values of form_Seq_no node?
    I want to loop for all the nodes so that I can update a table for every form_seq_no....
    Thanks....

    Why did you open a new thread where the problem seems to be exactly the same as the one from your Re: Looping through XML Items?
    In particular what is wrong with the solution given Re: Looping through XML Items?

  • How to binding incoming xml node list to the tree control as dataProvider

    Recently, I faced into one issue: I want to binding incoming xml node (it's not avaliable at start) list to the tree control as a dataProvider.
    Since the incoming xml node list is not avaliable at beginning but I needs to bind it to the tree, so I create one virtual one in the xml, and prepare to remove it before the tree is shown. (ready for the actual node adding). But It did not work.
    Please see the presudo-code here:
    1.  Model layer(CsModel.as)
    public class CsModel
            [Bindable]
            public var treeXML:XML=<nodes><car label="virtualOne" id="1">
                                   </car></nodes>;
            (Here, I want to build binding relationship on the <car/> node,
             one 'virtual/stub' node is set here with lable="virtualOne".
             But this node will be deleted after IdTree
             control is created completely.)      
            [Bindable]
            public var treeData:XMLList =new XMLListCollection(treeXML.car);
    2. view layer(treePage.mxml)
            private var _model:CsModel = new CsModel();
            private function addNode():void
                    var newNode:XML=<car/>;
                    newNode.@label="newOne";
                    newNode.@id=1;
                    _model.treeXML.appendChild(newNode);
                             private function cleanData():void
                                     delete _model.treeXML.car;
            <mx:VBox height="100%" width="100%">
            <mx:Button label="AddNode" click="addNode()" />
            <mx:Tree id="IdTree"  labelField="@label"
              creationComplete="cleanData()"
              dataProvider="{_model}"/>
        </mx:VBox>
    3. Top view layer (App.Mxml)
    <mx:application>
        <treePage />
    </mx:application>
    For method: cleanData(),It's expected that when the treePage is shown, we first delete the virutalOne to provide one 'clear' tree since we don't want show virtualOne to the user. The virutalOne node just for building the relationship between treeData and treeXML at beginning. But the side effect of this method, I found, is that the relationship between treeXML and treeData was cut off. And this leads to that when I added new node (by click the 'addNode' button) to the xmlXML, the xmlData was not affected at all !
    So Is there any other way to solve this issue or bind the incoming xml node list to the xmlListCollection which will be used as Tree control's dataProvider ?

    If u want to display the name : value then u can do like this
    <xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" />

  • How to loop through a Data Node

    Hello,
    I have an Interactive Adobe form in WebDynpro Java project. 
    My data View tab includes the following structure:
    Bapi_test
    ValueHelpData
    CodeNumber
    CodeDescription
    Can someone please tell how I can loop through the “ValueHelpData” node, and get values for “CodeNumber” and “CodeDescription”
    The ValueHelpData node has the cardinality of  0..n. and has approximately 100 elements.
    Thanks. Your help is much appreciated.
    Rob.

    Hi Robby,
    You could try the following :
    int n = wdContext.nodeValueHelpData().size();
    for(int i = 0; i < n; i++)
       wdContext.nodeValueHelpData().moveTo(i);
       IPrivateMyDataView.IValueHelpDataElement ele = wdContext.currentValueHelpDataElement();
       String codenum = ele.getCodeNumber();
       String codedesc = ele.getCodeDescription();
       // Any other processing logic..//
    Hope this helps.

  • How to open child node in Tree control?

    Hi All,
    I am using arrayCollection in my tree control.
    I want to open one child node based on name of that node.
    How to open that chid node?
    I tried tree.OpenItems and ExpandItem methods. IT is not working. Any idea how to do it?

    write this statement
    TreeObject.expandItem("the branch",true)
    But make sure you dont call this statement right after you set the dataProvider for the tree object. Instead wait for a second or two and then call this statement. This delay is allow the tree object ot call it validate functions.
    Let me know if it helps

  • Save selected node in Tree control

    I'm making this flex form for my school to add a new student
    to the DB. When the admin clicks on a button it will open a Tree
    control that displays the available courses and sections in the
    following heirarchy:
    Year>Semester>Course Name>Sections
    Now I want that when he clicks on the button Select within
    this new window showing the Tree, it will store the current
    selected node and the full path to it, so that back in the original
    form it will display the Year, Semester, Course name and section.
    I've tried using the value and selecteditem methods from the tree
    control but they are not working. Any ideas to figure out the full
    path of the selected item?

    You will need to climb back up the ancestor nodes to build
    that path yourself.
    "parent()" i believe returns the parent of the current node.
    Tracy

  • Tree Control Property Node for Accessing "Child Text" String Array

    When adding items to a tree control using the EditTreeItems invoke nodes, the inputs include "Child Tag", "Item Indent", "Child Only?", "Glyph Index", "Child Text", and "Left Cell String" as can be seen in this screenshot.
    There are property nodes for the tree control for accessing each of these elements, except for the "Child Text", which is an array of strings. It is possible to access this data as outlined in this forum post, but this method is somewhat involved and round about. 
    I suggest that a property for the Tree class be created to access the Child Text array directly.

     The work around only works if you do not have an empty string element some where in the middle.
    At lest could the "Active Celltring Property" read return an error when you have gone beyond the end of the array.

  • Tree control with Nodes in ALV

    Hi ABAP Gurus,
    I am trying to create tree control with nodes in ALV. I have referred to standard BCALV_TREE* programs but new to OO programming. Not sure as to how I can display my internal table data than the SFLIGHT information in these programs. Can you please let me know how this can be done or if I can use any ALV function modules for the node display.
    thanks,
    Chaitanya

    Maybe you could use this.  Call this VI from a Value Change event of the tree.
    Attachments:
    Check_Tree_Items.vi ‏28 KB

Maybe you are looking for

  • Hiya. Since I upgraded to Firefox 36 my MacBook Air battery has been draining horrendously quickly. Is there anything I can do to fix this?

    Since I upgraded to Firefox 36 a few days ago my MacBook Air's battery has been draining at a horrendous rate when I've got Firefox open. For instance, just now when I'd not got Firefox open, my activity monitor told me I've got two hours usage, but

  • Record audio from microphone in .swf

    Hello i need to record audio with help of microphone, can any 1 tell me how it is possible and what is the possible way to do this. I am having flash 8 and flash communication(media) server 2.0 Please let me know which are the possible ways to this t

  • Idoc inbound processing - Combine process codes

    Hello, i have the following problem. I receive an idoc from system a) and i want to process the idoc in the HR system and afterwards I want to forward the idoc to System B). If i use HRMD as process code for in the partner profile on the HR system -

  • Limited photo album

    Still waiting for the Docs to Go to be improved to reach the standard on the Playbook. Never, I presume. However, my main problem right now is that, on Facebook, I have any number of albums. When I use Facebook on the Z10 it never shows the full numb

  • Deletion of Parent Record

    Hi! I want to delete parent record, but error comes that Child record present. Is any way to delete Parent Record. Regards!