JTree recursive root with different children
Hi,
I'm trying to create a JTree with the following content:
<root>
|- Department 1
| |- Sub-department 1a
| | |- Employee 1a-1
| | \- Employee 1a-2
| \- Sub-department 1b
| |- Employee 1b-1
|- Department 2
| |- Employee 2-1
|- Department 3
\- Sub-department 3a
\- Sub-department 3a-1
|- Employee 3a-1-1
\- Employee 31-1-2
As you can see, the tree root can contain multiple departments. A department can consist of sub-departments and/or employees. A sub-department can also exist of sub-departments and/or employees. So the department records are some kind of tree and the employees can be put in a certain (sub-)department.
The problem is how do I map this on a JTree? If you look at the following message, Re: What is meant by Vintage Assests Maintenace you will see that my problem looks similar but isn't quite the same. I came up with the following code (which obviously doesn't work the way I like it to work):
jTree1.setModel
JUTreeBinding.createTreeNodeTypeBinding
panelBinding, jTree1, "VGroup", null, "VGroupIter",
new JUCtrlHierTypeBinding[]
new JUTreeAccessorTypeBinding("NodeType1", "mypackage1.VGroup", "Name", "SubGroups", null, null, null),
new JUTreeAccessorTypeBinding("NodeType2", "mypackage1.VGroup", "Name", "Employees", null, null, null),
new JUTreeAccessorTypeBinding("NodeType3", "mypackage1.VEmployee", "Descriptor", null, null, null, null)
Ofcourse I've created the necessary view object (with accessors) and view links. BTW, the above code doesn't make sure the root elements don't have a parent but that's no big deal at the moment.
How do I map my example on a JTree?
You may want to create a "polymorphic node" to imply that if the row behind a node has an attribute of a given value - execute a certain "accessor" to get the children.
Here's an example where I created four different Node types for EmpView, based on four values of Deptno in SCOTT schema.
jTree1.setModel(JUTreeBinding.createTreeNodeTypeBinding(
panelBinding, jTree1, "DeptView1", null, "DeptView1Iter",
new JUCtrlHierTypeBinding[] {
new JUTreeAccessorTypeBinding("NodeType1", "bc4j.DeptView", "Dname", "EmpView", null, null, null),
new JUTreeDiscrAttrTypeBinding("NodeType2", "bc4j.EmpView", "Ename", "Deptno", "10", "ReverseDept", null, null, null),
new JUTreeDiscrAttrTypeBinding("NodeType3", "bc4j.EmpView", "Ename", "Deptno", "20", "EmpView", null, null, null),
new JUTreeDiscrAttrTypeBinding("NodeType4", "bc4j.EmpView", "Ename", "Deptno", "30", "ReverseMgr", null, null, null),
new JUTreeDiscrAttrTypeBinding("NodeType5", "bc4j.EmpView", "Ename", "Deptno", "40", "EmpView", null, null, null)}));
Note that the UI editor/model editor did not let me create such a polymorphic set. So I first created four EmpView polymorphic nodes by specifying EmpView as accessor (and different deptno values). Then I edited the model in java/code editor to fixup the accessor names. Also note that these accessors should return a "RowIterator" for the JUTree binding to work.
Similar Messages
-
A second user called root with different UID after install
After installing Mavericks, I noticed that sudo didn't work properly. I investigated it for a while and then noticed that sudo was running as a user called 'root' but with different uid (217, not 0). Now, is it possible that Mavericks installation has created this second root user incorrectly? Or should I fear that my laptop was compromised before, attacker had somehow been able to create a second root user, and OS upgrade just exposed the problem.
I was able to circumvent the problem by renaming the second 'root' user with dscl, but I still would like to understand the root cause (pun intended) of the problem.~/Library is probably the one you don't want to move back because it may bring the issues back along with it.
All your own data you can drag & drop. You can drag the contents of any folder Movies, Music, Pictures, Documents (or as much as you want).
Rather than try to replace the Library you can take ~/Library/Application Support, Mail, Safari and any other folders you need.
To access your hidden ~/Library folder go to your Finder "Go" menu hold the option key to choose "Library".
Then you can drag it to the Sidebar for easy access. -
Different Identity Root with different Masters in one sun IM system
Hi!
We have the problem that we have to administer identities which have completely different sources and attributes. (internal identities with sap hr as master, external identities for system a with sql db as master, external identities for system b with flat text file as master, ...)
has anybody an idea how we could implement this?
br
MartinHello,
there is a standard SAP solution: [Decentralized Warehouse Management (LE-IDW) |http://help.sap.com/saphelp_erp60_sp/helpdata/en/51/803c35975f0054e10000009b38f839/content.htm]
for your scenario.
Andrzej -
Hi all,
i search in the forum but i can't found.
I need to have a treeTable with different root.
All the exaples that i found didn't explain how to make this!
Someone can help me?
i.e.
RootA
|___rrrrrrrr
| |___ xxx
| |___yyy
|____dddddd
RootB
|___dddd
|___ www
|___kkk
It's look like to see the folders without a ROOT master.
Thank's a lot!
RiccardoHi,
>>they are not being authorized because the user groups cannot be assigned. This is because the user cannot be found in LDAP/AD for forestA.
How did we configure the DNS resolution between the two forests? Here, we can check event logs in Event Viewer to see if some related events were logged.
Regarding how to accessing resources across forest, the following articles can be referred to as reference.
Accessing Resources across forest and achieve Single Sign ON (Part1)
http://blogs.technet.com/b/mir/archive/2011/06/12/accessing-resources-across-forest-and-achieve-single-sign-on-part1.aspx
Accessing resources across forests
https://technet.microsoft.com/en-us/library/cc772808(v=ws.10).aspx
Best regards,
Frank Shen
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
How to duplicate a node along with its children in a JTree?
Hello,
Can anyone tell me how to duplicate/create a copy of a node
along with its children?
Code snippets will be appreciated.
Thank you.It cant be done . You have to write a z pogram to update the data in the new dbtable.
-
Install many executable on the same PC with different names
Hello,
I'm trying to install several executables with different names in the same computer but at the end of install process the message is : "an higher or existing version is already installed in this computer"
I create the Executable and Setup with LabVIEW Application Builder and install the executable in the same Program Files root directory with a different sub-directory for each executable as this : Program Files-->MyProject-->SubProjet1 with exe1/SubProject2 with exe2 etc...
My OS is WinXP pro SP2 and I work with LabVIEW 8.5.
Thanks and regards,
Armindo PINTOHi Armindo,
Thank you for using the NI forums!
From what I understand, you are trying to create multiple executables of a vi project to co-exist on the same PC. Any time you re-use the LabView 8.x project file, it will generate
install package with the same product ID number. That means, if the
deployed PC has the previous version installed, which had been
generated from the same project file, the new install package will
remove the previous version and overwrite it with the new version. Or as in your case, not allow you to install lower versions of the executable. That
means, the previous version will be no longer available on the deployed
PC. If you are creating an upgraded version to the product this is
fine.
However, if you need to re-use the LabView 8.x project
file and generate a new product, which can potentially co-exist with
the previous on the end user PC, you need to generate a new installer
with a different product ID number. One of the way to do it:
Copy existing project file (e.g. "name1.lvproj") under a different name (e.g. "name2.lvproj")
Open the new instance of the project
Expand the "Build Specifications"
Right click on the installer specification, e.g. "name1 Installer"
Select "Duplicate" from the menu
You can now delete the instance "name1 Installer" and rename the "Copy of name1 Installer" to a suitable name, e.g. "name2 Installer"
Make changes that are needed between the two versions, for example:
Select a new source VI
Build a new exe file
Reflect the new exe file in the "name2 Installer"
Make
any other changes needed in "name2 Installer", for example different
documentation files included in install, change in the target install
directories, changes in the start menu shortcuts. etc.
Build the install.
Please let me know if this solves the issue, and let me know how you get on.
Kind regards,
Ashish Naik
Field Sales Engineer
National Instruments UK -
Hi all. Sorry, english is not my native language. I´ve made an .indd: each page has two columns with different threads (is a bilingual text). When I export this .indd to .epub only appears one column from a thread following the next thread. What can i do to fix this? My indesign is CS6
Thank youThere are fixed format EPUB files as can be used for children's books, etc. where there are a lot of illustrations. However, those are very work-intensive to produce. I've never worked on one.
Anne-Marie Concepcion did a Lynda.com video on producing one.
Rorohiko produces a product called ePubCrawler which can help in produced fixed format EPUB files:
Fixed Layout EPUB Assistant In InDesign: ePubCrawler | Rorohiko ... -
Recursive custom tag: different behaviour in WinXP and Linux
Hi all,
I've a strange behaviour on a web application for which I developed a custom tag to render a tree structure.
This tag take in input an object representing the tree with all its nodes, and render every node, calling hitself recursively for every child of every node.
This tag is used inside a jsp.
I deployed my webapp on JBoss in a WinXP Pro environment, and everything is ok. Then I deployed the same webapp on JBoss in a Linux Env, and the call to the custom tag... doesn't write anything (with the same input).
Used jdk are 1.6.0_10 on WinXP and 1.6.0_7 on Linux (an OpenSuse professional distribution). JBoss is 4.2 (I did tests with JBoss 4.2.2 and 4.2.3).
Here is a sample code of my tag (file outree.tag):
<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/log-1.0" prefix="log" %>
*<%@ taglib prefix="ousel" tagdir="/WEB-INF/tags/ouselector" %>*
<%@ attribute name="subtree"
required="true"
type="my.webapp.TreeObject" %>
<%@ attribute name="subroot_index" required="true" type="java.lang.Integer"%>
<log:debug category="my.webapp.ousearch.taglib" message="Tag library called, starting operations..." />
<c:if test="${not empty subtree.children}">
<c:set var="next_subtree_index" value="${subroot_index + 1}"/>
<ul class="subtree" id="subtree-${subroot_index}">
<log:debug category="${logcategory}" message="We have children, calling recursively tag library on them (next subtree index: ${next_subtree_index})..." />
<c:forEach var="currentOUChild" items="${subtree.children}">
*<ousel:outree subtree="${currentOUChild}" subroot_index="${next_subtree_index}"/>*
<c:set var="next_subtree_index" value="${next_subtree_index + 1}"/>
</c:forEach>
</ul>
</c:if>
</li>The TreeObject contains a list of children that can contain other children and so on. On every child, I call recursively my custom tag to render with a set of nested <ul> elements the entire tree structure.
Here the call from the jsp:
<%@ taglib uri="http://jakarta.apache.org/taglibs/log-1.0" prefix="log" %>
*<%@ taglib prefix="ousel" tagdir="/WEB-INF/tags/ouselector" %>*
<log:debug category="${logcategory}" message="Building subtree ${ouSubtree} HTML structure..." />
*<ousel:outree subtree="${ouSubtree}" subroot_index="1"/>*
<log:debug category="${logcategory}" message="Subtree ${ouSubtree} HTML structure built" />
...Jakarta log taglibs is used to log the value of the parameter passed to the custom tag. In the Linux env I see that the passed object is not empty (it couldn't be null because the tag enforce it as a mandatory value).
Any idea?I have found a workaround.
Simply substitute the recursive invocation, with an import of a jsp that will call the custom tag.
Note: You have to set your needed variable in request to make it visible to the jsp
<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/log-1.0" prefix="log" %>
<%@ attribute name="subtree"
required="true"
type="my.webapp.TreeObject" %>
<%@ attribute name="subroot_index" required="true" type="java.lang.Integer"%>
<log:debug category="my.webapp.ousearch.taglib" message="Tag library called, starting operations..." />
<c:if test="${not empty subtree.children}">
<c:set var="next_subtree_index" value="${subroot_index + 1}"/>
<ul class="subtree" id="subtree-${subroot_index}">
<log:debug category="${logcategory}" message="We have children, calling recursively tag library on them (next subtree index: ${next_subtree_index})..." />
<c:forEach var="currentOUChild" items="${subtree.children}">
*<c:set var="_currentOUChild" value="${currentOUChild}" scope="request"/>*
*<c:set var="_next_subtree_index" value="${next_subtree_index}" scope="request"/>*
*<c:import url="/WEB-INF/tags/outtree.jsp"/>*
<c:set var="next_subtree_index" value="${next_subtree_index + 1}"/>
</c:forEach>
</ul>
</c:if>
</li>Here is the imported jsp (outtree.jsp):
<%@ taglib prefix="ousel" tagdir="/WEB-INF/tags/ouselector" %>
<ousel:outree subtree="${_currentOUChild}" subroot_index="${_next_subtree_index}"/> -
Hyper-V Host is HP Proliant G7 with 4 onboard nics and additional (different) 4-port adapter, all 1Gbit. Server 2012 with latest updates.
VMM 2012 is sp1 with latest updates, server 2012 running in a vm.
When I create a logical switch with teamed uplink port profile in VMM, the job builds the team but fails to create the vswitch when ports from both onboard nics and adapter is used.
I am able to create a vswitch manually on the team if I do it directly on the host.
If the team is created on either purely onboard nics or purely adapter nics, the logical switch creation succeeds.
In short terms: I am able to create a vswitch based on a server 2012 team with different nics, but not a logical switch. Why?I have tried assigning both nics in one step, and one by one. When I create the logical switch team with only one nic it succeeds, but then fails when I add the second (unless it is similar to the first).
Error in VMM is
Error (2912)
An internal error has occurred trying to contact the dkfuzhv01.mia.local server: : .
WinRM: URL: [http://dkfuzhv01.mia.local:5985], Verb: [GET], Resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/scvmm/ErrorInfo?ID=1010]
Unknown error (0x80041001)
Recommended Action
Check that WS-Management service is installed and running on server dkfuzhv01.mia.local. For more information use the command "winrm helpmsg hresult". If dkfuzhv01.mia.local is a host/library/update server or a PXE server role then ensure that
VMM agent is installed and running.
If I add the second non-similar team member from the host itself, I get this error from nic teaming wizard
Validation failed and changes to the system are rolled back
It is not a question of losing connection (been there), management interface is on a different team. And it also fails when second team member is added directly on the host...
So far I will stick to the conclusion that my problem is with logical switch and different nics :)
Oh, by the way nics are HP NC382i (Broadcom) and NC365T (Intel) -
Simple spatial query with different SRID
Can anyone help me with just a real simple spatial query with different SRID.
Here is the error i get when i perform the query:
AND SDO_RELATE(A.geometrie_point, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE'
ERROR at line 4:
ORA-00604: error occurred at recursive SQL level 1
ORA-13207: incorrect use of the [IN COMPATIBLE BOUNDS in SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 84
ORA-06512: at line 4Hi,
I am using 8.1.7.2 and i have the lattest spatial patch.
From the start i had different SRID. The only thing i changed was the bounds of the coordinate system.
I reset my bounds of the coordinate system with SRID 8307 to -180,
180 in X (longitude), and -90,90 in Y (latitude) to see if the query window geometry
(geom2) will be transformed to the coordinate system of the layer geometries (geom1)
Her is the content of the user_sdo_geom_metadata :
GIS_PCP GEOMETRIE_POINT
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -5800000, 3600000, .00000005), SDO_DIM_ELEMENT('Y', 3516000, 6000000, .00000005))
82227
GIS_TEST GEOMETRIE_POLYGONE
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, .00000005), SDO_DIM_ELEMENT('Y', -90, 90, .00000005))
8307
Here is my query :
select /*+ ordered */ A.no_point
from gis_pcp A, gis_test B
WHERE SDO_RELATE(A.geometrie_POINT, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE';
Here is my result :
WHERE SDO_RELATE(A.geometrie_POINT, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE'
ERROR at line 3:
ORA-00604: error occurred at recursive SQL level 1
ORA-13207: incorrect use of the [IN COMPATIBLE BOUNDS in SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 84
ORA-06512: at line 4
If i change the bounds of GIS_TEST to the exact bouns of GIS_PCP then i dont have the error message above and i have correct results. Do i have the adjust the bounds of every layer to fit the biggest bound? -
I have a SharePoint 2010 root level site collection SC1 in web application WEBAPP1. I want to create copy of that site collection in same web application WEBAPP1. Apart from Import/Export, Restore/Backup options, will following approach work? If yes , how?
I took backup of content database of web application.
Restored database with different name
Mounted Content database to this WEBAPP1 by assigning new ID to DB
Created new site collection by using this newly mounted DB
Site collection gets created successfully but content does not appear.
Please guide if i can achieve desired functionality by using this approach.
If this helped you resolve your issue, please mark it AnsweredIt is because the Site GUID is identical, and each GUID can only be present on the farm once. You can use Backup-SPSite/Restore-SPSite (which is full-fidelity, unlike Export-SPWeb/Import-SPWeb), which will generate a new GUID for the restore Site Collection,
even in the same Web App.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Restarting a failed admin server on another machine with different IP
Hi,
I'm trying to restart a failed admin server on another machine with different IP on Weblogic Server 10gR3. After copying the domain config to another server, the admin server can be started without any problem, but it cannot contact the managed server until the managed server is rebooted.
The behavior contradicts the documentation, http://download.oracle.com/docs/cd/E12840_01/wls/docs103/server_start/failures.html#wp1064112, that says Running MSs will learn the new AS address when they are contacted by the AS after it has been started. It does not mention the managed servers need to be rebooted.
did I do anything wrong? Your help would be much appreciated.
Thanks a lot,
AndreasHi,
What ever you said is true. If the IP Address of Admin Server is changed, then Managed Server must connect to Admin Server after "ReconnectIntervalSecs" . If the IP address is not moved then Admin Server Should contact Managed Server automatically.
Can you provide details steps you had performed, so that we can identify the root cause of the issue.
Thanks.
Vijay Bheemineni. -
Photoshop shut down while I drew a picture, now the file is broken and I can´t fix it, photshop won´t open the file and I have tried repearing it with different programs. What should I do? I spent 6 hours on the pic and I dont even have a screenshot or anything.
You don't even say what platform you are on, or any other details that may help others assist you.
If you are on a Mac, try opening your file in GraphicConverter (they have a demo version) if that doesn't open it, nothing will, in my experience.
I assume you have tried Adobe Illustrator already to recover.
You may also have a JPEG of your complete file (flattened) in Bridge Cache.
On the Mac you'd find it in your User ~Library (NOT the Root Library ):
Users > yourname > Library > Caches > Adobe > Bridge CS6 > Cache > 1024 > jpg(fileID)number Filename.psd.jpg
The user ~Library is hidden, but you can make it visible for an moment or two. Ask Apple if you don't know how.
I don't do Windows. -
IHC Cash concentration Account Hierarchy with different currencies - F9H1
Hello Experts,
Can someone please help me find out if it In Tcode: F9H1/F9H2, it is possible to create an account hierarchy with sub account in different currency than the Root account?
I am getting the following error when I try to create an account hierarchy with different currencies in root account(USD account) and subaccount(GBP account)
"Account XXXXGBPYYYY / GBP cannot be inserted; Currency not possible"
Is this a system limitation or are we missing some configuration?
Please adviceHi Anya,
In the new version of IHC, which is available from EA-FINSERV 500 onwards, the cash concentration process generates 2 payment orders -
1. BCA payment order ( or the OLD IHC payment order - can be viewed via F9I3)
2. IHC payment order (or the payment order created in the new version - can be viewed via IHC0)
This happens only when you configure the module IHC_BCA_EXTERNAL_PAYMENT in the BTE 10310 for application IHC.
This would then call the new version of IHC and post a payment order which you can view from tcode IHC0.
If instead of module IHC_BCA_EXTERNAL_PAYMENT, another module PAYMENT_EXTERN_IHC is configured in the BTE 10310 then it would look for an entry in the table TBKKIHB4 to create a PAYRQ (treated as external payment). And, on finding the table empty, it throws the error message as mentioned by you.
Hope this helps!
Best regards,
Sidhartha -
How to load and unload same SWF with different xmlFilePath?
I have a slideshow on my homepage and try to load and unload same instance with different xmlFilePath based on language on the same page.
var flashvars = {
xmlFilePath: escape("http://www.bodto.com.tr/kik.aspx"),
xmlFileType: "OPML",
lang: swfobject.getQueryParamValue("lang")
//initialURL: escape(document.location)
var params = {
bgcolor: "#000000",
allowfullscreen: "true",
wmode:"transparent",
allowScriptAccess: "always"
var attributes = {}
swfobject.embedSWF("/swf/slideshowpro.swf", "flashcontent", "550", "400", "10.0.0", false, flashvars, params, attributes);
Actionscript3
var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
my_ssp.xmlFilePath = langPath;
var fileType = root.LoaderInfo.parameters["xmlFileType"];
my_ssp.xmlFileType = fileType;
Based on above informations, how could I achieve it?Suddenly that code in the following gives me some error
var langPath = root.LoaderInfo.parameters["xmlFilePath"]+root.LoaderInfo.parameters["lang"];
my_ssp.xmlFilePath = langPath;
var fileType = root.LoaderInfo.parameters["xmlFileType"];
my_ssp.xmlFileType = fileType;
Access of possibly undefined property LoaderInfo through a reference with static type flash.display:DisplayObject.
The only code snippet works is
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
for (var param in paramObj) {
if (param == "xmlFilePath") {
my_ssp.xmlFilePath = paramObj[param];
if (param == "xmlFileType") {
my_ssp.xmlFileType = paramObj[param];
Maybe you are looking for
-
I've been running some tests on my IP profile over the past year. Here's my outcome (just the download) 2012 April 47 May 47 June 47 July 40 ( I switched off modem once) Aug 40 Sep 47 Oct 47 Nov47 Dec47 2013 Jan 39 ( I switched off modem once) Feb 39
-
Hot Deplyment in Weblogic-10.3?
Hi All, This is Prem..Can anyone let me know whether the Hot Deployment process is possible in Weblogic-10.3? I have copied the deployment folder directly to the following location (without creating a WAR) C:\bea\user_projects\domains\my_domains\auto
-
I have an account with Adobe CC on My main PC, can I install it on My secondary PC at no extra cost?
-
Has Apple acknowledged the bug in OS 10.4.8 that...
...has neutralized my new Intel-based MacBook's wireless capability? There are many others having the same problem yet no updates or fixes have come from Apple. I'd rather hear Steve Jobs tell us they've fixed this bug than hear about the iPhone. C'm
-
How to launch a new terminal window from the current Finder folder?
Hello. I would like to have something like "DOS prompt here" menu item on the Finder popup menu, so that when I click it a new Terminal window is open and set to the respective directory. Any ideas?