How could i get the selected node in the JTree
getLastSelectedPathComponent() �returns the parent node of currenr selected, so how could I get the selected node itself in the JTree
I will appretiate for any help!
i think you can get by....
TreePath treePath = tree.getSelectionPath();
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) treePath.getLastPathComponent();
Similar Messages
-
I want the faded gray color to change to blue or another color after I click a link.
The sidebar is no longer selected after you click a link in the sidebar, so the blue color is change to a gray color to indicate that the sidebar doesn't have focus..
-
ADF Tree 10.1.3.1, not highlighting the selected node.
Hi,
I'm having a problem highlighting the selected node in the ADF CoreTree.
I use the treehandler and model as described in the link: http://technology.amis.nl/blog/2116/much-faster-adf-faces-tree-using-a-pojo-as-cache-based-on-read-only-view-object-showing-proper-leaf-nodes-again
I use this objects because my tree was showing leaf node with the image to collapse.
The tree now looks great, the only problem is that when i click on a node the focusRowKey is set accordingly(debugging the getter and setter) but is not show as the selected node.
The tree jspx code looks the follow:
<!--TREE-->
<af:tree value="#{ActosTreeHandler.treemodel}" var="node"
focusRowKey="#{ActosTreeHandler.focusRowKey}"
id="treeActos"
varStatus="nodeStatus" binding="#{ActosTreeHandler.jsfTree}">
<f:facet name="nodeStamp">
<af:commandLink text="#{node.description}" partialTriggers="treeActos"
action="#{backing_documentos_detalhesDocumento.treeAction}">
<!--disabled="#{node.nodeType != 'ACTO'}"-->
<af:setActionListener from="#{ActosTreeHandler.jsfTree.rowKey}"
to="#{ActosTreeHandler.focusRowKey}"/>
<af:setActionListener from="#{node}"
to="#{ActosTreeHandler.selectedNode}"/>
<af:resetActionListener/>
</af:commandLink>
</f:facet>
</af:tree>Does anyone know how this can be solved?
Best Regards.Hi,
is this the same as
Re: Facing a problem in programmatically setting focus on a node in <af:tre
Frank -
Apply XSLT while importing the xml to the selected node in structure view
Hi All,
I would like to apply XSLT while importing the xml file to the selected node in the structure view.
How to go about it?
Thanks
SakthiHi All,
Got the solution,
UIDRef documentUIDRef = ::GetUIDRef(activeContext->GetContextDocument());
InterfacePtr<IDocument> document(documentUIDRef, UseDefaultIID());
InterfacePtr<IXMLImportOptionsPool> prefsPool( document->GetDocWorkSpace(), UseDefaultIID() );
InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());
InterfacePtr<IK2ServiceProvider> serviceProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLImportMatchMakerSignal Service, kXMLThrowAwayUnmatchedRightMatchMakerServiceBoss));
InterfacePtr<IXMLImportPreferences> prefs(serviceProvider, IID_IXMLIMPORTPREFERENCES);
XMLImportPreferencesInitializer initializer(prefs, prefsPool);
bool16 prefBool = prefs->GetNthPrefAsBool(0);
prefs->SetNthPref(0, kTrue);
The above code set the import option "Delete elements, frames, and content that do not match imported XML"
Thanks
Sakthi -
How to get UIComponent of the selected node in af:tree with drag and drop
Hi
Are there examples showing how one could get a UIComponent using DropEvent to be used with a Popup showing as a custom "context menu" at the target node ?
Right now, with dropEvent.getDropComponent, we could only get the tree.
We like to get its selected node so that the popup shows at the node level, not at the tree level.
ThanksHi Frank
Thanks for responding.
We like to show on our custom "context menu" using PopupHints (not using facet name contextmenu) with 3 commandMenuItems.
Since component id is needed by PopupHints to place this custom "context menu", we tried
RichTree dropTree = (RichTree)dropEvent.getDropComponent();
alignId = dropTree.getClientId(context);
// alignId = pt1:pt_region1:1:pt1:pc1:navTree
getClientId returns us the tree id and hence the context menu is placed next to tree.
We like to place the context menu next to a target node of the tree when dragging and dropping.
But we couldn't figure out how to get that node id.
In your suggestion,
List dropRowKey = (List) dropEvent.getDropSite();
RichTree dropComponent = (RichTree) dropEvent.getDropComponent();
dropCompoent.setRowKey(dropRowKey);
how do we then get the id of this node then ? What's the method ?
Thanks Frank -
How to get the selected node value of a tree which is build on java code
Hi Experts,
How can i get the selected node value if I build the tree programatically.
I am using the following code in selectionListener but it is throwing error.
RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
CollectionModel _tableModel =
(CollectionModel)treeTable.getValue();
RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
Iterator rksIterator = _selectedRowData.iterator();
String selectedQaCode ="";
while (rksIterator.hasNext()) {
List key = (List)rksIterator.next();
JUCtrlHierBinding treeTableBinding =
(JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
JUCtrlHierNodeBinding nodeBinding =
treeTableBinding.findNodeByKeyPath(key);
String nodeStuctureDefname =
nodeBinding.getHierTypeBinding().getStructureDefName();
selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
where I am using following link to create a tree with java code.
http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
Please help me in resolving this issue.
Regards
GayazHi,
you should also move
JUCtrlHierBinding treeTableBinding =
(JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
out of the while loop as this is not necessary to be repeated for each key in the set
Frank -
I have and iPad and I have and iPhone 5 my husband has another one and I singed all of them with the same Apple ID and accound now my husband can see all the text I send and I get everything he gets how could I get his phone out of my accound
Mishijos3 wrote:
I have and iPad and I have and iPhone 5 my husband has another one and I singed all of them with the same Apple ID ...
Have a look here...
http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l -
Trying to download iTunes 64-bit version on my new Windows 7 PC. Getting the error 'could not locate "%APPDATA%". How do I get past this error? The software doesn't install. Appreciate if someone in the forum can help.
The backup and restore from the iCloud was a little unnerving since the restore erased all information from the iPod. The iCloud backup and restore took a long time, but worked. I was very grateful.
Trying again to backup to iTunes locally proved to be the same challenging problem. The same backup to corrupt file was the message. The status bar showing backup seemed to move faster to start, but then slowed to a creep toward the end before the error.
When trying to restore a backup in iTunes, the "Restore" button is grayed out since it is looking for a local copy. Any restore would need to be from the iCloud which already worked but isn't the final solution.
Your suggestions were good, I am just in the same boat. Any thoughts about doing the following?
1) creating a cloud backup
2) resetting the iPod to factory defaults
3) removing all traces of iTunes from my computer and
4) installing iTunes and setting up iPod from scratch.
This is the next thing on my list. -
How to get the parent node of the current node?
Hi all,
i want to get the parent node of the current node and the not the parent of the parent node.
thank you very muchHi,
the parent node of <subnode1-2>29.99</subnode1-2> is (node1), how can do to get <node1> throw <subnode1-2>29.99</subnode1-2> the sub node of <node1>.
As per my understanding the parent node of <subnode1-2>29.99</subnode1-2> is book not the node1.
If you want node 1 as a parent of subnode1-2 than your xml will look like this.
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<fathernode>Harry Potter</fathernode>
<node1>
<subnode1>29.99</subnode1>
<subnode2>29.99</subnode2>
</node1>
<node2>
<subnode1>19.99</subnode1>
<subnode2>19.99</subnode2>
</node2>
</book>
</bookstore>
and also if you want tom retrive float data than refer following XPATH.
"//book[[price='1000']]/price/text()"
Regards,
Manoj Bilthare -
1. When making a book using Iphoto, one of my photos selected appears only on the back flap, how can I get it to be in the book also? I added an extra page thinking that would help, didn't!
2. It says that you can photos anytime, can I add a photo that I did not select originally without starting completely over?
...any suggesstions for both problems would be appreciated. Thanksyou can use a photo many time is the same book - simply drag it from the photo strip to the photo frame you want it in - even though you have used it before you can still use it again
And adding photos is easy - go to the photo (in an album, event or photo view) and drag the photo(s) to the book under keepsakes - it will now be available to use
LN -
How could i get the dump/restore utility?
I am newbie to arch, a stupid question
when i use FreeBSD or other Linux Distribution, dump/restore is always the standard utility
but i do not find them in pacman
how could i get the dump/restore utility?
thanksfukawi2 wrote:
Ranguvar wrote:dump and restore are deprecated in Linux IIRC. Other utilites are available. There's even a quote by Torvalds where he disses them
There's nothing wrong with the classics
I think so -
How could i get the status of Purchase Oder's status
Hi, Great ALL!
Can you tell me, what I can to do.
I need to do some check at purchase order in checking or saving time.
If there are any mistakes, system could set some warning message or error message(like the following pictures:)
1.[http://lh5.ggpht.com/dingdinghaochibao/SP3QkVca4VI/AAAAAAAAAHA/GjAd5ksg3Og/s576/Picture1.JPG]
2.[http://lh3.ggpht.com/dingdinghaochibao/SP3QkeJgx1I/AAAAAAAAAHI/DfE6mvIOpm8/Picture2.JPG]
Here is my question: How could i get those messages?a®s
Thanks for your answer.
But i still have one question. After i made a purchase order although there were one warning message given by system, i could not find any log by TR. SLG1.
Is there any way to get those message by BAdi or exit? -
Dear Customer Service Team,
I bought a twelve-month Dreamweaver CC program with monthly payment that I have paid via bank transfer and there would be a question about the activation. How could I get the license key with which I can activate my account? I can not find it and now I only have access to the trial version.
Thank you for your help in advance.
Kind Regards,
G. ZsoltThere is no serial number require for Creative Cloud products, you may activate the products using your email address and password which is associated with Adobe. If your Dreamweaver asking for serial number, then make sure you are signing in with correct email address.
You may also refer below link
Sign in, activation, or connection errors | CS5.5 and later -
I have a huge amount of my memory used by 'other' than photos and music - to my knowledge, there is nothing there apart from a few songs and photos and 5 podcasts. What could it be? How could I get rid of this 'other' stuff and get the memory back?
See -> What is "Other" and what can I do about it? by Kappy.
Clinton -
I do not have a list of "devices on the left hand side" to select iphone from when I try to sync my phone. I have never seen that list. How do i get it?
I think the new itunes formate *****!!Glad it is fixed Actually I meant to say click VIEW then show side bar but I see you got the message
Maybe you are looking for
-
G580 can't backup right out of the box. Not enough space
I recently aquired a G580 with the i5 processer, 500gb hard drive and Win8. I see the lenovo center is telling me to do a backup and since I just set it all up the way I wanted I figured it's a good idea anyway. I follow the instructions and it auto
-
Exchange online and Exchange 2010 on-premise calendar availability
I am running a hybrid exchange 2010 on-premise and online exchange environment. The online exchange users cannot see calendar availability of anybody on premise. The on-premise users can see the online exchange availability. I can see the calendar
-
IOS 8.0.2 camera not available from lock screen
iPhone 6, upgraded to iOS 8.0.2 last night. Now at the lock screen, the camera icon is there but you cannot scroll up to activate it.
-
I've tried resetting it to the defaults but that didn't help. bp-73f9c4c7-86e9-4bfa-b05a-302772140109 ''(added the crash ID to the thread body - c)''
-
Need help with Fluid Grid Layout and variable column balance.
I'm using the fluid grid layout. I have multiple columns that are actually fluid grid layout columns done by Dreamweaver. I'd like them to extend as high as each other (all to the maximum height of each other) within the same section. An added cat