TreeField and child Treefield?
Hi all, quick question! A TreeField can be defined as a node/child of a parent TreeField?
If you want a system like tree inside a tree, the following code should help...
import net.rim.device.api.ui.Graphics;import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.component.TreeField;import net.rim.device.api.ui.component.TreeFieldCallback;import net.rim.device.api.ui.container.MainScreen; public class MyApp extends UiApplication { TreeCallback _myCallback; TreeField _myTree; public static void main(String[] args) { MyApp app = new MyApp(); app.enterEventDispatcher(); } public MyApp() { String fieldOne = "Main Folder2"; String fieldTwo = "Main Folder1"; String fieldThree = "SubFolder3"; String fieldFour = "SubFolder2"; String fieldFive= "SubFolder1"; _myCallback = new TreeCallback(); _myTree = new TreeField(_myCallback, TreeField.FOCUSABLE); int node1 = _myTree.addChildNode(0, fieldOne); int node2 = _myTree.addChildNode(0, fieldTwo); int node3 = _myTree.addChildNode(node1, fieldThree); int node4 = _myTree.addChildNode(node3, fieldFour); int node5 = _myTree.addChildNode(node3, fieldFive); MainScreen mainScreen = new MainScreen(); mainScreen.add(_myTree); pushScreen(mainScreen); } public static class TreeCallback implements TreeFieldCallback { public void drawTreeItem (TreeField tree, Graphics g, int node, int y, int width, int indent) { Object obj = tree.getCookie(node); if (obj instanceof String) { String text = (String)obj; g.drawText(text, indent, y); } } }}
Thank you!
Tags: BlackBerry Developers
Similar Questions
-
problem with coordinates and child index
Hi guys,.
In my application I view contacts as card according to the image, so, for example, if the user clicks "Contact 2" he should come to "communicate with 3" position and "Touch 3" should return to "Contact 2" s.
I've been swapping coordinated and child index of these sprites, but it didn't work like I wanted...
can someone suggest a better logic?
Thanks in advance
Hi guys,.
I solved it myself, silly me!
All I had to do was:
1. move the child 'index' to numChildren - 1
2. move the numChildren child - 2 to "index".
Phew!!!!!!!!!!!!!!!!
-
How is a parent and child, rights and roll determind in the script
How is a parent and child, rights and roll determind in the script as an exe of java or xml. It's first and second user and which assings these rolls? thanx
Hello
Thanks for posting your question in the Microsoft Community.
Sinc you want to determine the parent and the child rights usings script as an exe of java or xml, the question you posted would be best suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums for further assistance:
-
How to upgrade the parent table and child by updating the parent table
I have a parent EMPLOYEE table that includes columns (sysid, serviceno, employeename...) sysid is the primary key, serviceno is the Unique key and I have DEPENDENT child table includes columns (sysid, employee_sysid, name, date of birth...) there still SYSID is a primary key for the table of dependants, employee_sysid is a foreign key in the EMPLOYEE table.
Now I want to change SYSID (with the help of the sequence) in the EMPLOYEE table that they want an update in the table of people dependent
Note: I have 10000 records in the EMPLOYEE table as I have 5 more children tables that need to update new SYSID.
Please help mefirst disable FOREIGN KEY constraints.
You can update Parent and child record with the help of the trigger.
Here I give you an examlpe... It can help u.create a parent (id number primary key, name varchar2 (100)) table
/
create table child_1 (primary key id, p_id number number, date of birth, date)
CONSTRAINT FK_id FOREIGN KEY (p_id) REFERENCES parent (ID))
/
create table child_2 (key primary id, p_id2, addr varchar2 number number (1000))
CONSTRAINT FK_id2 FOREIGN KEY (p_id2) REFERENCES parent (ID))
/Insert some test data for the parent tables and children.
change the constraint to disable child_2 table FK_id2
/
change the constraint to disable child_1 table FK_id2
/CREATE OR REPLACE TRIGGER delete_child
BEFORE parent UPDATE ON
FOR EACH LINE
BEGIN
UPDATE CHILD_1
P_ID =:NEW.ID SET
WHERE P_ID =:OLD.ID;
UPDATE CHILD_2
SET = P_ID2: NEW.ID
WHERE P_ID2 =:OLD.ID;
END;
/then Upadte parent table primary key col and check the children tables.
do enable constraints... -
The professional events and child master relationship
Hi all
Consider there are two entities in a master-child relationship, is there a way to trigger the event of business such that the payload contains several details of a row for each master.
I guess that declaratively, we must publish log sales on master and child entities separately.
Is there another possible way?
Thank you
Lalit.Lalit,
Your use case makes sense to me. My personal opinion is that the docs for business events in British Colombia ADF are a little light; However, there is a paragraph that gives a hint of a glimmer of a grain of hope that can run your scenario:
To support scenarios of composition (for example, an order to buy with invoice lines), a child
entity can raise events defined on the entity relationship and events defined on the child
entity can include attributes of the parent entity. When a child entity raises an event
on a parent entity, only one event is triggered for a top-level entity given by
transaction, no matter how many times the child entity triggers the it.You have a relationship defined between your master/child entities composition?
I had not the time personally to play with log sales again, unfortunately :(
John
-
Parsing sql - cursor parent and child
Hi all
What is the parent and child when parsing sql cursor?
Thank you
JohnWell, as Anand mentioned you could yourself. Here's a demo of the workaround based. Based on the change of environment, the sliders would be created and will not be shared that I made using the change of parameter of optimizer_mode. This is done in 11201 with the setting optimizer_features_enable on 10201.
SQL> drop table t purge; Table dropped. SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%'; SQL_TEXT -------------------------------------------------------------------------------- select * from t SQL> alter system flush shared_pool; System altered. SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%'; no rows selected SQL> save a Created file a.sql SQL> select * from t; select * from t * ERROR at line 1: ORA-00942: table or view does not exist SQL> create table t(a char); Table created. SQL> select * from t; no rows selected SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%'; SQL_TEXT -------------------------------------------------------------------------------- select * from t SQL> select * from T; no rows selected SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%'; SQL_TEXT -------------------------------------------------------------------------------- select * from t SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%'; SQL_TEXT -------------------------------------------------------------------------------- select * from t select * from T SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%'; SQL_TEXT -------------------------------------------------------------------------------- VERSION_COUNT EXECUTIONS ------------- ---------- select * from t 1 1 select * from T 1 1 SQL> column sql_text format a40 SQL> / SQL_TEXT VERSION_COUNT EXECUTIONS ---------------------------------------- ------------- ---------- select * from t 1 1 select * from T 1 1 SQL> select * from T; no rows selected SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%'; SQL_TEXT ---------------------------------------- select * from t select * from T SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%'; SQL_TEXT VERSION_COUNT EXECUTIONS ---------------------------------------- ------------- ---------- select * from t 1 1 select * from T 1 2 SQL> alter session set optimizer_mode=first_rows; Session altered. SQL> select * from T; no rows selected SQL> select * from t; no rows selected SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%'; SQL_TEXT VERSION_COUNT EXECUTIONS ---------------------------------------- ------------- ---------- select * from t 1 1 select * from test_sharing where id=:a 1 3 select * from test_sharing where id=1 1 0 select * from test_sharing where id=99 1 0 select * from T 2 3 SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro SQL_TEXT CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE ---------------------------------------- ------------ ---------- --------------- select * from t 0 FIRST_ROWS 1601196873 select * from test_sharing where id=:a 0 ALL_ROWS 3492249339 select * from test_sharing where id=1 0 ALL_ROWS 3492249339 select * from test_sharing where id=99 0 ALL_ROWS 2354865636 select * from T 0 ALL_ROWS 1601196873 select * from T 1 FIRST_ROWS 1601196873 6 rows selected. SQL> alter session set optimizer_mode=first_rows_1; Session altered. SQL> select * from t; no rows selected SQL> select * from T; no rows selected SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro SQL_TEXT CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE ---------------------------------------- ------------ ---------- --------------- select * from t 0 FIRST_ROWS 1601196873 select * from test_sharing where id=:a 0 ALL_ROWS 3492249339 select * from test_sharing where id=1 0 ALL_ROWS 3492249339 select * from test_sharing where id=99 0 ALL_ROWS 2354865636 select * from T 0 ALL_ROWS 1601196873 select * from T 1 FIRST_ROWS 1601196873 6 rows selected. SQL> alter session set sql_trace=true; Session altered. SQL> alter session set optimizer_mode=first_rows_1; Session altered. SQL> select * from t; no rows selected SQL> select * from T; no rows selected SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%'; SQL_TEXT VERSION_COUNT EXECUTIONS ---------------------------------------- ------------- ---------- select * from t 2 3 select * from test_sharing where id=:a 1 3 select * from test_sharing where id=1 1 0 select * from test_sharing where id=99 1 0 select * from T 3 5 SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro SQL_TEXT CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE ---------------------------------------- ------------ ---------- --------------- select * from t 0 FIRST_ROWS 1601196873 select * from t 1 FIRST_ROWS 1601196873 select * from test_sharing where id=:a 0 ALL_ROWS 3492249339 select * from test_sharing where id=1 0 ALL_ROWS 3492249339 select * from test_sharing where id=99 0 ALL_ROWS 2354865636 select * from T 0 ALL_ROWS 1601196873 select * from T 1 FIRST_ROWS 1601196873 select * from T 2 FIRST_ROWS 1601196873 8 rows selected. SQL> select sql_id,sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'selec SQL_ID SQL_TEXT CHILD_NUMBER OPTIMIZER_ ------------- ---------------------------------------- ------------ ---------- PLAN_HASH_VALUE --------------- 89km4qj1thh13 select * from t 0 FIRST_ROWS 1601196873 89km4qj1thh13 select * from t 1 FIRST_ROWS 1601196873 7gbgb5nzcdcf3 select * from test_sharing where id=:a 0 ALL_ROWS 3492249339 SQL_ID SQL_TEXT CHILD_NUMBER OPTIMIZER_ ------------- ---------------------------------------- ------------ ---------- PLAN_HASH_VALUE --------------- 0890tcnrf5jsv select * from test_sharing where id=1 0 ALL_ROWS 3492249339 7hg3cujy0ya0r select * from test_sharing where id=99 0 ALL_ROWS 2354865636 ahgbnyrbh7bp1 select * from T 0 ALL_ROWS 1601196873 SQL_ID SQL_TEXT CHILD_NUMBER OPTIMIZER_ ------------- ---------------------------------------- ------------ ---------- PLAN_HASH_VALUE --------------- ahgbnyrbh7bp1 select * from T 1 FIRST_ROWS 1601196873 ahgbnyrbh7bp1 select * from T 2 FIRST_ROWS 1601196873 8 rows selected. SQL> set pagesize 9999 SQL> / SQL_ID SQL_TEXT CHILD_NUMBER OPTIMIZER_ ------------- ---------------------------------------- ------------ ---------- PLAN_HASH_VALUE --------------- 89km4qj1thh13 select * from t 0 FIRST_ROWS 1601196873 89km4qj1thh13 select * from t 1 FIRST_ROWS 1601196873 7gbgb5nzcdcf3 select * from test_sharing where id=:a 0 ALL_ROWS 3492249339 0890tcnrf5jsv select * from test_sharing where id=1 0 ALL_ROWS 3492249339 7hg3cujy0ya0r select * from test_sharing where id=99 0 ALL_ROWS 2354865636 ahgbnyrbh7bp1 select * from T 0 ALL_ROWS 1601196873 ahgbnyrbh7bp1 select * from T 1 FIRST_ROWS 1601196873 ahgbnyrbh7bp1 select * from T 2 FIRST_ROWS 1601196873 8 rows selected. SQL> set linesize 200 SQL> / SQL_ID SQL_TEXT CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE ------------- ---------------------------------------- ------------ ---------- --------------- 89km4qj1thh13 select * from t 0 FIRST_ROWS 1601196873 89km4qj1thh13 select * from t 1 FIRST_ROWS 1601196873 7gbgb5nzcdcf3 select * from test_sharing where id=:a 0 ALL_ROWS 3492249339 0890tcnrf5jsv select * from test_sharing where id=1 0 ALL_ROWS 3492249339 7hg3cujy0ya0r select * from test_sharing where id=99 0 ALL_ROWS 2354865636 ahgbnyrbh7bp1 select * from T 0 ALL_ROWS 1601196873 ahgbnyrbh7bp1 select * from T 1 FIRST_ROWS 1601196873 ahgbnyrbh7bp1 select * from T 2 FIRST_ROWS 1601196873 8 rows selected. SQL> select child_number, child_address, stats_row_mismatch, optimizer_mode_mismatch 2 from v$sql_shared_cursor where sql_id='ahgbnyrbh7bp1'; CHILD_NUMBER CHILD_AD S O ------------ -------- - - 0 1A610050 N N 1 1F148DA4 N Y 2 1A630C90 Y N SQL>
You can see an inconsistency in the optimizer_mode resulting in another creation of child cursor. You can try to use the parameter cursor_sharing similar value and bind variables that would also cause child several sliders to create. For the view V$ sql_shared_cursor, check the docs.
HTH
Aman...PS: Please don't bump up to the thread. This is not support so people are not forced to update immediately. All are volunteers so assume that they would update the thread as and when they have / get time to do.
-
Cursors for parent and child, bind variable and library cache
I was going through the documentation to understand the difference between the parent and the child cursors. Surprisingly, there's not too much help for this. I was able to collect the following information about this
For each statement SQL cache library contains a cursor "parent" for the text of the SQL statement. The parent cursor is composed of a "handle" that can be searched by the hash value via the library cache hash table and an «object' which contains pointers to each of its «child» cursors Each cursor of the child is also composed of a handle and an object. The child object is composed of two segments numbered from 0 to 6. Lot 0 contains all the credentials for a particular version of the SQL statement and lot 6 contains the execution plan. This distinction between parent and child cursors is maintained even when there is only one version of each SQL statement.
Lets say that 2 LMD were fired with the same set of variables bind (names of variables were same but differed from the value.) The only difference between the 2 LMD was the value of the variable binding) and under the same conditions of load.
These DML 2 would be a sliders 2 children of one parent only cursors.
Please tell me detailed documentation on the subject, so my question is too elementary
Kind regards
VishalI'm not sure how useful jumping in stuff like bunch 0 and 6 bunch is in terms of understanding what is a parent and what is a child cursor.
This quote seems to come from Steve Adams - http://www.ixora.com.au/q+a/0104/19005414.htm
It's a good idea to cite your references.I'll give it a go.
A cursor is a lot of information stored in memory on a SQL statement.
The basic information for a parent cursor is the text of the SQL statement - exact matches of the statement can only share the parent cursor.
The cursor of the child is really on the implementation plan specific for a statement and the different settings and parameters that caused this plan to be generated.
There are a whole bunch of reasons why the executions of the same SQL statement may or may not reuse the existing child cursors.
In your example 2 statements that differ by the variable binding are likely to lead to different children, although there are factors that can lead to lie different values, do not share the same children among whom for example, the length of the dregs, Adaptive setting cursor_sharing = similar and histograms, or new features like cursor sharing (on subsequent runs of renowned sql running suboptimal initially).
It might be useful to see V$ SQL_SHARED_CURSOR. This shows the disparities that cause children to not be shared. There are more than 60 columns in this view which gives an indication of the number of factors that can influence.
http://download.Oracle.com/docs/CD/E11882_01/server.112/e17110/dynviews_3059.htm#REFRN30254You might want to look here the criteria for sharing SQL:
http://download.Oracle.com/docs/CD/E11882_01/server.112/e16638/memory.htm#i40017Away from the main documentation, perhaps some of the writings of the optimizer Development Group could help?
http://blogs.Oracle.com/mt/mt-search.cgi?blog_id=3361&tag=cursor%20sharing&limit=20Christian Antognini described this area very well in the "Oracle Performance Troubleshooting Guide".
Published by: Dom Brooks on February 24, 2011 16:45
-
How to separate af:train Train of Parent and child Train
Dear experts,
I need to create a form wizard with train and train the child parent. The request is to make parents to train the train left and a child in the middle. The train of the child in the course of parent is hidden.
Do you have any suggestions?
The example that I built.
The requirement.
Kind regards
Ricky
Hello
Also check link below. I try to apply it. I think it's possible. I will update. Update your version of Jdevloper.
Thank you
Amey
-
Question packets parent and child
Hello
Greetings!
I have a Parent package and a child package that have around 20 packs inside.
When I run the parent package and a child, the parent package runs in a few seconds, but the 20 jobs in child packages takes 1 hour of time to execute.
In operator, it is the final parent package watch while the child packages takes time to complete. Have first child packages must complete and Parent packets after that.
No idea why this happening.we also by controlling refreshing but his does not work.
Thank you
Lony
If you call asynchronously a child/scenario package then it will return control to its parent immediately, what is the nature of asynchronous operations and you to have several processes running in parallel. If you don't want the Parent to complete its execution until all her children are processing you have 2 options:
(1) not to call asynchronously the child, if you do not have many children parallel execution is the usual approach
(2) However, if you have several children, parallel execution, make use of the odiwaitforchildsesion tool. You use once at the beginning of the sequence run in parallel and once at the end and this will ensure that your parent package will wait for all asynchronous operations to complete before continue. This link gives a good overview of how to implement asynchronous - parallel execution - ODIExperts.com
-
Parent and child Tabs - reactive theme blue 25
Hello
I am trying to consolidate some tabs in a TAB of the Parent, but may not know how to do this.
This is the game of the tab that I currently have, but I plugged and category fall under the company.
Please someone can help me achieve this goal. I tried to add a new TAB Parent game, but I can't seem to link the tabs of the child to the Parent new I create.
A little confused with the installation of these tabs...
Thanks in advance
Maguzzi wrote:
I am trying to consolidate some tabs in a TAB of the Parent, but may not know how to do this.
This is the game of the tab that I currently have, but I plugged and category fall under the company.
Please someone can help me achieve this goal. I tried to add a new TAB Parent game, but I can't seem to link the tabs of the child to the Parent new I create.
A little confused with the installation of these tabs...
You and everyone else. Tabs are not the best feature of the APEX, and I feel are fairly close to obsolescence in APEX 5.0...
You want to do is add tabs as descendants of the standard tabs, which is not possible. To achieve the branch and the tabs under the company category, you must convert all of the existing tabs to a parent tab set and add the standard tab sets for each parent tab. I don't think that's actually what you want or require, that looks more like a listof hierarchical. Suggest you only replace using the tabs with a list by using the Pull Down Menu of navigation list template.
-
Hello
Oracle version: Oracle Database 11 g Release 11.1.0.7.0 - 64 bit Production
The version of SQL Developer: 4.0.2.15 - 15.21 build
I have a question about drawing diagram, entity-relationship with SQL Developer & I would be grateful if you could kindly give me a helping hand.
I would like to draw an entity-relationship diagram in order to better visualize the relationship between multiple tables. After a google search, I found the following interesting article indicating the procedure to be followed:
http://www.Oracle.com/technetwork/issue-archive/2014/14-may/o34sqldev-2193423.html
(What I need and I'm trying to produce is Figure 4 in the article above)
I made exactly as stated in the article & apparently everything has worked well enough, in other words, I had several UML as rectangles showing columns of tables, their data types, primary and
foreign key and the arrows indicating the link between each parent/child table.Later, I tried to do the same thing on a different oracle instance and a different database by using the same procedure. Yet, something strange happened this time. Developer SQL printed on-screen tables, once again,.
inside the rectangles with types, keys,... but, there was no arrow showing the link between the tables, I just saw on the grid the selected tables but without any association/relationship shown (as a symbol of an arrow)
between them.I repeated the procedure on another instance of development, with a few test tables that I created with primary and foreign keys just to make sure I had followed the procedure correctly. Once again
the test was successful, but when I repeated the test on another instance, the same problem persisted, in other words, no arrow (relationship) between tables.
Any idea?
This could be due to a lack of privilege on the instance? If Yes, what should be granted in what about roles?
Thanks in advance
I think that what you see is that not all databases have foreign keys - applications hard-coding relationships vs let the database to handle this.
Connect to this instance different oracle and browse the tables affected - have FK constraints defined on them?
-
Parent and child pages in outline view
Is it possible to connect 2 pages of parent in the same page of the child when the implementation of a sitemap in outline view?
Although we can't demonstrate visually, what can be done, technically.
Creating the navigation menu by manually changing the elements and links.
-
Problems with the Parent and child Pages...
I created a parent page with several pages of the child, but when I transferred to my host FTP pages do not come to the top in the hierarchy in the URL bar. I want it to be "www.website.com/parent/child.html" but they come as 'www.website.com/child.html '.
How can I change this? I thought that by creating a page parent to the child which would automatically when loading pages. Help, please!
Thank you!!!
Muse currently publishes all the pages in the root directory of the Web server. It does not create a folder structure based on the structure of the site defined in Plan view. The structure of the site defined in the Plan view is used by the Widget Menu to generate Menus correspondents and submenu entries.
Hope that specified in the query.
See you soon,.
Vikas
-
OIM10G create demand through data API and child form filling
Hello.
I ve seen a lot of examples showing how to create a request using tcrequestoperationsintf, but does not show a how to add child form data. my request to object has two forms of childhood and Don t know how to add data to these forms of the child.
Any idea o URL?
Thank you.Here are the links to the forum only
Application creation
https://CN.forums.Oracle.com/forums/thread.jspa?threadID=930774
https://KR.forums.Oracle.com/forums/thread.jspa?threadID=886783 -
How to delete records parent and child together?
Hello
I use Jdeveloper 11.1.2.2
I want to delete a row in a table, but it is to show:
So, how can I remove a child line and the line of the table in a method?Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (TABLE1_TL_FK1) violated - child record found.
I can't access the child VO because it is not added to the AM.
Thank you
Nigel.http://docs.Oracle.com/CD/E26098_01/Web.1112/e16182/bcentities.htm#BABHFJFJ
Maybe you are looking for
-
Turn on iPhone 5 s for the first time?
Hello I just bought all new iPhone 5 S in a shop and after I searched (google) answers with regard to the maintenance of the battery, I'm a bit confused. Some say it is wise to drain the battery until the phone turns off and that completely... some p
-
help me to recover my security qustions
Hello I can't access my apple account becuse I can't remmber my qustions security answers Please help me my email: *. < personal information under the direction of the host >
-
We have a new HP Pavilion running Windows Home 10. In the night, turn it off, but in the morning, when we reboot the system, we now hear a series of beeps... something like 3 superior high-pitched beeps followed 4 lower signals. It cycles again and
-
Where can I find instructions on the use of Print Smart
-
I need to uninstall the trial version for 30 days of McAfee that came pre-installed with this PC I bought in January. I know it was preinstalled, but I can't find Ant real program/app. Secunia PSI or Revo Uninstaller shows McAfee, but when I search T