Hi Team.

I am using api_tree.addnode to add nodes. for each node i am adding I check if there are "details" (children). if there are then add each detail using api_tree.addnode. As there are children I want to change the state of the parent to 'expanded' and expand the parent. So I use api_treenode.expand. It sets the state of the parent node ok to "expanded" but does not show the parent node "expanded".

          for r2 in c2 (v_job_id, r1.item_id) loop
              l_t_node_2.nodedisplayname_tx := r2.item_name;
              l_t_node_2.nodekey_tx := r2.item_id;
              l_t_node_2.nodestate_tx := 'leaf';
              l_t_node_2.icon_tx := r2.icon;
              if c2%rowcount = 1 then
                 api_tree.addnode(l_treename,r2.parent_item_id,null,l_t_node_2);
              else
                 api_tree.addnode(l_treename,r2.parent_item_id,l_prevkey_2,l_t_node_2);
              end if;
              l_prevkey_2 := r2.item_id;

              for r3 in c3 (r2.job_checklist_id) loop
                  l_t_node_3.nodedisplayname_tx := r3.item||' - qty: '||r3.quantity||' - price: '||to_char(r3.total_price,'999,999.99');
                  l_t_node_3.nodekey_tx := r2.item_id||'_'||c3%rowcount;
                  l_t_node_3.nodestate_tx := 'leaf';
                  if c3%rowcount = 1 then
                     api_tree.addnode(l_treename,r2.item_id,null,l_t_node_3);
                    --set parent to proper state
                     api_treenode.setstate(l_treename,r2.item_id,'expanded');
                     api_treenode.expand(l_treename,l_t_node_2.nodekey_tx);
                  else
                     api_tree.addnode(l_treename,r2.item_id,l_prevkey_3,l_t_node_3);
                  end if;
                  l_prevkey_3 := l_t_node_3.nodekey_tx;
              end loop; 
          end loop;

asked 20 Oct '14, 01:40

Raymond's gravatar image

Raymond
24323
accept rate: 0%


OK I found what the issue is. I do think this is a bug.

root
|-- item 1
|-- item 2
   |- item 2.1
   |- item 2.2
      |-- item 2.2.1
      |-- item 2.2.2

If item 2 is collapsed and I set in my code item 2.2 to a state of expanded and call api call api_treenode.expand it will not display node item 2.2 in expanded mode when I expand item 2. However if I set node item 2 to expanded and then add node item 2.2 etc it is displayed "expanded" I thought I was going mad.... Uh very frustrating 2 hours. |

link

answered 20 Oct '14, 02:02

Raymond's gravatar image

Raymond
24323
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×1

Asked: 20 Oct '14, 01:40

Seen: 1,369 times

Last updated: 20 Oct '14, 02:02


© Copyright Gerger 2017