Add Node in Data Model
Hi at all,<br /><br />I'm developing a new Form and i want that the user could add a new record element.<br /><br />I try to eslpain better: i've a data input file like this<br /><br /><start><br /> <record attr1="" attr2="" ...><br /> <part1><br /> <detail>hkgfhdjkg</detail><br /> </part1><br /> </record><br /></start><br /><br />I want to add a new tree of node "record" blank so the user could change the value, and this new node have to be stored in the xml file<br /><br />the clone's method could replicate an existing node.<br /><br />Thanks <br /><br />Rossano
Hi Daniel,
Please follow as follows:
A a= new A(); //Assuming that it is strctr in R/3
B a= new B(); //Assuming that it is strctr in R/3
C a= new C(); //Assuming that it is strctr in R/3
Add to a to model object
now add any number of bs to that model object
For each b you can add any number of cs.
Similar Messages
-
Hi all,
i would like to add datas into my xml model but i don't manage to do it.
Here is the context :
-I have an xml file which represents a tree
-When the xml model is loaded, i bound it to a tree
-Then i add nodes to my tree ( aNode.addNode(new Node ) )
When adding a node, i would like the node to be represented to my model;
e.g : before adding a node
<node name="node1">
<node name="node1_1"/>
<node name="node1_2"/>
</node>
after the node is added :
<node name="node1">
<node name="node1_1"/>
<node name="node1_2"/>
<node name="new node"/>
</node>
I have tried xml setProperty:
oModel.setProperty(myPath,data);
oModel.setProperty(myPath,data,oContext);
Can somebody help me to achieve this?
Thanks,
best regards,
MarcThanks for this fast reply, i try it and i come back to you
Edit :
Here is my xml file :
<?xml version="1.0" encoding="utf-8"?>
<objectSet version="1.2.3.4">
<aRoot code="testCode" reference="0123456789" description="TestDescription"
owner="Tester">
<component name="MyCompo1" type="MyCompo1Type">
<component name="MyCompo2" type="MyCompo2Type">
<property name="myProperty2-1" type="string" value="null" />
<property name="myProperty2-2" type="string" value="null" />
<property name="myProperty2-3" type="string" value="null" />
</component>
<component name="MyCompo3" type="MyCompo3Type">
<property name="myProperty3-1" type="string" value="null" />
</component>
</component>
</aRoot>
</objectSet>
I made a button with the fellowing function attached :
aTestFunction: function(oEvent){
console.log("Test");
var tree = this.byId("myTree");
var oModel = tree.getModel();
var pty = oModel.getProperty("/aRoot/MyCompo1"); // Empty; path is not good
var pty1 = oModel.getProperty("/aRoot/component");//something but only whitespaces when printing
console.log(pty);//empty
console.log(pty1);// a lot of whitespaces (9lines of different sizes)
pty1.push("node");//Error, pty1.push is not a function
oModel.setProperty("/aRoot/component",pty1);
The argument of pty1.push is not good, but the function cannot be even called.
Another try? -
11g bi publisher data model generic columns names for obiee data source?
I'm just trying to figure out if this is a bug, expected behavior or installation problem. When I select an Oracle BI Analysis to add to the data model diagram the column names are not copied over. Instead they are all renamed as Column0-ColumnNN.
Thanks
Edited by: user13087422 on Apr 7, 2011 9:49 AMI'm facing this same issue. Can you solve that? What's the problem with it?
Regards,
Ariel -
Data Model plugin for Flash Builder 4
Hello there!
I've just watched a video tut on Youtube (http://www.youtube.com/watch?v=U1aWeoTV63M) on how to work with Flash Bulder + LC Data Services and he mentions a plug-in to add this option (Data Model) to Flash Builder.
I looked around on Adobe's website and found two download links, both for Eclipse, with lots of jar files.
Sorry, I don't get it!
Please, where do I get the right plug-in file and how do I install it in Flash Builder?
Thank you!
MarcosSame here. Modeler plugin for Helios, Eclipse 3.6, Flash Builder 4.5 would be great.
-
How to add an index to a materialized view in Data Modeler 3.3
Hello everyone,
I'm looking for a how-to to add an index to a materialized view in Data Modeler 3.3.0.747, as I coudn't find a way to do it so far.
I looked here:
Relational Model
Physical Model
Oracle 11g
Materialized Views
"my_mv_name"
"INDEXES" IS NOT HERE IN THE TREE
"Tables" does not include it either
Thank you & Best regards,
BlamaHi David,
thanks a lot. I did so and it worked, but I found a minor bug while doing so:
I marked the table as "Implement as Materialized View" and went to File->Export->DDL (for Oracle 11g).
The generated code (I checked all options in "Drop Selection") includes a row:
DROP MATERIALIZED VIEW mv_mymatview CASCADE CONSTRAINTS ;
which produces a syntax error.
Best regards,
Blama -
SQL Data Modeler adds blank line to UK Constraints
Oracle SQL Developer Data Modeler Version: 2.0.0 Build: 584
I'm migrating my schema designs from Oracle Designer to SQL Developer Data Modeler. When I get to the point of generating SQL files I consistently get an extra blank line added to every unique constraint. My primary key constraints are defined the same way, but they do not have the blank line. See below for an example of the SQL output:
ALTER TABLE ALIAS
ADD CONSTRAINT ALIAS_PK PRIMARY KEY ( ALIAS_NO )
USING INDEX TABLESPACE INDEX1
NOLOGGING
NOSORT
ALTER TABLE ALIAS
ADD CONSTRAINT ALIAS_UK UNIQUE ( ALIAS_NAME )
USING INDEX TABLESPACE INDEX1
NOLOGGING
NOSORT
This blank line causes errors when I execute the SQL script so I have to edit it before using. Did I forget to something or is this a bug?
Thanks,
Gail Binkley
Stanford UniversityHi Gail,
thanks for feedback. I logged bug for that.
Philip -
Can I add more tables into existing Data Modeler
My Data Modeler has been generated by SQL Developer, it contains 68 tables. Later I would like to add more tables into my current model. Is there any way I can add more tables into my current model without creating a new one from the scratch? Thanks for your help.
KevinHi Kevin,
you can add new tables using File>Import functionality - you can import from database or DDL scripts.
Working in SQL Developer you can drag tables from SQL Dev browser and drop them on relational diagram. If Ctrl key is pressed while dropping then subordinate tables also will be added to the model.
Here you can find tutorials http://apex.oracle.com/pls/apex/f?p=44785:2:0:FORCE_QUERY::2,RIR,CIR:P2_TAGS:Data%20Modeler
Philip -
How to Transper data Model Node to Vallue Node
Hi Friends
I am getting problem in Create the Check box in Table
I am getting model node from ECC System(Zmmoa_Pending_Getlist_Input)
This is path for attributes avaliable
Zmmoa_Pending_Getlist_Input-Output-outtab
Under outtab all attributes available
My Requrement is display Check box. So I am doing like this I will care one more Vallue Node (OutTab_1) under this Vallue Node I put I have node attributes.here I careate one Check boxdatatype --Boolean(i.e Under outtab attributes)
Now I will get data from ModelNode and send that data to Vallue Node(by this node that data display in table formate.Eache Row Having Check box)
So I have to this Code But Data is Not getting in Vallunode table
in FirstView
in Submit Button
public void onActionGetData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionGetData(ServerEvent)
//$$begin ActionButton(1164287125)
//wdThis.wdGetExamp2CompController().checkSRA();
wdThis.wdGetExamp2CompController().checkBox();
wdThis.wdFirePlugToSV();
//$$end
//@@end
This is code writen in CC
public void checkBox( )
//@@begin checkBox()
//Date today = new Date(System.currentTimeMillis());
IWDMessageManager mes = wdComponentAPI.getMessageManager();
try
Zmmoa_Pending_Getlist_Input input1 = new Zmmoa_Pending_Getlist_Input();
wdContext.nodeZmmoa_Pending_Getlist_Input().bind(input1);
wdContext.currentZmmoa_Pending_Getlist_InputElement().modelObject().execute();
wdContext.nodeOuttab().invalidate();
// IPrivateExamp2Comp.IOutTab_1Element elem = wdContext.nodeOutTab_1().getOutTab_1ElementAt(i);
//mes.reportSuccess("Input:" +wdContext.nodeOuttab().size());
for (int i =0; i < wdContext.nodeOuttab().size(); i++)
//mes.reportSuccess("Input Of I:" +wdContext.nodeOutput().size());
//mes.reportSuccess("Input:" );
IPrivateExamp2Comp.IOuttabElement elem = wdContext.nodeOuttab().getOuttabElementAt(i);
//wdComponentAPI.getMessageManager().reportSuccess("elem:: "+elem);
IPrivateExamp2Comp.IOutTab_1Element result = wdContext.nodeOutTab_1().createOutTab_1Element();
//Zbapiresult result = new Zbapiresult();
result.setCheckBox(false);
result.setConf_Shp_Date(elem.getConf_Shp_Date());
wdComponentAPI.getMessageManager().reportSuccess("Conf_Shp_Date:: "+elem.getConf_Shp_Date());
result.setExpt_Shp_Date(elem.getExpt_Shp_Date());
result.setMaterial(elem.getMaterial());
result.setMatl_Desc(elem.getMatl_Desc());
result.setOa_Quantity(elem.getOa_Quantity());
result.setOpn_Quantity(elem.getOpn_Quantity());
result.setPo_Item(elem.getPo_Item());
result.setPo_Number(elem.getPo_Number());
result.setPo_Status(elem.getPo_Status());
result.setPur_Group(elem.getPur_Group());
result.setStat_Date(elem.getStat_Date());
result.setQuantity(elem.getQuantity());
wdContext.nodeOutTab_1().addElement(result);
catch(Exception e)
mes.reportException(e.getMessage(), false);
//@@end
can u help me
how to Transper data Model Node to Vallue Node. By using vallue node that data will display in table format with Check box.
I need data display in table format with Check box
Regards
Vijay KalluriHi Vijay,
TO copy values from Model Node to Value Node use the copyElements() method of the WDCopyService API. To acheive this, the name and type of the attibutes in the Value Node should be same as Model node attributes.
Example: -
Model Node <----
> Value node
---Name-String ---Name - String
---Number-Integer ---Number - Integer.
then use the following statement:
WDCopyService.copyElements(wdContext.node<ModelNode>(),wdContext.node<ValueNode>());
This will copy all the values.
Regards,
Poojith MV -
Is it possible to add support for new database type in Data Modeler?
Hi,
I see that Data Modeler v.4 supports different versions of Oracle, DB2 and MS SQL. Is it possible to add support for a new database family,
PostgreSQL for example? I hoped that RDBMS Site editor can do it, but so far I don't see any possibility to add XML files with metadata for a new RDBMS.
I did it previously for PowerDesigner were it is possible to add and modify definitions for new relational databases.
Thank you,
SergeiThere is discussion option as an out of the box feature. Check this: BI launch pad 4.0: Participate in a discussion about a document
-
How to create Decision Node in Data Flow diagram under Process Model
Hi,
I am starting a new project and would like to use Oracle Data Modeler for my data flow diagrams and logical/relational diagrams. Could you please guide me how can I ask Decision question in data flow diagram. Ideallly i would like to create a Decision Node (diamond) in Data Flow diagram under Process Model with yes or no option.
Thanks in advance
JMHi JM,
may be you are looking for other notation. There is no dedicated decision node in data flow diagramming.
Philip -
Powerview "Add this to the Data Model" checkbox is greyed out.
How can this checkbox "Add this to the Data Model" in the Import Data dialog box be made available and not greyed out?
Hi Rufino,
Data Model is a new approach for integrating data from multiple tables, effectively building a relational data source inside the Excel workbook. Within Excel, Data Models are used transparently, providing data used in PivotTables, PivotCharts, and Power
View reports. between the data sources.
In your scenario, it seems that you import data from Analysis Services database. However, this option is not available for Analysis Services database. So in you want to made this option, you can import data from relational database.
Reference:Introduction to the Data Model and Relationships in Excel 2013
Regards,
Charlie Liao
If you have any feedback on our support, please click
here
Charlie Liao
TechNet Community Support -
SQL Developer Data Modeler suggestions
Not sure where to post this (unable to connect to the blog from work due to network restrictions), hope this is the correct forum.
I am testing out the Data Modeler product. I've got a large database that I want to reverse engineer, then work with the resulting model. I used the import feature which successfully imported all 1849 tables from my schema. However, this created a diagram which wasn't really useful. A couple of things I believe would be useful.
1. Add better connectivity between the browser that shows the table listing and the diagram. When I click on a table, I'd like the corresponding element in the diagram to be highlighted (and vice-versa). Also, an option to have the diagram show that table would be useful (maybe a ctrl-click or shift-click).
2. Subviews - I don't see an easy way to add to a subview once it is created. So, add an option to the browser and diagram right-click menu to "Add to SubDiagram". Currently the diagram allows you to create a subdiagram, I didn't see an add option.
3. More keyboard shortcuts. Specifically, CTRL-Z to undo, CTRL-Y to repeat.
4. Defined column types. You've got naming rules, but I'd like to be able to define columns as a predefined type, like "Dollar Amount", which would make my column become a number(9.2) or something like that.
That's it for now - may be more to come.
DonHi,
Thanks for the feedback. Most of these are in the product:
+1. Add better connectivity between the browser that shows the table listing and the diagram. When I click on a table, I'd like the corresponding element in the diagram to be highlighted (and vice-versa). Also, an option to have the diagram show that table would be useful (maybe a ctrl-click or shift-click).+
Go to Tools > General Options: Select Diagram and check the synchronize with tree option.
+2. Subviews - I don't see an easy way to add to a subview once it is created. So, add an option to the browser and diagram right-click menu to "Add to SubDiagram". Currently the diagram allows you to create a subdiagram, I didn't see an add option.+
There are threads in the forum about subviews and you can look at the demos available online on the [Data Modeler|http://www.oracle.com/technology/products/database/datamodeler/index.html] page - we'll be adding more, but the import from Data Dictionary demo talks about subviews.
In short, select a few objects, right-click and create subview from selected, or right-click on the subview node in the browser and select new subview, and then drag the tables you want onto the new diagram.
+3. More keyboard shortcuts. Specifically, CTRL-Z to undo, CTRL-Y to repeat.+
We will be adding more shortcut keys.
+4. Defined column types. You've got naming rules, but I'd like to be able to define columns as a predefined type, like "Dollar Amount", which would make my column become a number(9.2) or something like that.+
These are Domains. Select Tools > Domains Administration, and add your domains.
I'm working on adding short demos for all these features and we'll build these up over time.
Sue -
Experiences on first usage of Oracle SQL Developer Data Modeling
Hi @ll,
working with Quest Toad Data Modeler 2.25 over a year, I'm searching for a replacement with the ability to create ALTER TABLE... statements. Today I downloaded the standalone version and tried to compare my local database against our develoment server.
Our usage scenario is that the development database can be changed by each developer. We have a trigger activated for monitoring (and logging) database changes. Currently the tested and released changes will be merged into the Toad data model manually by me.
Using the Toad model, we create DDL scripts for the SAP supported databases: Oracle, MaxDB, MS-SQL and DB2.
I'd like to facilitate this process.
h3. Test 1
1. Import the current model from the development database (User A), save it as XML
2. Import the current model from my local database (User B), save it as XML
3. Compare the XML models
h4. Results
a) each table is displayed as modified, although no difference is displayed in any column
b) in the DDL, source tables are renamed with a "bcp_" prefix
c) for NVARCHAR2, data types are changed (length from 756 to 510, 1800 to 1200)
h3. Test 2
1. Import the current model from the development database (User A), save it as XML
3. Compare the imported model with the XML
h4. Results 2
a) The field attribute "Mandatory" changed from "true" to "false"
h3. Test 3
1. Import from database
2. Compare against a XML scheme
h4. Results 3
a) Comparing shows the modified tables only - this works nearyl as expected
b) still different length for datatype NVARCHAR2
h3. Wish List
a) the Open File dialog always opens in "My Files", better would be the last opened directory
b) While starting the comparing, allow changing "source" and "target"
c) Allow comparing two database schemes
d) Support for MaxDB?
Overall, this new tool looks very promising and I'm looking forward to testing the next versions ;-)Hi Christian,
thanks for trying Oracle Data Modeling.
EAR2 is released and NVarchar2 problem is fixed there. Also are fixed some problems related to your area of interest - applying differences to database.
On your observations:
1) each table is displayed as modified, although no difference is displayed in any column - column ordering could be changed, or some of table properties - you can check this by clicking on table node and you can look at details tab for more information
2) in the DDL, source tables are renamed with a "bcp_" prefix - this is typical rename, create, copy pattern for applying changes that require restructuring of table and intermediate preserving of content. If it's not enough you can try "Advanced DDL" option which gives more control over the whole process - self controlled script with logging, restarting, execution window, error masking. You have option to unload table into file system and load it back after original table is recreated (LOB columns are not supported - we can add support if there is demand for that). Transformation function can be defined for columns with changed data type. There are few words about that in "Data Modeling overview" document (p.15) - http://www.oracle.com/technology/products/database/sql_developer/pdf/sqldeveloperdatamodelingoverview.pdf
Regards,
Philip
Edited by: Philip Stoyanov on Nov 26, 2008 1:40 PM -
i have created JTREE consisting of all the table name and columns of tables present in Database .Now upon clicking a Specific table i want to display the Structure of database table on the right side of Split pane .
Problem i am facing , i am not able to reset thetJTable data model.when i click second time to get the table structure , the Jtable is appearing under the previous one,...concatinating with the result of previous selection .
here is my code
???public class DatabaseTree implements TreeSelectionListener
static JTree tree;
static DefaultMutableTreeNode list,col,top;
static JTable table;
static DefaultTableModel default_table;
static Vector column = new Vector();
static Vector data = new Vector();
static String url = "jdbc:oracle:thin:@192.168.0.149:1521:xe";
static String user = "compiere";
static String password = "compiere";
static Connection conn;
static Statement stmt,stmt2 ;
static Statement stmt1 ;
static JSplitPane splitPane;
static JScrollPane treescroll,jtablescroll;
DatabaseTree()
top =new DefaultMutableTreeNode("Compiere Database Tables");
tree = new JTree(top);
tree.setRootVisible(true);
table = new JTable();
treescroll = new JScrollPane(tree);
jtablescroll = new JScrollPane(table,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,treescroll, jtablescroll);
splitPane.setOneTouchExpandable(true);
splitPane.setDividerLocation(200);
//Provide minimum sizes for the two components in the split pane.
Dimension minimumSize = new Dimension(100, 50);
treescroll.setMinimumSize(minimumSize);
jtablescroll.setMinimumSize(minimumSize);
////Provide a preferred size for the split pane.
splitPane.setPreferredSize(new Dimension(400, 200));
tree.addTreeSelectionListener(this);
try
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(url,user, password);
stmt = conn.createStatement();
stmt1 = conn.createStatement();
String sql =("select table_name from user_tables");
ResultSet rs=stmt.executeQuery(sql);
ResultSet rs1;
while(rs.next())
list = new DefaultMutableTreeNode(rs.getString("TABLE_NAME"));
top.add(list);
rs1=stmt1.executeQuery("Select column_name from user_tab_cols where table_name ='"+ rs.getString("TABLE_NAME")+"'");
while (rs1.next())
col= new DefaultMutableTreeNode(rs1.getString("column_name"));
list.add(col);
catch(Exception e1)
System.out.println("errors "+ e1);
public static void main(String[] args)
JFrame frame = new JFrame("Database Tree Structure");
DatabaseTree dd=new DatabaseTree();
frame.getContentPane().add(dd.getSplitPane());
frame.setSize(450,450);
frame.setVisible(true);
public JSplitPane getSplitPane() {
return splitPane;
public void valueChanged(TreeSelectionEvent e) {
// TODO Auto-generated method stub
onSelectAction(e);
private void onSelectAction(TreeSelectionEvent e) {
// TODO Auto-generated method stub
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
tree.getLastSelectedPathComponent();
/* if nothing is selected */
if (node == null) return;
System.out.println();
/* retrieve the node that was selected */
String nodeInfo = (String) node.getUserObject();
System.out.println(nodeInfo);
/* React to the node selection. */
try
Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@192.168.0.149:1521:xe";
String user = "compiere";
String password = "compiere";
conn = DriverManager.getConnection(url,user, password);
Statement stmt = conn.createStatement();
//String sql="desc '"+nodeInfo+"'";
String sql=("select column_name,data_type,nullable,data_length from user_tab_cols where table_name='"+ nodeInfo+"'");
//System.out.println("23");
ResultSet rs = stmt.executeQuery(sql);
ResultSetMetaData md = rs.getMetaData();
int columns = md.getColumnCount();
System.out.println(columns);
for (int i = 1; i <= columns; i++)
column.addElement( md.getColumnName(i) );
// System.out.println(column);
while (rs.next())
Vector row = new Vector(columns);
for (int i = 1; i <= columns; i++)
row.addElement( rs.getObject(i) );
System.out.println(row);
data.addElement( row );
rs.close();
stmt.close();
catch(Exception e1)
System.out.println( e1 );
default_table=new DefaultTableModel(data,column);
table.setModel(default_table);
}[Vector.html#clear()|http://java.sun.com/javase/6/docs/api/java/util/Vector.html#clear()]
private void onSelectAction(TreeSelectionEvent e) {
data.clear();
//... -
Data Modeler : Modifying the Table Report layout
Hi ,
I'm using SQL Data Modeler (DM) 4.0 EA .
I used the File -> reports option to generate the reports on Table and in the report
1) I couldn't see the column data type ? (Refer below table ) , Is there any options to bring on the Data Type in the Report ?
No
Column Name
PK
FK
M
Data Type
DT
kind
Domain Name
Formula
(Default Value)
Security
Abbreviation
1
ID1
P
Y
(10)
LT
2
ID2
F
Y
(10)
LT
3
ID3
Y
(1)
LT
4
ID4
Y
(10)
LT
5
ID5
F
(20,4)
LT
2) In options to manage the Table report (Reports -> Manage). Currently I can only remove a heading (like Descriptions Notes ,columns,column comments.). Is there is any way to customize the report in such a way that I can remove some columns (mostly the empty ones) from the report and add the column comments along with the column table than a new column comments table.
Please let me know ,is there is an option to customize the report .
Note: I even tried generating the report using the search then report , but it doesn't give a complete report (i was only able to generate a report on column or table name or constraints , not all together.)
Thanks,
Srinivasan.KThanks for the immediate reply.
I checked on the DM again, the report comes good for the one which has the data type . But now all my data type changed to UNKNOWN and lokks like ,due to this my table report is coming without the "Data Type".
Can you please help me in fixing this unknown data type issue ?
Table report for the ones with proper Data type:
Columns
No
Column Name
PK
FK
M
Data Type
DT
kind
Domain Name
Formula
(Default Value)
Security
Abbreviation
1
ID1
Y
NUMERIC (10)
LT
2
SCRIPT
Y
VARCHAR (1024)
LT
3
UPGRADE_S
Y
VARCHAR (10)
LT
4
UPGRADE_D
Y
VARCHAR (250)
LT
5
UPGRADING_F
Y
VARCHAR (20)
LT
6
TIMESTAMP2
Y
Timestamp
LT
Maybe you are looking for
-
i would like to no how i can get my money back as the game i am playing has not but my game piont on there
-
How convert spaces in logical model to underscores in physical model
Hi, in Oracle Designer we used spaces in logical model objects (entities, attributes, relations) which were automatically converted to underscores when the physical model was generated from the logical one. Is there any way how do this conversion in
-
Setting in Query Designer to close all the levels in hierarchy
Hi, I got a hierarchy with upto 8 Levels. In Query Designer i had a Selection Restrictions on hierarchy,I selected few nodes (each will have upto 7 level). When i execute the report the first node is expanding upto the Level 7 and other nodes are st
-
IPhoto video record quit in the middle of recording. Help!
The app quit in the middle of recording a video. I can locate the incomplete file in finder but cannot seem to get it to convert or open....help please!
-
Best cable modem & router combined?
I have the Motorola Surfboard SBG900, but was wondering if there are newer (and better) combo cable modem/wireless routers now available. Also, is cable still much faster than DSL, and, if not, are there good combined modem/routers for DSL? Thanks.