Tree node Expansion programmatically?
How can i expand a node(which has sub nodes)
on Tree programmatically?
Hi Ali
Have a look at JTree.expandrow()
Marc
Similar Messages
-
Hello
I have a tree (showing max levels of 2)and I am trying to programatically open a particular node that is 3 levels down.
Now, I can open a node that is 2 levels down as follows
https://...../f?p=1056:2:3052972033689458:EXPAND,9::::#node10
So,parent node'9' is opened and I can view child node 10.
However, I want to expand child node 10 too simultaneously , so that I can view its child '11'.
In other words, I want to open the tree node pragramatically as many levels as needed to display the desired child node.
Is there any way I can do that. Thanks.
Suni
Edited by: suni1 on May 24, 2010 12:16 PMI have got the answer.I am having trouble reading your mind. Could you please use more power when transmitting the code that demonstrates the problem. Make sure you transmit the full stack trace of any exception.
-
Hi,
I have got a JTree with various nodes and subnodes.
If a parent node has got subnodes, you can see a little box with a '+' in it.
now,
1. Click on the parent node '+' box and the node expands to show the sub nodes.
2. Double click on the parent node itself and it also expands.
I want to eliminate the behaviour of number 2.
This is because I want to use the double click on the parent node to do something else.
Can anyone help?
Cheers,
JimIn jdk1.3 or higher:
tree.setToggleClickCount(-1); -
How to highlight a tree node programmatically
Problem
=====
Just like a typical management software, I have a navigation tree presenting a list of objects (let's say toasters) on the left panel. The content panel on the right side presents the details of a toaster, when the user selects the toaster on the navigation tree. On the toaster details panel, I would like to have a hyper link referring to another toaster - associated to the selected toaster. On clicking on the hyperlink, I would like to display the details of the associated toaster and the navigation tree node for the associated toaster being highlighted.
For example, BUI presents the following now:
+ Toasters | Toaster 1 Details [Refresh]
+ <toaster1> |
+ toaster2 | ... toaster3
+ toaster3 |
toaster1 is selected on the navigation tree. The contents panel displays Toaster 1 details, which has a hyper link for toaster3.
When the user click on toster3 on the contents panel, I would like to see the following
+ Toasters | Toaster 3 Details [Refresh]
+ toaster1 |
+ toaster2 | ...
+ <toaster3> |
My Trial
=====
ADF Rich Client 11.1.2.3 is used for my development.
Jspx code for the navigation tree looks like this:
<af:tree id="navTree" ...>
<f:facet name="nodeStamp">
<af:panelGroupLayout id="nodePgl">
<af:switcher facetName="#{stamp.outcome!=null?'actnode':'noactnode'}" ...>
<f:facet name="actnode">
<af:commandLink id="leafLink" text="#{stamp.label}" action="#{stamp.actionOutcome}">
<af:setActionListener from="#{stamp.key}" to="#{treeHandler.selectedMenuItem}"/>
</af:commandLink>
</f:facet>
<f:facet name="noactnode">
<af:outputText id="notLeafText" value="#{stamp.label}"/>
</f:facet>
</af:switcher>
</af:panelGroupLayout>
</f:facet>
</af:tree>
The hyper link on the contents panel looks like this:
<af:iterator var="toaster" value="#{toastData.toasters}">
<af:commandLink text="#{toaster}" action="#{toasterHandler.goToToaster}">
<f:param name="toasterId" value="#{toaster}"/>
<af:setActionListener from="#{toaster}" to="#{treeHandler.selectedToaster}"/>
</af:commandLink>
</af:iterator>
I got some tips from this forum (cannot find thread at the moment) and implemented the treeHandler.selectedToaster method as follows:
// getSelectionState returns selStat, which is instantiated like the following:
// RowKeySet selStat = new RowKeySetTreeImpl();
// TreeModel model = (TreeModel) menuModel.getWrappedData();
// selStat.setCollectionModel(model);
// selStat.setContained(true);
RowKeySet rowKeySet = getSelectionState();
rowKeySet.removeAll();
// synthesize the rowKey for the selected toaster
// if the toaster found in the toaster node list,
// rowKey should look like [0, <rowIdx of toaster>]
ArrayList<Integer> rowKey = new ArrayList<Integer>();
rowKey.add(0);
rowKey.add(new Integer(rowIdx));
TreeModel model = (TreeModel) menuModel.getWrappedData();
model.setRowKey(rowKey);
model.setRowIndex(rowIdx);
rowKeySet.add();
This seems to work most of times except when I refresh the contents details panel using partial page rendering.
I get NullPointerException on the call to rowKeySet.removeAll().
Caused by: java.lang.NullPointerException
at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl._selectAll(RowKeySetTreeImpl.java:459)
at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl.removeAll(RowKeySetTreeImpl.java:146)
In my observation, this NPE happens when rowKeySet.size() returns 1 but rowKeySet.iterator() does not return any entries.
I suspect this is a bug on RowKeySetTreeImpl but not sure.
Help Need
=======
1. What is the reasonably right way to highlight the tree node for my problem?
2. If my trial is one way to do it, how can I get around the NPE? I cannot change ADF Rich Client library at this point.
Any help/suggestion/advise would be appreciated.
Thanks,
JeongtaeI did this, to programmatically expand a tree node, you can try the same and set the row key to highlight.
private RowKeySet disclosedTreeRowKeySet = new RowKeySetImpl();
public void rowDisclosureListener(RowDisclosureEvent rowDisclosureEvent)
Iterator added = rowDisclosureEvent.getAddedSet().iterator();
if (added!=null)
while (added.hasNext())
Object rowKey = added.next();
//disclosedTreeRowKeySet.clear();
List path = (List)rowKey;
for( int i=0; i< path.size(); i++ )
List<Object> nodePath = new ArrayList<Object>();
for( int j=0; j<i; j++ )
nodePath.add( path.get( j ) );
disclosedTreeRowKeySet.add( nodePath );
disclosedTreeRowKeySet.add( rowKey );
System.out.println( "disclosed Keys...... " + disclosedTreeRowKeySet );
private void expandSelectedNode(RowKeySet addedObj) {
if (sourceTreeTable != null) {
Iterator added = (Iterator)addedObj.iterator();
if (added!=null)
while (added.hasNext())
Object rowKey = added.next();
List path = (List)rowKey;
for( int i=0; i< path.size(); i++ )
List<Object> nodePath = new ArrayList<Object>();
for( int j=0; j<i; j++ )
nodePath.add( path.get( j ) );
disclosedTreeRowKeySet.add( nodePath );
disclosedTreeRowKeySet.add( rowKey );
sourceTreeTable.setDisclosedRowKeys(disclosedTreeRowKeySet);
} -
Hi Forum,
My Jdeveloper version 11.1.2.0.0
and i am using Fusion Web Application (ADF) Template.
In my .jspx page i have added ADF Tree.
Now i want to get node value from backing bean.
My java code is
public void selectevent(SelectionEvent evt) {
RichTree tree = (RichTree)evt.getSource();
TreeModel model = (TreeModel)tree.getValue();
RowKeySet rowKeySet = evt.getAddedSet();
Object key = rowKeySet.iterator().next();
model.setRowKey(key);
JUCtrlValueBinding nodeBinding = (JUCtrlValueBinding)model.getRowData();
if(model.getDepth()==1){
int empid = (Integer)nodeBinding.getAttribute("EmployeeId");
when i click on second node the following error occured.
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.el.ELException: java.lang.NullPointerException
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at tree.view.clsTreeTest.selectevent(clsTreeTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
... 48 more
<RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.el.ELException: java.lang.NullPointerException
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at tree.view.clsTreeTest.selectevent(clsTreeTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
... 48 more
Please any solution to get node value programmatically.
ThanksThanks
After applying new code when i click on first node it is working fine but click on second node it produced error like below
<FacesCtrlHierBinding$FacesModel> <makeCurrent> ADFv: No row found for rowKey: [oracle.jbo.Key[], oracle.jbo.Key[]].
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.el.ELException: java.lang.NullPointerException
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at tree.view.clsTreeTest.selectevent(clsTreeTest.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
... 48 more
<RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.el.ELException: java.lang.NullPointerException
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1579)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:305)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at tree.view.clsTreeTest.selectevent(clsTreeTest.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
... 48 more -
Programmatically selecting a Tree node
Hi there,
Given a TreePath object, I need to know how to programmatically select a tree node on a JTree.
Here's the situation:
I have a simple text editor project which has a JTree on its interface representing the local file system. The program has a SaveAs dialog box which also has a duplicate JTree as the one on the main interface (directories only). As the user selects the directory in which they wish to save the open file in the SaveAs dialog box, I need somehow to programmatically cause the JTree on the main interface to correspondingly select the same directory. How is this done?
The whole point of this is so that I can then add a new leaf node to the tree at the specified directory location. I've tried simply setting the jTree1.setSelectionPath(...) method and even tried to call the valueChanged(...) method of the TreeSelectionListener object as you can see from the code snippet below, but none of these approaches have been successful.
Please advise,
Alan
public void createLeafNode()
jTree1.repaint();
if(path == null)
return;
jTree1.setSelectionPath(path);
//SelectionListener.valueChanged(new TreeSelectionEvent(jTree1, path, true, oldLeadPath, newLeadPath));
//System.out.println("path is: " + path.toString());
DefaultTreeNode parent = getTreeNode(path);
//System.out.println("parent is " + parent.toString());
//Create the child node
IconData idata = new IconData(ICON_LEAF, new FileNode(new SpecialFile(ref.FileOpen)));
DefaultTreeNode node = new DefaultTreeNode(idata);
parent.add(node);
//Tell the model that the tree structure has changed
model.nodeStructureChanged(parent);
path = path.pathByAddingChild(node);
jTree1.scrollPathToVisible(path);
//jTree1.repaint();Yes, I've tried setSelectionPath(TreePath path) numerous times, but it does nothing to select the node on the tree! You can see from the code I submitted that it is there commented out.
Ordinarily, when you click on a node on the tree it becomes the "active" node, evident because it becomes highlighted. But when I use setSelectionPath(TreePath path) method, giving it the path it needs, the node on the tree doesn't become the "active" node, therefore, not selected! Furthermore and subsequently, the rest of the code in the method createLeafNode() doesn't add a new node to the tree in the location specified by the TreePath object!
If you have used setSelectionPath(TreePath path) before successfully I would be interested in seeing a small sample program demonstrating its use. It would have to prove to me that you can select a node in the tree without physically clicking on any node in the tree with the mouse cursor, and add a new child node to that selected node.
I submit to you a small test program I put together that demonstrates the "typical setup". It requires the user to physically click on a node of the tree, then click on a button that adds a new node in the location of the selected node. If you can alter this program demonstrating that you can add a new node to the tree without my having to click on any node of the tree with my cursor, then I'll assign you the Duke Dollars and be forever humbled by your programming prowess.
Thanks for keeping on top of this thread as I've tried everything I can think of to try and make my program work. If you need to ask any questions please ask away. Perhaps there is something about my program that I've not explained yet that you're not aware of that I should have included. At this point I can't see the forest for the trees.
Alan
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.JTree;
import javax.swing.event.*;
import javax.swing.tree.*;
public class AddNodeExample extends JFrame implements ActionListener
JTree jTree1 = null;
DefaultTreeModel model = null;
DefaultMutableTreeNode rootNode = null;
JScrollPane jScrollPane1 = null;
JLabel status = new JLabel("Status:");
TreePath path = null;
JButton add = new JButton("Add new node");
public static void main(String[] args)
AddNodeExample example = new AddNodeExample();
example.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public AddNodeExample()
super("Add Node To JTree Example");
setSize(400, 300);
jScrollPane1 = new JScrollPane();
add.addActionListener(this);
DefaultMutableTreeNode[] boys = new DefaultMutableTreeNode[6];
boys[0] = new DefaultMutableTreeNode("Harry");
boys[1] = new DefaultMutableTreeNode("Tom");
boys[2] = new DefaultMutableTreeNode("Jake");
boys[3] = new DefaultMutableTreeNode("Brian");
boys[4] = new DefaultMutableTreeNode("Alan");
boys[5] = new DefaultMutableTreeNode("Guy");
DefaultMutableTreeNode[] girls = new DefaultMutableTreeNode[6];
girls[0] = new DefaultMutableTreeNode("Debbie");
girls[1] = new DefaultMutableTreeNode("Jane");
girls[2] = new DefaultMutableTreeNode("Sally");
girls[3] = new DefaultMutableTreeNode("Jessica");
girls[4] = new DefaultMutableTreeNode("MoonUnit");
girls[5] = new DefaultMutableTreeNode("Sara");
rootNode = new DefaultMutableTreeNode("Students");
DefaultMutableTreeNode Boys = new DefaultMutableTreeNode("Boys");
DefaultMutableTreeNode Girls = new DefaultMutableTreeNode("Girls");
//Fill up the node for boys
for(int i = 0; i < boys.length; i++)
Boys.add(boys);
//Fill up the node for girls
for(int i = 0; i < girls.length; i++)
Girls.add(girls[i]);
//add Boys and Girls to rootNode
rootNode.add(Boys);
rootNode.add(Girls);
model = new DefaultTreeModel(rootNode);
jTree1 = new JTree(model);
jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
jTree1.putClientProperty("JTree.lineStyle", "Angled");
jTree1.addTreeSelectionListener(new TreeSelectionListener()
public void valueChanged(TreeSelectionEvent event)
path = event.getPath();
DefaultMutableTreeNode node = getTreeNode(path);
status.setText("Selected: " + (String)node.getUserObject());
jScrollPane1.getViewport().add(jTree1, null);
getContentPane().add(jScrollPane1, BorderLayout.CENTER);
getContentPane().add(add, BorderLayout.NORTH);
getContentPane().add(status, BorderLayout.SOUTH);
setVisible(true);
public DefaultMutableTreeNode getTreeNode(TreePath path)
return (DefaultMutableTreeNode)(path.getLastPathComponent());
public void actionPerformed(ActionEvent e)
jTree1.repaint();
if (path == null || path.getPathCount() < 1)
return;
DefaultMutableTreeNode treeNode = getTreeNode(path);
DefaultMutableTreeNode newNode = new DefaultMutableTreeNode("My New Node");
treeNode.add(newNode);
model.nodeStructureChanged(treeNode);
path = path.pathByAddingChild(newNode);
jTree1.scrollPathToVisible(path); -
JDev 11g ADF Tree question on programmatically expand and select node
I have two questions:
1. I'm trying to automatically expand the first level tree nodes upon display of the tree. I tried to initialize a RowKeySetImpl object, and added ArrayList of first level nodes, and used setDisclosedRowKeys method. The tree nodes are not rendered properly. If I take the following code out, then the tree content is rendered properly. Here is my code. I have three nodes that I want to expand.
ArrayList node1 = new ArrayList();
node1.add(new Integer(0));
ArrayList node2 = new ArrayList();
node2.add(new Integer(1));
ArrayList node3 = new ArrayList();
node3.add(new Integer(2));
RowKeySetImpl expand = new RowKeySetImpl();
expand.add(node1);
expand.add(node2);
expand.add(node3);
this.mainTree.setDisclosedRowKeys(expand);
2. I have a Panel Splitter, on the first facet, it contains a tree, on the second facet it will be either 'task list', or 'edit task'. When user selects a task in the 'task list', I would like to display 'edit task', while highlight the selected 'task' node on the tree.
In respond to the ActionListener of the command link (each command link corresponds to task):
1. How do I determine the properly node in the tree?
2. I constructed a RowKeySetImpl object and called setSelectedRowKeys. But I get messagebox saying "To display the webpage again, Internet Explorer needs to resend the information you've previously submitted." If I clicked Retry button, the message box just gets displayed again. If I cancel, the node I hardcoded does get selected properly.
Please help me!
Thanks,I believe this has already been fixed in our main code branch. I will enter a boxer bug and make sure that the fix gets backported to boxer so that it is available in the next boxer patch. If I remember correctly, the issue had to do with trees with a large display area (with default fetchSize of 25). The issue is that the tree has to make multiple round trips to the server in order fill the visible area (view port) on the page.
Do either of the following workarounds work:
1) Set a fetchSize attribute on the af:tree tag larger than 25 (<af:tree fetchSize="75">). You may want to increase the rangeSize in your pageDef file as well so that the model rangeSize matches the view fetchSize.
2) Shrink the size of the tree on the page so that it does not have to make multiple round trips to the server to fill it's view port. -
How to programmatically click a tree node(make it selected)?
in my program, i want to make a tree node "clicked" by codes, so that the valueChanged(TreeSelectionEvent tse e) method of the TreeSelectionListener can be invoked.
thanks a lot!!private Robot robot;
private void triggerMouseClick(TreePath treePath) {
if (robot == null) {
try {
robot = new Robot();
robot.setAutoDelay(60);
catch (AWTException e) {
e.printStackTrace();
Rectangle rect = this.getPathBounds(treePath);
Point point = new Point(rect.x+1, rect.y+1);
SwingUtilities.convertPointToScreen(point, this);
robot.mouseMove(point.x, point.y);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
} -
Want to select a tree node Programmatically
Hi all,
I have a tree which is acting as a menu and by deafult which nodes are collapsed. Now what I need is I want to select a tree node(which node value or node label is known) by clicking a button. Pls help me. Bye.
BR
Tarik.Is it about this one?
FTREE.SET_TREE_SELECTION(tree, node, FTREE.SELECT_ON)
If another node is already selected, first unselect it:
FTREE.SET_TREE_SELECTION(tree, FTREE.GET_TREE_SELECTION(tree, 1), FTREE.SELECT_OFF); -
Version: Jdeveloper 11.1.2.1.0
how to get programmatically tree node value.
i have tried but cann't read value from selected node.
please help me.
here is my application creation steps:
1. New Application
2. Fusion Web Application (ADF) Template
3. Create View Object VOTreeMst
Query:
Select Department_Name,Department_Id
From Departments
4. Create View Object VOTreeChd
Query:
Select Last_Name,Employee_Id,Department_Id
From Employees
5. Create View Link VLTreeMstChd
VOTreeMst.DepartmentId=VOTreeChd.DepartmentId
And Add to Application Module
6. Create page page1 in ViewController
New-->Web Tier-->JSF/Facelets-->Page
Selected Document Type JSP XML
7. Drag VOTreeMst1 From Data Controls into page1
and select Tree-->ADF Tree
8. ADD java Code into selection Listener
public void nodeSelect(SelectionEvent selectionEvent) {
//original selection listener set by ADF
String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
//make sure the default selection listener functionality is preserved.
//you don't need to do this for multi select trees as the ADF binding
//only supports single current row selection
/* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
FacesContext fctx = FacesContext.getCurrentInstance();
Application application = fctx.getApplication();
ELContext elCtx = fctx.getELContext();
ExpressionFactory exprFactory = application.getExpressionFactory();
MethodExpression me = null;
me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
new Class[] { SelectionEvent.class });
me.invoke(elCtx, new Object[] { selectionEvent });
/* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
RichTree tree = (RichTree)selectionEvent.getSource();
TreeModel model = (TreeModel)tree.getValue();
//get selected nodes
RowKeySet rowKeySet = selectionEvent.getAddedSet();
Iterator rksIterator = rowKeySet.iterator();
//for single select configurations, thi sonly is called once
while (rksIterator.hasNext()) {
List key = (List)rksIterator.next();
JUCtrlHierBinding treeBinding = null;
CollectionModel collectionModel = (CollectionModel)tree.getValue();
treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
Row rw = nodeBinding.getRow();
//print first row attribute. Note that in a tree you have to determine the node
//type if you want to select node attributes by name and not index
String rowType = rw.getStructureDef().getDefName();
if(rowType.equalsIgnoreCase("VOTreeMst")){
System.out.println("This row is a department: " + rw.getAttribute("DepartmentId"));
else if(rowType.equalsIgnoreCase("VOTreeChd")){
System.out.println("This row is an employee: " + rw.getAttribute("EmployeeId"));
else{
System.out.println("Huh ????");
// ... do more usefuls stuff here
9. when i click on first node it is working but i click on second node it is not working
error message::
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.el.ELException: java.lang.NullPointerException
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
<RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
javax.el.ELException: java.lang.NullPointerException
I have also tried using following code but same problem
public void onTreeSelect(SelectionEvent selectionEvent) {
//original selection listener set by ADF
String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
//make sure the default selection listener functionality is preserved.
//you don't need to do this for multi select trees as the ADF binding
//only supports single current row selection
/* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
FacesContext fctx = FacesContext.getCurrentInstance();
Application application = fctx.getApplication();
ELContext elCtx = fctx.getELContext();
ExpressionFactory exprFactory = application.getExpressionFactory();
MethodExpression me = null;
me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
new Class[] { SelectionEvent.class });
me.invoke(elCtx, new Object[] { selectionEvent });
/* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
RichTree tree = (RichTree)selectionEvent.getSource();
TreeModel model = (TreeModel)tree.getValue();
//get selected nodes
RowKeySet rowKeySet = selectionEvent.getAddedSet();
Iterator rksIterator = rowKeySet.iterator();
//for single select configurations, thi sonly is called once
while (rksIterator.hasNext()) {
List key = (List)rksIterator.next();
JUCtrlHierBinding treeBinding = null;
treeBinding = (JUCtrlHierBinding)((CollectionModel)tree.getValue()).getWrappedData();
JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
Row rw = nodeBinding.getRow();
//print first row attribute. Note that in a tree you have to determine the node
//type if you want to select node attributes by name and not index
System.out.println("row: " + rw.getAttribute(0));
But
If i create .jspx page From
Web Tier->Jsp->page Then it is working fine
when i create .jspx page From
Web Tier->JSF\Facelets->page Then it is not working
i need to get value from "Web Tier->JSF\Facelets->page"
is there any help please?You should try Franks generic selectionListener http://www.oracle.com/technetwork/developer-tools/adf/learnmore/25-generic-tree-selection-listener-169164.pdf. For help on hoe to get the selected tree node data check http://www.oracle.com/technetwork/developer-tools/adf/learnmore/26-get-selected-tree-node-data-169165.pdf
Timo -
How to set the control-on hierarchical tree nodes
Hi,
I have created form in which at the left it has hierarchical tree structure(BOM) and towards the right it brings up the query results for selected node.
Now, I have a button upon clicking which I navigate to the root node by issuing
"Ftree.set_Tree_selection(htree, 1, Ftree.select_on);".
But, it cannot automatically run the ' when-tree-node-selected' trigger '.
any solution???
Its really urgent.I have a customer demo on monday.
Please help me asap.
regards,
Nagadeep.Hello Nagadeep,
couldn't you just put the code from the trigger into a procedure
and run that after the navigation to the item?
Just a thought,
Bernd
The docs state that:
No programmatic action will cause the When-Tree-Node-Selected trigger to fire. Only end-user action will generate an event.
Probably due to performance reasons.
Bernd
Message was edited by:
Bernd Prechtl -
Tree Node selected not firing all the time
I have a tree menu that calls other forms when the user selects a tree branch (see
When-tree-node-selected trigger below).
This works fine, but if the user closes the form and want to re-open it, the trigger doesn't fire unless the user clicks off the branch item and back on it. How can I make it work whenever the user clocks the branch item?
if :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' then null;
node_value := Ftree.Get_Tree_Node_Property(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE);
open_a_form(l_form,l_module,l_form_code);
end if;Have you tried setting the node the node to deselected programmatically?
-
How to copy & paste tree nodes
Hello,
Can i have an example that copies & pastes tree nodes?
thank u.It is most probably be cause you are trying to select/deselect an already selected/deselected node programmatically, you need to be careful when using SELECT_ON/OFF if the node is already selected.
The WHEN-TREE-NODE-SELECTED trigger fires also when a node is deselected, this where the problem exists with this error.
Use the :SYSTEM..TRIGGER_NODE_SELECTED system variable to determine whether the node is being selected or deselected, it returns 'TRUE' when selected and 'FALSE' when deselected and change your code logic accordingly.
Metalink Note:292050.1 clearly states the cause of this error
Tony
Edited by: Tony Garabedian on Aug 26, 2008 2:08 PM -
Setting annimated image to tree node
Hi all,
I am setting an annimated gif image to tree node like this,
ImageIcon newIcon = ImageIcon.get("test.gif");
setClosedIcon(newIcon);
setOpenIcon(newIcon);
setLeafIcon(newIcon);
but with this the annimation effect doesn't appear in the node.
It is only static image without annimation.
what is wrong here?
how to achieve annimation on tree node?
pls help
-SoniThanks for the reply Frank.
I saw the link http://sreevardhanadf.blogspot.in/2012/07/showing-next-row-as-current-row-after.html
However the issue is since I am using custom created tree using POJO tree item (composite object).
calling myTree.getWrappedData() doesn't gives me a handle to JUCtrlHierBinding and subsequent access to JUCtrlHierNodeBinding.
my program gives me data like -
List<MyTreeItem> treeData = (List<MyTreeItem>)treeModel.getWrappedData();
because my tree model is build using -
treeModel = new ChildPropertyTreeModel(items, "children");
where items is List of <MyTreeItem>
Hence I am unable to get a handle using -
List nodeParentList = nodeParent .getKeyPath();
I am programmatically able to invoke the parent node to get the fresh data, only issue is the focus/selection of that node is not happening
Is there a way around?
Thanks
Sachin -
Need coordinate for particular tree node as currently expanded
Hi All,
i am working in flex for the past two months,currently i am
working on the drag and drop on a tree , where i am able to drag
one tree leaf node to another another tree leaf node and i am able
to draw a line between the two leaf node indicating that this has
been dragged from the previous tree of a particular node to the
current node of the tree.
The problem which i am facing is that when i collapse the
expanded tree , the line which i have drawn is not able to
synchronize with the tree expand or collapse (the line remains in
the same position even when the particular leaf node move down coz
of expansion of the above tree node.)
any help will be appreciated.there is a private function in the tree.as class:
private function getVisibleChildrenCount(item:Object):int
that I can use by multiplying how many children there are by
how tall each item "physically" displays on the screen as, but I
want to get that publicly. I don't want to go about hacking the
tree.as code, that's poor form in the highest. Does anybody else
have any ideas...
please?
Maybe you are looking for
-
I have recently got a Time Capsule with my Macbook pro retina 15". I am trying to setup my time capsule as a wifi station at my home. But the thing is I can only access wifi from my lap only. How can I share my network from timecapsule to other devic
-
Running OCR on Combined document saves no text to .txt file
I am scanning in a large 500 page document, running OCR on it and saving the data to a text file for my program to process. My network printer/copier/scanner can only read in about 70 pages at a time, so I scanned in as several PDF documents, which I
-
I see "Get DAQ Channel Names.VI" and "Get Channel Information.VI" but I just want to get the name of just channel 0, or just channel 1. Is using an array of all channel names the only way I can do this? I have Labview 6.1. THANKS!!! Lauren
-
Reclaim an IP from the IP Pool allocated for ESXi VTEP
I had an IP Pool of 5 addresses all of which were allocated to my 5 ESXi hosts. I then screwed up the VTEP vmkernel port on one of the ESXi hosts. I was only able to correct it by adding another IP to the IP Pool range of addresses and then Forcing a
-
Hi, I have a problem with my spry tabbed panels. The default tab is set to be the 1st tab, when I move to 2nd tab and navigate through the content, as the page refreshes, and before it is fully loaded it shows the content of the first tab for about 2