Questions reg Looping through a Node inside a Currently Selected Node.

i have the following context structure in my WD application.
Parent Customer Node  A<Cardinality 1.n & Selection 1.n & Singleton True>
      Child Addresses Node B<Cardinality 1.n & Selection 1.n & Singleton True>
              Child Attribute B.City
      Child Attribute A.Name
      Child Attribute A.Age
For the currently selected Parent Customer Element, i want to read the all the addresses this customer has. How to read all the addresses of the customer and loop through it & show it.
Any inputs are appreciated.

Hello Saravanan,
Please use the Singleton Concept.
Refer the following links.
http://help.sap.com/saphelp_nwce711core/helpdata/en/47/be673f79c8296fe10000000a42189b/frameset.htm
http://wiki.sdn.sap.com/wiki/display/WDJava/SupplyFunctionin+Webdynpro
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60086bd5-9301-2b10-6f97-a14366a5602b/
if you have doubt in implementation then let us know.
Regards
Nizamudeen SM

Similar Messages

  • Question about Looping through tables in Adobe Form

    Hello,
    We have an adobe form which is to be filled offline. It consists of a table. Table can have repeating rows and user can add\remove rows as they wish.  The cardinality of the context node where we need to bind this table data is set to 1…n
    We want to know the process to get all the values in the table back into our context node once the form is uploaded. I assume we need to loop through the table, and add elements to the context node.  Can someone please let us know if we’re on the right track, and provide some sample code if possible?
    <b>We can’t figure out a way to loop through a table inside an Adobe form.</b>
    We are using Web Dynpro Java with Adobe Livecycle Designer 7.1
    Your help is much appreciated.
    Thanks,
    Rob.

    Try using...
    for (z = 0; z < 16; z++) {
         this["cb"+z].setStyle("styleName", "cssCBstyle");
    That is the way to target them.  I haven't dealt with setting styles, so I can't answer for that aspect working or not.

  • JTree: How to get the currently selected node

    How do I get the currently selected node in JTree?
    getLastSelectedPathComponent() this method always return the last selected node and not the current one.
    Thanks in advance
    Sachin

    Use
    TreePath selectedPath = tree.getSelectionPath()If your tree allows multiple selections, use
    TreePath [] selectedPaths = tree.getSelectionPaths() this will return an array of all selected tree paths.
    Once you get the tree path, call the treePath.getLastPathComponent(). this should tell you the currently selected node.
    Hope this helps
    Sai Pullabhotla

  • How to get  a Current Navigation model  Current Selection (node) ID

    Hi,
    we are using default navigation model for page navigation in our application.
    I am trying to get Id of Default Navigation model node, I am able to get the Title using following code which available in globe template.
    Code – pageTemaplate_globe.jspx :
    <af:forEach var="node" varStatus="vs"
    items="#{navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}">
    <af:subform id="pt_sfm1">
    <div class="bea-portal-book-primary-menu-single-item">
    <af:switcher id="pt_sw1"
    facetName="#{(empty node.attributes['Target']) || (node.attributes['Target'] == '_popup') ? 'command' : 'golink'}">
    <f:facet name="command">
    <af:commandLink id="pt_cl1" text="#{node.title}"
    action="#{MyAccBean.menuItemListAction}"
    disabled="#{not node.navigable}"
    actionListener="#{navigationContext.processAction}"
    clientComponent="#{node.attributes['Target'] == '_popup' ? true : false}">
    <!-- pass node to processAction for setting current selection and navigation -->
    <f:attribute name="node" value="#{node}"/>
    <af:setActionListener from="#{node.title}"
    to="#{pageFlowScope.menunodetitle}"/>
    I am using +<af:setActionListener/>+ to set Title to variable and using in that in code.
    Is there a way that i can get ID in the same way as title?
    I see following EL from documentation but there is no ID attributes available.
    EL: #{navigationContext.defaultNavigationModel.currentSelection.attributes['Description']}
    EL: #{navigationContext.defaultNavigationModel.currentSelection.title}
    Please help me…
    Thank you,
    SP

    Hi.
    Doesn't exist direct access to node Id but you can use this EL Expression to get it:
    #{node.prettyUrlPath[node.depth]}Regards.

  • 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

  • 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...)

  • Does anyone know a way to programatically loop through the items in the document library

    A lot of the funcations like deleteSymbol and updateSymbol depend on which items are "selected" in the library panel.
    Is there a way to programatically access these selections?
    or
    Loop through the library?
    or
    Set selections?

    Yup, I've asked for an API to access the selection in those panels for years, to no avail.
    Note that you can loop through layers, frames and pages, but you can't tell what the user has selected in the actual panel UI.  Also, you can't find out which symbols are currently used in the document.  Nor can you programmatically insert a rich symbol into the document and have it maintain its "richness".

  • Loop Through Date Range

    Hi guys,
    I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop through this date range and want to get date like
    01/JAN/2009,02/JAN/2009.....16/JAN/2009.how can i achive this ?
    Thanks
    Ron

    Hi,
    What do you mean by loop through?
    SQL> with dates as (select to_date('01/JAN/2009', 'dd/mm/yyyy') start_date
                         ,to_date('16/JAN/2009', 'dd/mm/yyyy') end_date from dual)
    select start_date + level - 1 from dates connect by level <= end_date - start_date + 1
    START_DATE
    01/01/2009
    02/01/2009
    03/01/2009
    04/01/2009
    05/01/2009
    06/01/2009
    07/01/2009
    08/01/2009
    09/01/2009
    10/01/2009
    11/01/2009
    12/01/2009
    13/01/2009
    14/01/2009
    15/01/2009
    16/01/2009
    16 rows selected.Regards
    Peter

  • Help in getting current expanded node in Tree UI

    HI,
    I have a requirement to build a tree dynamically. On expanding each node I need to create sub nodes inside that. But it is always creating inside the node where the lead selection is and not inside the current expanded node. Even though I have used getTreeSelection () to get the current element.
    <b>Detailed description about the application.,</b>
    I have created a context with the following structure,
    TreeNode (0..n)
    |
    |--> ChildNode (recursive SiteTree)
    |--> Name (string)
    I have created a Tree UI Element in the view and inserted a node type 'TreeNodeType'.
    I have set the properties of the inserted node type as given bellow,
    Value Attribute in TreeNode -> Name I have assigned to 'Text' property of 'TreeNodeType'.
    Initially I have created four nodes in the init() method ., using the following code :
    for(int i=0;i<3;i++)
    IPrivateTestTreeView.ITreeNodeNode treenode=wdContext.nodeTreeNode();
    IPrivateTestTreeView.ITreeNodeElement treeelement=wdContext.createTreeNodeElement();
    treeelement.setName("Testroot:"+i);
    treenode.addElement(treeelement);
    Now I need to create sub-nodes for this dynamically.,
    I have created an action and called it in 'onLoadChildren' event of 'TreeNodeType' with the following code:
    public void OnCurrentSelection()
    IPrivateTestTreeView.ITreeNodeElement el = wdContext.nodeTreeNode().getTreeSelection();
    wdComponentAPI.getMessageManager().reportSuccess(el.getName());
    <b>
    Where this returns me only the name of LeadSelection node and not the  node which i try to expand.  </b>
    Is there anyway I can get the currently expanded node., Kindly help me out in this.
    Points will be rewarded for helpful answers. Thanks in advance.
    Regards,
    Nirmal

    HI Ayyapparaj ,
    <b>First I would like to thank you for your reply.</b>
    So it means that we cannot identify the currently expanded node in tree UI element and It will always be the lead selection node we will be able to get rite?
    Can we make the current lead selection to currently expanded node 'By Default'?
    Coming back to your solution.,
    I created a context element 'isExpanded' of type boolean inside the TreeNode.
    You said that there will be a call made to 'getter and setter' methods while we expand the node and we can set the lead selection to that element from there.
    Could you please give me some more details of how to achieve it.
    Thanks in advance.
    Regards,
    Nirmal G

  • How we know the selected node in a Tree object in a form?

    In a TREE object in forms, how can we know the current selected node by clicking a push button.
    lets say , there are 10 nodes in my tree, and 5th one i selected. But i want to store the selected node in a variable, when i click a button.
    please help
    thanks

    Hello
    I've just notice what might be a bug in Oracle forms because when I have the when-tree-node-selected trigger present for the tree (It does not matter if it executes null or some code), the code in option 1 works fine on a when-button-pressed trigger on a button item. This is what I had done to give you a reply.
    My second option will work because you're populating a parameter with when-tree-node-selected trigger which is then readable form anywhere else in the form. All you add is a check on when-button-pressed. Also for bug handling you need to consider setting the value to null when deselecting. I have this option working currently in one of my applications.
    DECLARE
         num_selected NUMBER;
         htree ITEM;
    curren_node FTREE.NODE;
    BEGIN
    htree := find_item('tree.form_list');
    num_selected := ftree.get_tree_property(htree,ftree.selection_count);
    for j in 1..num_selected
    LOOP
    curren_node := ftree.get_tree_selection(htree,j);
    message('hello :'||ftree.Get_Tree_Node_Property(htree,curren_node,ftree.node_value),acknowledge);
    end loop;
    END;     
    cheers
    Q

  • How do we make a newly created tree-node the currently selected one?

    Hi,
    We are using JHeadstart 10.1.3 - Tree Generation. We are running into several issues with the trees, especially upon creation of new tree nodes. The Form in our Tree-Form page is Saved. At that point, we would like the new node to be the selected node in the tree (and also in the tree bean).
    How do you believe can we do this? Right now, after creating the new node, we have no node selected - although it seems that the new node is selected as the normally synchronized form on the right shows that node.
    Thanks for any suggestions!
    Lucas

    Steven,
    I had not upgraded to Service Update 1 - was using Build 91. After upgrading, I see some difference, but not entirely the result I was looking for.
    In a Tree-Form page on Employees, when I added an employee at the same level it still did not seem to be automatically selected.
    Was wondering whether perhaps this has to do with the following comment from the source code:
              // this happens when posting back to the same node level in the tree:
              // the root node binding has no children in that case, causing derivation
              // of focus row key to fail, have to find out why root node children
              // are lost. Work around for now: return the focus row key as set by
              // the user clikcing on the nodeIf not, can you explain what this comment refers to?
    thanks for your help.
    Lucas

  • 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

  • Highlight selected node in tree

    I have a tree in the left, representing my company´s departments structure and in the right, when clicked, I show the employees that are subject to that department.
    I´ve noticed there´s no visual nor code (id, class, nothing) difference between the currently selected node of a tree and the others.
    There´s a way to do that? I thought about using js, but the only way a see to do that is using a regex in the link text of that node, comparing to the variable that that was passed to the page.
    Someone?
    Thanks

    Trees currently don’t have a concept of a “current” node. You could try using lists instead; though they won’t be query based, they would have to have static values. And in the current 1.6 version you can’t have hierarchical lists, though that will be added in 2.0.
    Marc

  • Yet another Try Catch question. Iterating through a ForEach loop

    Confused on error handling in a Powershell ForEach loop. I’m looping through a list of registry keys, attempting
     to open each one. If it succeeds, I do a bunch of stuff. If it fails, I want to skip to the next iteration.
    If I was doing It in VBScript I’d do this:
    For Each Thing In colThings
    Open Thing
    If Err.Number <> 0 Then
    “oops”
    Else
    Do stuff
    Do stuff
    Do stuff
    End If
    Next
    This is what I came up with in PowerShell. It seems to work, but just doesn’t seem powershell-ish. There must be a better way to use the catch output than just creating a $return variable and assigning it success or fail?
    ForEach ($subKeyName in $subKeyNames)
    try{$subKey = $baseKey.OpenSubKey("$subKeyName")}
    catch{$return = "error" }
    If($return -eq "error" )
    “Oops”
    Else
    Do stuff
    Do stuff
    Do Stuff

     
    I totally get what you're saying about formatting. I don't' have any habits yet, since I've only been working in Powershell since... well, what time is it now?
    Unfortunately, It Has Been Decreed that we are no longer to use VBScript for any engineering solutions at work, so my 15 years experience in it now needs to be transitioned over asap. I don't have the luxury of crawling before I run. I'm trying not to be
    frustrated, but it's like an English major waking up one day and being told "You must now speak French exclusively. Here's a book."
    The Do Stuff example of my ForEach loop is about 50 lines of code involving matching values in subkeys of this registry key with another and collecting output. I tried wrapping the whole thing in a try section based on some examples, but it seemed odd, that's
    why I'm asking. I'm used to tightly focused error handling at the point where an error may occur.
    In this example I'm only interested in whether or not I can open the subkey (it exists, but I may not have permission). If I can't, there's no point in continuing with this iteration of the loop, I want to skip to the next one. So why include all the "Do
    Stuff" in the the try section? From a readability viewpoint, it doesn't seem helpful.
    Also, there may be more error handling deeper in the code. If I then put that in a try/catch, and then something else inside that, now I have nested try/catches mixed in with nested if/elses, all wrapped in a For loop.
    Again, I can see how it works logically, but for readability not so much, and having all these braces 50 lines apart to match up is giving me eye strain :).
    It sounds like David is agreeing with jrv, that putting the entire ForEach loop code into a try/catch is the conventional way to do it. I guess it makes as much sense as putting it all in an If-else-Endif, and I just need to adjust my paradigm.
    But if not, my specific question was more along the lines of, is there a built in way to tell that the catch section has been executed, rather than me using it to populate an arbitrary variable and then read it? In VBScript, you execute something, and the
    next line, you check the Err.number. I wasn't sure if you could do that with a try/catch.

  • Forms 6i loop through datablock question

    I am writing a piece of code to loop through items with in a datablock to programmatically set the width between each field.
    I created my data block through the wizard, but then manually added some fields. I have them listed in the order I expect them to be navigated, which is the order I expect them to appear on the screen.
    When I am looping through the data block, I was assuming that next_item would go to the next navigable item, and it doesn't.
    For example, I have items received_today, worked_today, total_waiting, total_for_today, total_calls, total_priority.
    When the code loops through the data block, it actually loops in this order: received_today, worked_today, total_callbacks, total_priority, total_waiting, total_for_today.
    I even set the next navigation item property for each item, but that didn't help.
    My questions:
    1. Is there a way to control what order the data block loops through items?
    2. Why does this line get_item_property(get_block_property(block_name, FIRST_ITEM), x_pos); sometimes return null? (in my "proof of concept" form it returns a value, but the form I am modifying does not)
    Following is my code:
    PROCEDURE set_x_y_positions IS
         current_x_position pls_integer;
         current_y_position pls_integer;
      block_name varchar2(30) := 'BLOCK22';
      CurrentItem varchar2(30);
    BEGIN
      go_block(block_name);
      current_x_position := get_item_property(get_block_property(block_name, FIRST_ITEM), x_pos);
      current_y_position := get_item_property(get_block_property(block_name, FIRST_ITEM), y_pos);
          go_block(block_name);
      loop
           BEGIN
                if :system.cursor_item <> (block_name || '.' || get_block_property(block_name, FIRST_ITEM))
                     and get_item_property(:system.current_item, displayed) = 'TRUE' then            
                  SET_ITEM_PROPERTY(:system.current_item, x_pos, current_x_position + 38);
                  current_x_position := get_item_property(:system.current_item, x_pos);
                end if;
                if :system.cursor_item = 'BLOCK22.INTERNATIONAL' THEN--block_name || '.' || get_block_property(block_name, LAST_ITEM) then
                          exit;
                else
                     next_item;
                end if;
           END;
      end loop;
    END;I am using Forms 6i version 6.0.8.26.0
    Thank you!
    Katia

    I do have an exit, and yes it does run well.
         if :system.cursor_item = 'ATS_MON_REPORTING_QUEUES_VW.INTERNATIONAL' THEN--block_name || '.' || get_block_property(block_name, LAST_ITEM) then
                          exit;
                else
                     next_item;
                end if;That redundant go_block is there because I had some output going to a dummy field in another block, so I had to make sure it was navigating back to the block. But yes, in this code example, that go_block is redundant.
    Thank you, adding the
    current_x_position := get_item_property(block_name||'.'|| get_block_property(block_name, FIRST_ITEM), x_pos);
      current_y_position := get_item_property(block_name||'.'|| get_block_property(block_name, FIRST_ITEM), y_pos); worked perfectly.

Maybe you are looking for

  • To get the Unique id for Session

    Is there any Unique id for the oracle sessions wether i connect to the database using sql*plus,Isql*plus or any other tool. If i use "SELECT SYS_CONTEXT('USERENV', 'SID') FROM DUAL;" it return the same value if already opened session gets close. So i

  • All of my plug ins are erased?

    hey there....i have logic express 9....on a macbook....my interface is an m-audio fast track pro....i went to play a song i was working on and i couldn't hear anything...then i noticed all of the plug in indicators on each channel had a slash through

  • How to Optimize a MacBook Pro hard drive

    I have Version 10.7.5 OS X Lion with a 2.3 GHz Intel Core i5.  I would like to know where or how you could optimize the hard drive when needed. On my old MacBook I used DiskWarrior, but do not see anything like this for the MacBook Pro.

  • Setting up Listener Password for Oracle 9.2.0.7

    I am looking for information on configuration needed for "stopsap"  when password is set  up for the 9i listener.

  • How-to: Installing Windows XP on Qosmio X300

    Admins: please review this content, and make this topic sticky. I decided to try out Windows XP on my Qosmio X300-130 laptop, that came with Windows Vista 32-bit pre-installed. I bought XP Pro license + disc. Part A: Installation =============== 1. G