Tree expanded by default
Hi All,
I just wondering if i can expand tree in wda by default so all subordinats are shown w/o clicking nodes one by one .
What method should i use?
Thanks a lot for your sharing and consideration.
BR,Drikavide
Hi Ardhik Drikavide
For the node thats binded to the table, create an attribute say is_epanded and bind this attribute to the is expanded property of the tree.
Now for expanding all the nodes read the node to an itab
Loop the itab
Set the value of field is expanded as true..
Endloop
Bind back the itab
Like
CALL METHOD node_name->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_tab
****Expand all Nodes and Bind
LOOP lt_tab INTO wa_tab.
IF condition.
wa_tab-expanded = abap_false.
ELSE.
wa_tab-expanded = abap_true.
ENDIF.
APPEND wa_tab TO itab2.
ENDLOOP.
node_name->bind_table(itab2 ).
Regards,
Sarath Satheesan
Similar Messages
-
Trying to override the default af:tree expanded and collapsed icons
Hi,
I initially hijacked a thread from 2010 that was vaguely similar to what I need to ask, but a kind forum moderator split my post out to stand on its own merits.
I am trying to override the default af:tree expanded and collapsed icons I am using the following styles for my af:tree but they are not reflecting any thing on my tree with the styleclass orgType.
af|tree.orgType::expanded-icon {
content: url("../images/ac-expand.png");
cursor: default;
af|tree.orgType::collapsed-icon {
content: url("../images/ac-collapsed.png");
cursor: default;
af|tree::expanded-icon {
content: url("../images/folder_open.png");
cursor: default;
af|tree::collapsed-icon {
content: url("../images/folder_close.png");
cursor: default;
After working for long hours I realized that there is some problem with af:tree and treeTable. They are not taking the styles where as for the other components, every thing works fine. Is there any way to achieve the task. Could you suggest any alternative way to do this. Thanks in advance. Your suggestions for this task can really help me and my team a lot.
Regards,
Krishna Sumanth.Hi,
do the icons show without the style class reference used in the skin file? If so, then the style class for this component might be rendered differently for the tree, e.g.
.orgType af|tree ...
Frank -
Hi,
I was wondering if there is a way to have a tree created and rendered in the completely expanded form. I am thinking along the lines that is there is a setting or a method that by default does it.
If i am not mistaken there is a posting here in the forum to do this programatically.
Thank You,
-UdayDid you search for "JTree Expanded By Default" and saw that the answers were all about expanding the tree programatically:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=774838
and you wanted to make double-sure there was no other way to do it? -
Af:tree expand/collapse customization
hi all,
i have problem with af:tree expand and collapse.
I want to expand only one node in each level.
i mean let say i have 3 node in same level.
i expand first one then i expand second node again. at that time, first one should be collapsed automatically.
So, user can expand only one node in each level at one time.
is it possible?
With Regards,
WPhi Sireesha,
it is really helpful. but it is still something wrong for child node.
only root node is working as i want.
but when i click on child node, it go back to default and every node is collapse.
if i found the following logic is not working for child node.
discloseRowKeySet.add(firstKey);
eg. let say fristkey is (2,0) then it should open 2 and then second level 0. but it can't open any node.
do u have any idea?
With Regards,
WP -
Making a JTree expanded by default
I made a JTree and was wondering if there is a way to make it so that the JTree is totally expanded by default instead of having to click the circles to expand each spot.
// If expand is true, expands all nodes in the tree.
// Otherwise, collapses all nodes in the tree.
public void expandAll(JTree tree, boolean expand) {
TreeNode root = (TreeNode)tree.getModel().getRoot();
// Traverse tree from root
expandAll(tree, new TreePath(root), expand);
private void expandAll(JTree tree, TreePath parent, boolean expand) {
// Traverse children
TreeNode node = (TreeNode)parent.getLastPathComponent();
if (node.getChildCount() >= 0) {
for (Enumeration e=node.children(); e.hasMoreElements(); ) {
TreeNode n = (TreeNode)e.nextElement();
TreePath path = parent.pathByAddingChild(n);
expandAll(tree, path, expand);
// Expansion or collapse must be done bottom-up
if (expand) {
tree.expandPath(parent);
} else {
tree.collapsePath(parent);
} -
Message bar expanded by default
Dear All:
We wish to change the message bar to expanded by default, instead of collapsed by default.
I've been searching how to do it, but I could not find any information about it.
How can we personalize the webclient so that the message bar is shown expanded by default?Hi Jordi Escoda Ruiz,
This is an interesting req which peeking my interest. So, i debugged and end up with vain.
Having said, I observed, CL_BSPWD_BASICS_ERRORVIEW_BASE is the class for formatting the messages.
Also, In your user data (transaction SU3) add the parameter BSPWD_USER_LEVEL with the value 9. This will display all messages including technical information within the message area of the WebClient UI.
9 Only Collect in Trace Mode
8 Administrator
6 Experienced User
3 Office-Based Sales Employee
1 Customer
0 None
I know this may not be answer to your question, but it can help you to find your answer.
Cheers, Satish -
How to make All Hierarchy Nodes expanded as default in BI 7 Report
Dear all,
Does anyone know how to customize the confiugration to make <b>All Hierarchy Nodes expanded as default in BI 7 report</b>? Any sugguestion are appreciated.
Best regards,
Geraldfind the solution
-
Accordion creationPolicy="all" effect on tree expand
facing very strange problem
i have placed 2-3 tree component inside Accordion container.
On each tree's creationComplete i called function to expand first level.
when I set creationPolicy of Accordion to "all", tree expand is not working.
and if I removed creationPolicy from Accordion, all trees are expand to first level at creationComplete but only tree will not expanded.
and idea why this happen?Your trees' creationComplete routines are being called at an earlier time than they were before. So maybe something isn't set up yet that they depend on.
-
Af|tree::expanded-icon issue ?
af|tree::expanded-icon
content: url(/skins/mycompany/skin_images/expand.gif);
width:16px;
height:16px;
i recieve error at af|tree::expanded-icon line (on second COLON':').Css file does not accept this identifier there ? i have tried many ways but all in vain.
is there any thing special i need to import for new af|tree styles? I am using JDev 10.1.3.3Hi
First of all see if your af:dialog has the contentDelivery="lazyUncached" . This way your popup would not be cached.
If this is not the solution , then try:
tree.getDisclosedRowKeys().removeAll();This will remove all disclosed rowKeys.
A.Gruev -
Error message area not expanded per default - but i want it expanded
Hello,
per default the error message area in web ui is NOT expanded. But I would like to have it expanded per default. But i cannot find the right area to change this behaviour.
Does anyone have an idea how to change it to be expanded per default?
Many thanks for your ideas and input.
BR AndreasThanks to your reply i found it pretty well documented in help.sap.com:
http://help.sap.com/SCENARIOS_BUS2010/helpdata/EN/cb/659ebfc880493baad66896518a55a1/frameset.htm
Edited by: andreas lehner on Jan 30, 2012 10:01 AM -
How to Obseve the change status of the tree expander.
Hi friends,
I need to take some action on the change of the tree expander state. All I need is to know how can we get the notification of the change in the tree expander status.Hi rizwan haque,
Try posting this question in the InDesign SDK forum--someone will probably be able to help you there.
Thanks,
Ole -
I have created a tree and placed it in page 0 using application express 3.1
On the initial page load my tree is not fully expanded and it comes along with "up" link as given below:
Parent node1 (up)
subnode1
subnode2
But the tree should appear in the expanded mode on the initial page load itself with out the "up" hyperlink as below:
Root node+
Parent node1
subnode1
subnode2
Parent node1
subnode1
subnode2
can any one give a suggestion on this?
Thanks in advance
Angeline.FVarad,
I tried doing that
By default the URL will take "::NO::FSP_AFTER_LOGIN_URL:" value.
But i forced my URL with ":up:NO::P0_TREE_ROOT:1000" which gave me an expanded mode.
In my application i am using conditional cache. if the url is changed for expand mode then cache is not enabled.
can you suggest me some other way.
thanks and regards
Angeline.F -
Issue With ADF Tree Expand/Collapse
Hi All,
I have a customer who is having issues using the af:tree component on a deployed application. When he tries to expand or collapse a node of the tree, the icon just blinks. This is occurring not only on our application, but also the Oracle ADF Rich Client Demo on http://jdevadf.oracle.com/adf-richclient-demo/faces/components/tree.jspx. He is using Internet Explorer v7.0.5730.13. As far as I can tell, our browser settings are identical, but I can use the tree without a problem.
Any ideas as to what the problem could be?
Thanks,
BradUnfortunately, Internet Explorer is the only browser that is authorized to run on his computer.
Do you know of any specific IE settings that would cause the af:tree not to work? -
Tree expand problem with Accordion Component
While using Accordion component with creationPolicy="all", tree components which are placed in accordion's different panels, will not expanded at creationcomplete.
Trees are created perfectly but not expand its level at initial creationComplete time.
If I placed tree in regular panel and executed, tree levels are perfectly expaned.
Expand level code is called at creationComplete of Tree.
Steve Roger.i got my mistake.
I am using callLater(). Now its working perfect. -
Hi there!
I am using the tree element in web dynpro.
Not the tree in the table.
I need to expand a part of the tree during loading
I do not find an example.
Any help is warmly appreciated.
Thanks in advance, FrankHi,
the "dynamic" tree expansion depends on who you populate the tree content e.g. how you load the data to your tree.
In my application, I have choosen to load the root nodes, first - all over sub-nodes (including items) are loaded "on demand" that means the user clicks on the node. This click will trigger the the action onLoadChildren which pulls the data from a data provider and binds the retrieved data to the corresponding
context node.
This expansion can be perfomed automatically by a recursive method which is called when a user pushes a button called "Expand all"....
I don't have much time to explain the details, but I will provided the source code..., hope it helps!
Darko
Source Code -
Import to the Method:
i_node_ref type IF_WD_CONTEXT_NODE = Reference to the context node
METHOD nav_tree_expand_all.
Data declaration
DATA node_elements TYPE wdr_context_element_set.
DATA node_element LIKE LINE OF node_elements.
DATA child_node TYPE REF TO if_wd_context_node.
DATA ls_tree_attr TYPE zlm_str_tree_gen.
DATA lt_tree TYPE zlm_tty_tree_gen.
Get all node elements
node_elements = i_node_ref->get_elements( ).
Loop over each element
LOOP AT node_elements INTO node_element.
" Get Static attributes
node_element->get_static_attributes( IMPORTING static_attributes = ls_tree_attr ).
" Check if data has already been loaded
IF ls_tree_attr-children_loaded = abap_true.
" now we know that the data has been loaded, only the elements have to be declared as expanded
ls_tree_attr-is_expanded = abap_true.
node_element->set_static_attributes( EXPORTING static_attributes = ls_tree_attr ).
" get possible other nodes recursively
child_node = node_element->get_child_node( 'SUBTREE' ).
me->nav_tree_expand_all( EXPORTING i_node_ref = child_node
i_screen_id = i_screen_id
i_component_id = i_component_id ).
ELSE.
" data has not been loaded yet...
" First load the nodes...
clear lt_tree.
me->get_nav_tree_nodes( .....importing lt_tree.). Custom specific data retrieval
IF lt_tree IS NOT INITIAL.
child_node = node_element->get_child_node( 'SUBTREE' ).
child_node->bind_table( lt_tree ).
" Update Attributes of the node
ls_tree_attr-is_expanded = abap_true.
ls_tree_attr-children_loaded = abap_true.
node_element->set_static_attributes( EXPORTING static_attributes = ls_tree_attr ).
" Call the method again recursively...
me->nav_tree_expand_all( EXPORTING i_node_ref = child_node
i_screen_id = i_screen_id
i_component_id = i_component_id ).
ENDIF.
" ... then load the items
CLEAR lt_tree.
me->get_nav_tree_items( .....importing lt_tree.). Custom specific data retrieval
IF lt_tree IS NOT INITIAL.
" Update Attributes of the node
ls_tree_attr-is_expanded = abap_true.
ls_tree_attr-children_loaded = abap_true.
node_element->set_static_attributes( EXPORTING static_attributes = ls_tree_attr ).
child_node = node_element->get_child_node( 'ITEM' ).
child_node->bind_table( lt_tree ).
ENDIF.
ENDIF.
ENDLOOP.
RETURN.
Edited by: Darko Mocelj on May 7, 2008 8:57 PM
Maybe you are looking for
-
How to give the table in a Portal Report an ID?
I have a report created in Oracle Portal 10.1.4 using the standard Portal Report feature. The results are output in HTML as a table. How do I give the table an ID attribute? This is what teh output looks like now: <TABLE border="1" cellspacing=0 cell
-
I have a 27" iMac (last year's) core i7, with minidisplayport, and an aluminum Macbook (the 2ghz one) with minidisplayport. I've hooked them together, and my iMac will take the Macbook's signal, but I don't know how to get the Macbook to serve as a
-
Will the official Creative Car Charger allow you to use the Zen Micro if the battery is completely dead? I bought a cheap usb car adapter and it doesn't seem to work correct at all. I am looking for a way to power the Zen Micro in the car if the batt
-
How to uninstall & reinstall iTunes?
My Macbook Pro keeps telling me I have a corrupted version of iTunes. What do I do???
-
User Agent of Mozilla 1.7 bundled with JDS
The User Agent String of Mozilla bundled with JDS is as follows ... User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20070606 Is this String as per the spec ? Should'nt it have a version string at the end ? Like ... Mozilla/5.0 (X11