How to create JTree without root node
Hello;
I like to create a JTree without root node?
Any help?
Thanks!
--tony
javadocs JTree,
setRootVisible
public void setRootVisible(boolean rootVisible)
Determines whether or not the root node from the TreeModel is visible.
Parameters:
rootVisible - true if the root node of the tree is to be displayedSee Also:
rootVisible
Similar Messages
-
How to create one more server node for SAP J2EE server?
Hi,
Can any one please suggest how to create one more server node for SAP J2EE server? I am using WAS700.
Thanks and Regards,
Smriti.Hai,
Login into the Configtool(C:\usr\sap\SID\DVEBMGS<inst no>\j2ee\configtool) if ABAP+JAVA stack or C:\usr\sap\SID\JC<inst no>\j2ee\configtool) if JAVA stack
click on the instance and and select the addserver button on the top to create a servernode for J2EE server.
Thanks and Regards, -
How to create operations without entering a performing work center
How to create operations without entering a performing work center ? which control key should i select ?
Hi
QM01 is control key used for all the task lists of Quality.
there is no such a configuration associated with control key & usage of work center.
Work center is used for the activity capturing perpose & control key is to control operations.
I hope this is clear.
Entering a work center is totally depends on the scenario & not control key.
Regards
Sujit -
How to disable selection of root node in JTree
Hi all! Thanks for taking a minute to read my post!
I am writing a really basic JTree for showing a list of items.
Here is some of the code:
/** Create a basic tree **/
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode("Title");
DefaultTreeModel treeModel = new DefaultTreeModel(rootNode);
JTree tree = new JTree(treeModel);
/** Method to return the string of the current highlighted selection **/
public String getSelectionString()
DefaultMutableTreeNode node =
tree.getSelectionPath().getLastPathComponent();
return (String)node.getUserObject();
I would like to disable selection of the root node of my JTree.
Thus, if I make a call to getSelectionString() above, it would return null instead of the string that represents the root label.
I have read the following forum on disabling various TreePaths and TreeNodes in a JTree:
http://forum.java.sun.com/thread.jsp?forum=57&thread=224691
This forum suggests implementing the TreeSelectionListener interface and the TreeSelectionModel class and over-riding the addSelectedPath() methods. I tried this suggestion, and I was able to enable and disable the different children of the Jtree, but the root of the JTree would not disable.
I suppose that I could just simply remove the visibility of the root node, but I really want to avoid that option if possible.
Wait --- let me be clear ---- I want to disable the selection of the root node only - still allowing selection of all its children.
Any suggestions?
Am I missing something really simple here?
Did I explain my problem clearly?
Thanks in advance!
jewelssimply try this..
in the
public void valueChanged(javax.swing.event.TreeSelectionEvent event);
method of TreeSelectionListener impelentation get the
TreePath tp = event.getPath();
from TreePath get the component and then remove the selection from the treePath if it is the node u were checking/root node in this case
tree.getSelectionModel().removeSelectionPath(tp);
Try out.... -
how do you create a JTree with no root node?
i just want
Parent
--child
Parent
--child
--childi think a tree must always have a root node....but I think what u can do is make that root node not visible...i've seen it done before.
good luck -
How do i add a root node to a XMLType
Hi all
I have a problem inserting a root node in a xml document generated by DBMS_XMLGEN.newcontextfromhierarchy. The function get_site_map_nodes generates a document like this:
<?xml version="1.0"?>
<siteMapNode f_page_id="1" title="rot" PATH="1">
<siteMapNode f_page_id="2" title="1.1" PATH="1.1">
<siteMapNode f_page_id="4" title="1.1.1" PATH="1.1.1"/>
</siteMapNode>
<siteMapNode f_page_id="3" title="1.2" PATH="1.2"/>
<siteMap/>
</siteMapNode>
This is correct but i want to add a root node so the result shows as below:
<?xml version="1.0"?>
<siteMap>
<siteMapNode f_page_id="1" title="rot" PATH="1">
<siteMapNode f_page_id="2" title="1.1" PATH="1.1">
<siteMapNode f_page_id="4" title="1.1.1" PATH="1.1.1"/>
</siteMapNode>
<siteMapNode f_page_id="3" title="1.2" PATH="1.2"/>
<siteMap/>
</siteMapNode>
</siteMap>
The problem is that i have no clue how to accomplish this.
Best regards
Daniel Carlsson
PACKAGE BODY PKG_PAGE_STRUCTURE
IS
FUNCTION get_level_path (in_page_id IN page_structure.f_page_id%TYPE)
RETURN VARCHAR2
IS
l_path VARCHAR2 (4000) := '';
BEGIN
SELECT MAX (SYS_CONNECT_BY_PATH (f_show_order, '.'))
INTO l_path
FROM page_structure
START WITH f_page_id = in_page_id
CONNECT BY PRIOR f_parent_page = f_page_id;
l_path := RTRIM (l_path, '.');
RETURN l_path;
END get_level_path;
FUNCTION get_site_map_nodes (in_page_id IN page_structure.f_page_id%TYPE)
RETURN XMLTYPE
IS
qryctx DBMS_XMLGEN.ctxhandle;
l_xml XMLTYPE;
BEGIN
qryctx :=
DBMS_XMLGEN.newcontextfromhierarchy
('select level, xmlelement("siteMapNode", XMLAttributes(f_page_id as "f_page_id",
f_title_phrase as "title", pkg_page_structure.get_level_path(f_page_id) as path))
FROM PAGE_STRUCTURE
START WITH f_page_id = :in_page_id
connect by f_parent_page = prior f_page_id
ORDER siblings BY f_show_order'
DBMS_XMLGEN.setbindvalue (qryctx, 'in_page_id', TO_CHAR (in_page_id));
l_xml := DBMS_XMLGEN.getxmltype (qryctx);
DBMS_XMLGEN.closecontext (qryctx);
RETURN l_xml;
END get_site_map_nodes;
END PKG_PAGE_STRUCTURE;
CREATE TABLE page_structure
(f_page_id NUMBER(10,0) NOT NULL,
f_parent_page NUMBER(10,0),
f_show_order NUMBER(10,0),
f_title_phrase VARCHAR2(20),
f_created_by NUMBER(10,0),
f_created_date DATE,
f_updated_by NUMBER(10,0),
f_updated_date DATE)
INSERT INTO page_structure
(F_PAGE_ID,F_PARENT_PAGE,F_SHOW_ORDER,F_TITLE_PHRASE,F_CREATED_BY,F_CREATED_DATE,F_UPDATED_BY,F_UPDATED_DATE)
VALUES
(1,NULL,1,'rot',1,'30-MAR-2006',NULL,NULL)
INSERT INTO page_structure
(F_PAGE_ID,F_PARENT_PAGE,F_SHOW_ORDER,F_TITLE_PHRASE,F_CREATED_BY,F_CREATED_DATE,F_UPDATED_BY,F_UPDATED_DATE)
VALUES
(2,1,1,'1.1',1,'30-MAR-2006',NULL,NULL)
INSERT INTO page_structure
(F_PAGE_ID,F_PARENT_PAGE,F_SHOW_ORDER,F_TITLE_PHRASE,F_CREATED_BY,F_CREATED_DATE,F_UPDATED_BY,F_UPDATED_DATE)
VALUES
(3,1,2,'1.2',1,'30-MAR-2006',NULL,NULL)
INSERT INTO page_structure
(F_PAGE_ID,F_PARENT_PAGE,F_SHOW_ORDER,F_TITLE_PHRASE,F_CREATED_BY,F_CREATED_DATE,F_UPDATED_BY,F_UPDATED_DATE)
VALUES
(4,2,1,'1.1.1',1,'30-MAR-2006',NULL,NULL)
/Please try below steps.
1. Complete Prerequisite for adding cluster node
2. Verify the node is accessible to all other nodes in the cluster. Run the following command from the existing node in the cluster.
cluvfy stage -pre crsinst -n newNode
3. Run cluvfy from any existing node
cluvfy stage -pre nodeadd -n <New Node>
Note : If cluvfy in above step shows any errors fix those and then proceed with this step
4. Change Directory to Clusterware Home and execute addNode scripts from any existing node.
cd $CRS_HOME/oui/bin
./addNode.sh -silent "CLUSTER_NEW_NODES={ <NewNode > } CLUSTER_NEW_PRIVATE_NODE_NAMES={ <Interconnect >} CLUSTER_NEW_VIRTUAL_HOSTNAMES={ < Virtual Host Name >}"
At the end of addNode, script will prompt to run for root.sh on newly added node.
5. Verify Node is successfully added
cluvfy stage -post nodeadd -n <NewNode >
6. Verify CRS Stack is running on the new Node.
$CRS_HOME/bin/crs_stat -t
7. To extend the Oracle RAC Installation to include the new Node, run addNode from $ORACLE_HOME/oui/bin from existing node in the cluster
cd $CRS_HOME/oui/bin
./addNode.sh
When OUI displays the Specify Cluster Nodes to Add to Installation window, select the node to be added, then click Next .
Verify the summary and run root.sh on new node when it prompts.
8. Adding New Instance on the New Node
$CRS_HOME/bin/lsnrctl status
9.Run $ORACLE_HOME/bin/dbca from any of the existing RAC Instances Oracle Home.
Select Oracle Real Application Clusters database , and then click Next .
Select Instance Management , and then click Next .
Select Add an Instance , then click Next .
Click Next to accept default instance name or it can be changed.
Check the summary window.
Note: Please check these steps in test environment first.
HTH -
How to change a generated root node for a hierarchy?
Hello,
we are loading hierarchies from an ECC system. Some of those hierarchies don't have a root node in the source system.
For those hierarchies, the root node is generated during the loading. This node is generated in english (ie : FUNDS CENTER HIERARCHY for fund centers). Is there a way to change the description and the technical name of this node to have it in another language.
We have tryied to change the language of ALEREMOTE in BI but it did not solve this problem.
Thanks,
PhilippeHi Simon,
the language that triggered the loading was french.
BI Learner,
- to create a custom hierarchy in a BI system, you can use RSH1 transaction.
- if you want to load it from a SAP source system, you can use standard datasource provided in the business content (usually named *_HIER)
-if you need to load it from a flat file, you can follow the steps of this blog, it will help you:
Hierarchy Upload from Flat files
you can have more information about hierarchies on the help.sap web site :
http://help.sap.com/saphelp_nw70/helpdata/EN/a8/6b023b6069d22ee10000000a11402f/frameset.htm
Regards,
Philippe -
How to create PDF without embedded fonts from Indesign
Can anyone tell me how to create from Indesign a PDF that certainly does not contain any fonts I don't want to include? But that would appear in the same layout in a substituted font, including italics and small caps?
You can't, InDesign will embed the fonts for you.
To unembed fonts you need Acrobat Professional. Go to Tools>Print Production>Pdf Optimiser
go to Fonts
And select the fonts to unembed.
You could select any text and change the Transparency to 99.9%.
Then in Edit>Transparency Flattener make a new one using High as a base for the new
Select Convert Text to Outlines.
When you Export to pdf, choose Adobe PDF 1.3, and go to Flattening, choose the new Flattener Preset that you just made.
And when you export it, any text forced through the Flattener will be converted to outlines. (this could violate the terms of the Font Licencing.) -
Hi Experts,
please provide me any UDF or Java or XSLT maaping code to add text into the root node of the payload i.e. my target Payload will be like
<ns1:sObjects>
<ns2:Id>123</ns2:Id>
<ns2:name>Test message <n/s2:name>
</ns1:sObjects>
and i have to get it like
<ns1:sObjects xsi:type="Account">
<ns2:Id>123</ns2:Id>
<ns2:name>Test message <n/s2:name>
</ns1:sObjects>
Regards,
YugandharHI Yugandhar,
In case of sales force, the can team will provide you a WSDL, In that WSDL you can manually edit the type:Account and can use the same while mapping.
pls find the below screen shot, it will give you a better idea,
pls let me know if you any further issues regarding.
Pls Mark it as a correct answer if it is.
Thanks,
Prasad. -
How extract Solaris package without root privilege
Hi!
Is there any way to extract files from Solaris package file (.pkg) without root privilege?
Like I can do it for rpm: rpm2cpio foo-2.0.i386.rpm | cpio -ivmudYou can use 'pkgtrans':
Syntax:
pkgtrans <package> <destination directory>
.7/M. -
How to create a specific property node w/ VI script
I am writing a VI script to work with some multi column listboxes. I need it to create a property node that gets a reference to the ItemNames field. I see that I can create a property node via the invoke node method Create.Property Node, but how to get the ItemNames field specifically I so far can't figure out. Can anyone help?
To be clear, I am writing code that looks like this:
...and when I run the script, I want it to produce this:
Right now it produces the MCL as expected, via the New VI Object node...but I don't know how to get the ItemNames created automatcially. I thought it might be in the PropItems array but so far no luck.
thank you
Solved!
Go to Solution.The output of "PropItems[]" will be a one element array. Index that element and wire the reference to an invoke node. Select the method "SetProperty".
-
How to create and use a node globally as well as internal table
HI,
Kindly let me know how can I create a node & internal table globally and which I can use them in various methods in view and controller as well, if u can provide an example it could be very help full.
my requirment is uploading a multiple files in wdp ABAP for this I just followd the link below
http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
which for single upload and for making this for multiple upload I need a node could be usefull globally or a IT please check my code below
DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.
DATA lo_el_n_upload TYPE REF TO if_wd_context_element.
DATA ls_n_upload TYPE wd_this->element_n_upload.
DATA lo_nd_n_file_download TYPE REF TO if_wd_context_node.
DATA lt_n_file_download TYPE wd_this->elements_n_file_download.
data ls_file_upload TYPE ZFILE_UPLOAD1.
ZFILE_UPLOAD_1 = wd_componentcontroller->Elements_ZFILE_UPLOAD_1.
t_file_upload = ig_componentcontroller->ITAB1.
t_file_upload = wd_this->zfile_upload1.
navigate from <CONTEXT> to <N_FILE_DOWNLOAD> via lead selection
lo_nd_n_file_download = wd_context->get_child_node( name = wd_this->wdctx_n_file_download ).
navigate from <CONTEXT> to <N_UPLOAD> via lead selection
lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).
get element via lead selection
lo_el_n_upload = lo_nd_n_upload->get_element( ).
@TODO handle not set lead selection
IF lo_el_n_upload IS not INITIAL.
get all declared attributes
lo_el_n_upload->get_static_attributes(
IMPORTING
static_attributes = ls_n_upload ).
ls_n_upload will contain the File name file type and file contents *
ls_n_upload-file_size = xstrlen( ls_n_upload-file_content ).
ls_file_upload-FILE_NAME = ls_n_upload-FILE_NAME.
ls_file_upload-FILE_TYPE = ls_n_upload-FILE_TYPE.
ls_file_upload-FILE_SIZE = ls_n_upload-FILE_SIZE.
ls_file_upload-FILE_CONTENTS = ls_n_upload-FILE_CONTENT.
append ls_file_upload to t_file_upload.
clear ls_file_upload.
lo_nd_n_file_download->bind_table( new_items = t_file_upload set_initial_elements = abap_true ).
ENDIF.
so here I would like use t_file_upload(node or IT ) to use globaly which can keep the previous data and I can add the existing data and in another method I would like to submit the data in t_file_upload to table
Regards
rajHi Chandra,
Resloved, I createa table type in SE11 by giving my table name as a line type and I used that as a Global IT in view "attributes" tab and I made the my code as follows its working now
DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.
DATA lo_el_n_upload TYPE REF TO if_wd_context_element.
DATA ls_n_upload TYPE wd_this->element_n_upload.
DATA lo_nd_n_file_download TYPE REF TO if_wd_context_node.
DATA lt_n_file_download TYPE wd_this->elements_n_file_download.
data ls_file_upload TYPE ZFILE_UPLOAD1.
data t_file_upload TYPE standard table of ZFILE_UPLOAD1.
navigate from <CONTEXT> to <N_FILE_DOWNLOAD> via lead selection
lo_nd_n_file_download = wd_context->get_child_node( name = wd_this->wdctx_n_file_download ).
navigate from <CONTEXT> to <N_UPLOAD> via lead selection
lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).
get element via lead selection
lo_el_n_upload = lo_nd_n_upload->get_element( ).
@TODO handle not set lead selection
IF lo_el_n_upload IS not INITIAL.
get all declared attributes
lo_el_n_upload->get_static_attributes(
IMPORTING
static_attributes = ls_n_upload ).
ls_n_upload will contain the File name file type and file contents *
ls_n_upload-file_size = xstrlen( ls_n_upload-file_content ).
ls_file_upload-FILE_NAME = ls_n_upload-FILE_NAME.
ls_file_upload-FILE_TYPE = ls_n_upload-FILE_TYPE.
ls_file_upload-FILE_SIZE = ls_n_upload-FILE_SIZE.
ls_file_upload-FILE_CONTENTS = ls_n_upload-FILE_CONTENT.
append ls_file_upload to ME->wd_this->gt_file_upload .
clear ls_file_upload.
lo_nd_n_file_download->bind_table( ME->wd_this->gt_file_upload ).
endif.
thanks for the support.
Regards
Raj -
How to create child without master context.
Hi,
I have a special requirement where I need to allow user to create a child record without master context.
I have two VOs MasterVO and ChildVO and have view link between those two. and cardinality is 0..1 to *. Here my master is read only VO. and it is typically group by of child attributes except Date column. I did like this, because my table is de-normalized table and column VersionNumber which is of type Date represent versions of each master. So I have created my Application module like below.
---MasterVO
---ChildVO.
In UI, when I create a child record using ChildVO, but due to view link, it is creating a record under the context of Master. But is there any way where we can use the same ChildVO instance which is under masterVO to create a new record, but the newly created record should not be created under the context of master.
I want this requirement to reuse the jsff page, because, I have Create and Edit pages, both looks similar but In create I use ChildVO to input all the values, but in Edit page few attributes(which are common attributes except date for version to version of each master) are not editable, those will be under read only Master VO(I used group by here in VO to achieve this), and in edit screen we are allowing user to create new version of master where it copies all the values in the master VO except date. so in backend it get stored as separate record with different Date.
Any help of this kind of implementation.
Thank you so much for your help in advance.
I am using JDev version 11.1.1.7.0.
Regards,
Dileep.this wil surely work
RowKeySet selectedRows = treeTable.getSelectedRowKeys();
//use EL to access binding (note that you can do this in Java as well)
JUCtrlHierBinding treeTableBinding = (JUCtrlHierBinding) executeValueExpression("#{bindings.<tree binding name>}");
//get first entry of selected rows (single selection case)
JUCtrlHierNodeBinding node = treeTableBinding .findNodeByKeyPath((List)selectedRows .iterator().next());
... do the work with the node here ...
private Object executeValueExpression(String valueExpression){
FacesContext fctx = FacesContext.getCurrentInstance();
ELContext elctx = fctx.getELContext();
Application app = fctx.getApplication();
ExpressionFactory exprFactory = app.getExpressionFactory();
ValueExpression valueExpr = exprFactory.createValueExpression(
elctx,
valueExpression,
Object.class);
return valueExpr.getValue(elctx); -
How to create a new tree node with the initial edit function
Hi all,
I would like to mimic the Windows system when the user creates a new node. The newly created node should be in the edit mode, i.e.it should
be highlighted and the cursor should be appear at the end of
the newly created node name.
I have the folloing code after I create the new node and set its selection:
TreePath selectionPath = getTree().getSelectionPath();
tree.startEditingAtPath(selectionPath);
However, this only partially does what I want, the cursor does not appear at the end of the node's name and I am not sure how to select the text name of the new node.
I hope someone can help.
KanitaI haven't tried myself but my guess is that you need to customize your tree cell editor for putting
cursor at specific position, etc. -
How to create abapProxy without ESR connection
I use local object in sproxy and i want to copy a local object service..but i cannot copy it because when i do right click,in context menu copy option doesnt exist..
is it possible to create abap proxy without Integration Builder?and how can i do it?
ThanksHi Tuncer,
From what i understood in your query below are few explanations.
ABAP Proxy can be generated using:
1. Using Object Navigator SE80
a) Call the Object Navigator (transaction SE80) in the system where you want to generate the server or client proxy. Select a package. From the context menu, choose Create ® Enterprise Services / Web Services ® Proxy Object.
b) In the dialog box that appears, choose the WSDL Source (URL/HTTP destination, local file, UDDI, or XI Repository).The Object Navigator displays proxy objects created in the system in the navigation tree under Enterprise Services ® Web Service Library (client proxies, server proxies, and proxy Dictionary-objects).
2. Using transaction SPROXY
Hope this was helpful.
Regards,
Divya
Maybe you are looking for
-
Can we have multiple Podcasts with the same Mac Account?
Hi all, Can we have multiple Podcasts with the same Mac Account? For example, I have a single .MAC account and create a website with multiple Podcast pages...or within iWeb I create multiple sites, and each has a podcast. Is there a problem? Thks Leo
-
Restored coldbackup and having trouble with TEMP tablespace
Hi, i succesfully restored from a coldbackup on solaris.(oracle 9.2) i can log on to database using toad, query the database, but when i try to take an export or something i got the error EXP-00056: ORACLE error 1157 encountered ORA-01157: cannot ide
-
Modify BOM Components in Document_Lines
Hey guys, I have a client with a request to modify the BOM lines components, specifically in the prices in the components or the quantities. Is there a way to do this without modifying the BOM itself before adding it to the document?
-
Best way to use library movieclips with classes?
Hi, I've created a carousel class which takes one parameter, an array of menu item names, these will then be displayed on the carousel. I've then created two movieclips for the left and right controls, added them to the library and given them classe
-
Password protected Sharepoint publishing site
Hello, We have used Sharepoint 2013 to design and publish a large scale website. I was wondering if there is a way to password protect an individual page or sub site? The system is linked up to our staff log in authentication system but I can't fi