Accessing the parent element of a tree node !
Hi All,
Im building a tree application, in which the user has the option for creating a new node at any level he wants. But my problem is, If the user wants to create a node at the same level of the selected node, how do I retrieve the parent element? Can someone help me in this regard? Ive done the following
1) Created a node TreeNode with the required attributes & the recursive node.
2) When the user clicks on any node, I am able to retrieve the selected element through recursive traversal (i.e. the instance of TreeNodeElement, say elmt)
3) I was able to retrieve the parent element through the function elmt.node().getParentElement(). But it returns an instance of IWDNodeElement, which does not have the recursive node. Ofcourse, I cannot typecast IWDNodeElement to TreeNodeElement.
Then How do I retrieve the TreeNodeElement instance of the parent element? Someone please help
..!
Thanks in Advance,
Best Regards,
Nibu.
Hi Nibu,
you should type as follows
IPrivateRecursiveTree.ITreeNodeElement ele=(IPrivateRecursiveTree.ITreeNodeElement)selectedElement.node().getParentElement();
this way you will get the Parent element of the current node.
Rgds,
Vilish
P.S. If prob solved, consider reward points
Similar Messages
-
How can I access the selected element of a DropDownByIndex-box?
Hi,
I want to create a WebDynpro with two web services. I created the first request with the first web service and the results are displayed in a DropDownByIndex-Box. Now the user should choose one of the results and I would like to use this for the request with my second web service. How can I access the selected Element of a DropDownByIndexBox in the Code?
Thank you!!
JuliaHi Julia,
when user select one element in drop down it automatically set lead selection of node binded to dropdown.
For example if you bind a dropdown to node myNode with value attribute myAttribute the lead selection of node myNode is set in the position of element choose from user.
So to take this chooised element use this code:
wdContext.currentMyNodeElement.getmyAttribute()
bye
Andrea -
Spry MenuBar - IE6 - how to make that submenu is shown above the parent element
Hi you all,
I need the menubar to open the submenu above the parent element.
Here´s what I did:I inserted a spry menubar and the only css-change I did was the one shown below in red "botom: 2em;"
This works exactly as I need it to - in Safari, Firefox and Opera.
In IE6 however, the submenu is shown far below the parent element. Is there a solution?
Greetings from Germany
Alex
/* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
z-index: 1020;
cursor: default;
width: 100px;
position: absolute;
left: -1000em;
bottom: 2em;thank you very much, Nancy!
Greetings from Mannheim, Germany
Alex
Am 03.09.2010 um 23:45 schrieb Nancy O.:
>> In IE6 however, the submenu is shown far below the parent element.
>> Is there a solution?
Possibly. It's hard to tell without seeing your page, though.
>
The position of Spry Menu Bar submenus is controlledby the margin
property on submenu ul tags.
1. Locate the ul.MenuBarVertical ul or ul.MenuBarHorizontalul rule.
2. Change the margin: -5% 0 0 95%; default values to the desired
values.
>
http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WS895F3A6D-6D73-42ef-B568-3D04A BD2F171.html
>
Also, look through the CSS coments for IE hacks. Often these
workarounds for older browsers can be commented out or deleted.
Test before you delete anything permanently.
>
>
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
> -
Master-details problem: How to access the parent EO/VO in child side?
Hello
Refer to the reply of posting
Re: How to insert new records in Master and detail Forms.
I have got the following questions
The approach for setting the master-details relationship works well, however, in this example,
I have overriden the create(AttributeList attributeList) method of VO2, so after calling
DCBindingContainer dcb = ADFUtils.getDCBindingContainer();
OperationBinding oper = dcb.getOperationBinding("CreateInsertVO2");
oper.execute();
, it will enter the create() method of VO2, at this point, i can only access the argument attributeList
which stored the key value that link up parent and child, however, how can i get the entire VO1
for accessing the value of all VO1's attribute?
ThanksNeon wrote:
I have mapped a createInsert action in the blinding layerThis is OK.
Neon wrote:
Do you mean that i have to create createRow and insertRow action in blinding layer?No. The createInsert operation does just that
Neon wrote:
Or call these function in the VO overridden create() method?No. You can't do that.
In conclusion, I don't understand why the accessor returns null. Maybe someone else can shed some light... ?:|
One last suggestion from me is to try getting the VO1 directly from the AM instead.
This should work - it is not a recommended practice through.
Use the following code:
VO1RowImpl vo1 = (VO1RowImpl)this.getVO1();
// ensure that the VO1 VL accessor is properly initialized
if (vo1 == null) {
vo1 = (VO1RowImpl)((YourApplicationModuleImpl)this.getApplicationModule()).getVO1().getCurrentRow();
} -
How to access the parent class variable or object in java
Hi Gurus,
I encounter an issue when try to refer to parent class variable or object instance in java.
The issue is when the child class reside in different location from the parent class as shown below.
- ClassA and ClassB are reside in xxx.oracle.apps.inv.mo.server;
- Derived is reside in xxx.oracle.apps.inv.mo.server.test;
Let say ClassA and ClassB are the base / seeded class and can not be modified. How can i refer to the variable or object instance of ClassA and ClassB inside Derived class.
package xxx.oracle.apps.inv.mo.server;
public class ClassA {
public int i=10;
package xxx.oracle.apps.inv.mo.server;
public class ClassB extends ClassA{
int i=20;
package xxx.oracle.apps.inv.mo.server.test;
import xxx.oracle.apps.inv.mo.server.ClassA;
import xxx.oracle.apps.inv.mo.server.ClassB;
public class Derived extends ClassB {
int i=30;
public Derived() {
System.out.println(this.i); // this will print 30
System.out.println(((ClassB)this).i); // error, but this will print 20 if Derived class located in the same location as ClassB
System.out.println(((ClassA)this).i); // error, but this will print 20 if Derived class located in the same location as ClassA
public static void main(String[] args) {
Derived d = new Derived();
Many thanks in advance,
FendyHi ,
You cannot access the controller attribute instead create an instance of the controller class and access the attribute in the set method
OR create a static method X in the controller class and store the value in that method. and you can access the attribute by
Call method class=>X
OR if the attribute is static you can access by classname=>attribute.
Regards,
Gangadhar.S
Edited by: gangadhar rao on Mar 10, 2011 6:56 AM -
Displaying the entire text of a tree node when the tree isn�t wide enough
Hi,
I have a JTree displayed in a JScrollPane, so there is a chance that some of the tree data may be hidden if the tree's width is insufficient, so when the user moves the cursor over a tree node whose text is not completely visible (cut off by the right edge of the scroll pane and/or window), a tooltip is displayed to show the entire node text. So far so good!
If the user double click a node in the tree a new window is supposed to be opened. This works fine if the tooltip hasn�t been displayed jet, but if it has then the user has to click 3 times to open the window.
The first time to remove the tooltip and the next 2 opens the window.
How can I awoid this?
Thanks!!!!
:-)LisaAny ideas, please?
-
How do I access the Photoshop Elements editor inn Premier Elements 12?
I am unable to access the editor tools for editing photos in Premier elements 12.
Hi,
I think that you may have tried signing in to photoshop.com which no longer exists.
Please see if this document helps.
http://barbarabrundage.com/2013/09/16/pse-8-9-10-cant-sign-in-error-404/
Brian -
Context Menu on the right click of af:tree node
Hi Experts,
I am using drag and drop functionality in af:tree.In that i used one tree for drag source and another one tree for drop target,and it is working as expected.
Now I want to bring one additional option in the context menu of the target tree node that is ,when i right click on any of the target tree node in addition to the default menu options like "Collapse","Expand" i want to add one more option .For this i added "contextMenu" facet after the "nodeStamp" facet inside the tree.
*<f:facet name="contextMenu">*
*<af:popup id="p1">*
*<af:menu text="Delete" id="m1">*
*<af:commandMenuItem text="Delete" id="cmi1"*
*action="#{myWorkflow.deleteWorkflowNode}"/>*
*</af:menu>*
*</af:popup>*
*</f:facet*>
Now the problem is : before using drag and drop the context menu workes without any problem .But after using drag and drop the context menu is not popped up.
can anybody help me to resolve this?
Thanks,
Priya.Hi Frank,
1. I am using JDeveloper 11.1.1.3 version
2. Drop target tree is having the context menu.
3. Yes . In Drop event am calling a backing bean method with return type DnDAction and i return the value as DnDAction.MOVE to reflect the changes in the database table to the target tree.
Regards,
Priya. -
How can I access the sub elements of the Nested Cluster-2
would like to know the label a sub element of a Nested Cluster. I have included the vi. I am trying to programmetically read the Text label of the data elements in Value N mode cluster (Max , Min Mode). I was looking into the Type descriptor document. It can tell me how many and what type of elements are in the cluster. But it does not gove me Refnum to those objects.
Let me know if you have an solution to my question."
Attachments:
cluster_1.vi 24 KBHi
You need to do a recursion. If the reference you get from the array "controls[]" if of type cluster, then you have to loop through recursively.
Openg toolkit has variant tools that might be of some help to you (www.openg.org).
Good luck
PJM
Got EasyXML?
JKI.VIPM.EasyXML.OpenG.LAVA.Builder.blog -
How can I access the sub elements of the Nested Cluster
I would like to know the label a sub element of a Nested Cluster. I have included the vi. I am trying to programmetically read the Text label of the data elements in Value N mode cluster (Max , Min Mode). I was looking into the Type descriptor document. It can tell me how many and what type of elements are in the cluster. But it does not gove me Refnum to those objects.
Let me know if you have an solution to my question.
Attachments:
cluster_1.vi 24 KBI suggest posting this question on the LabVIEW forum. This is the Measurement Studio for Visual Basic forum and there are not nearly as many LabVIEW experts that monitor this forum as the LabVIEW forum.
- Elton -
What event is called when the handle next to a tree node is clicked
Hi,
I have a JTree...and the nodes in the tree have a little handle next to them. When i click on the handle, the children of that node, are shown below (as expected). However, what event occurs before the treeExpanded event is fired?? it seems like something happens just before it.
thanksPost your code, I dont think any event except treeExpanded is fired.
-
How to add style(color) info for the color used in ALV tree nodes
I have an object for CL_GUI_ALV_TREE and I have added nodes to the tree and has set color for the nodes using 'STYLE' parameter. Now if I have to add the style info to the style(color) then how do I do it using the object I have?
Edited by: Sujay V Koparde on Feb 20, 2008 4:27 AMYes Eshwar, its similar to what you have written but my problem was that the style has already been assigned in the code and now I want to assign the style info(tooltip text) to the style(colour). I have an object of class cl_gui_alv_tree as of now and I am not able to find out as to how do I proceed to assign style information
-
Need Help -- How to Change the icon of a selected Tree Node
Hi java gurus,
i am working on Jtree application, and i am adding image icons to the Nodes.
my dought is when i select a node, i want to display that selected node as opened and all other icons should remain closed.
Example:
-- root
|
----child
----child1
----child2
|
----SubChild
----SubChild1
----subchild2
Here if i am selecting Child2 means, only the image icon of that child2 should open the nodes and display the icon , all other icons from root to subchild should remain same as closed.
please some one suggest how i can do it,
Thanks in advance,
Cheers,
MuraliStop crossposting!
http://forum.java.sun.com/thread.jspa?threadID=787916&messageID=4476842#4476842 -
Reg: Access the container element value inside the Task's description tab
Hi All,
I need to call one of my container element into the task's description tab as text symbols.
Please let me know how to do it.
Regards,
Selva.define an importing element in the task container.
map this importing element with the element in the workflow container.
now you can use this task container element in your description text box. (method exxplained in the previous post to this problem)
rgds, -
How to get the children for a selected tree node?
Hi,
I want to get the number of child nodes for any selected node in JTree.
How can i do this?
Any help, greatly appreciated!!if you have a node already where aNode is a DefaultMutableTreeNode for example, then you can use that object's API method to get the child count.
int childCount = aNode.getChildCount();
If you want to loop through all of a node's children and do something at each node, the following may help:
java.util.Enumeration e = aNode.children();
while ( e.hasMoreElements() ) {
DefaultMutableTreeNode n = (DefaultMutableTreeNode)e.nextElement();
//Do something with n
Hope this helps,
Claire
Maybe you are looking for
-
Attempting New ( Hopefuly Improved ? ) Set-Up
I have just made some adjustments to my G5 computer to aid in the rendering speed of FCP ver 5.1 The first was to add an additional internal hard drive, the other was to put in a PCI board to allow an eSATA connection to the external hard drive which
-
Contribute CS4 wouln't recognize my customization
I solved this but am posting it in case it helps someone else. I copied PMModules.js from \Program Files\Adobe\Adobe Contribute CS4\Configuration\Commands to \Documents and Settings\ \Application Data\Adobe\Adobe Contribute CS4\Configuration\Command
-
ORA-00903: Invalid table name - running Set based mapping
Hello, Using OWB 10.2.04.36 and have created a mapping which reads data from Non-Oracle, ODBC source table, actually a worksheet in an Excel workbook which has been defined/set up using the Heterogeneous Service components. I can view the data in the
-
How to I start smart dialing in the phone app
Hello. I have set my company number in the smart dialing menu. But i can dial a "x" in the phone app. Which letter, number or sign I have to use as a prefix to start smart dialling? My configuration: Device: Blackberry Q5 OS: 10.2.1.2102 Thanks a lot
-
Syncing - what to select in itunes
Hi, I need someone who can give a very specific answer in detail for this one... ....in order to do a sync, such that everything currently on my ipad gets backed up on my computer...photos notes emails apps music etc... ....and everything on itunes o