How to persist parent  and child tree node data through JSF and Hibernate

Dear dudes,
I'm a novice to JSF and Hibernate
Actually i want to create a tree structure where for each child node, i should have the parent node reference in my form and then when i save, i need to save the corresponding child node data in the database.
node-1
  node 1-1
     node 1-11a
  node 1-2
node-2
   node 2-1
   node2-2Whenever i click node 1-1 the corresponding parent node ( node-1) reference should appear in my form and when i save this data this data should be saved under parent node and the tree should be re-rendered.
How this can be accomplished and if there are any URL's please refer.

Everybody need not face the same problem you faced. And moreover, everyone out here have their own issues to solve. If people are helping out here, its cause of their passion. Please try to be polite.
First of all, what is that you have tried on the issue? Could you please share your work so that we can try to fill the gaps?

Similar Messages

  • Recursive function to find the parents of a tree node

    Hi,
    I need help to write a recursive function to get the parents of a tree node upto the root.The major problem is , each node can have more than one parent.I have two methods ; one to get the immediate parents(getParents() will return me a vector) and the other to get the parents upto the root(will also return me a vector).
    Thanks in advance,
    nanduvs

    let me risk a dumb response ..
    if there are multiple parents
    why not just follow the first parent
    back to the root
    if everything starts at one root

  • Need query to link parent and child discrete job planned through ascp

    Could you help me create a query that will show both the parent and child discrete jobs created through ascp run? I do not need entire query. I need to know the names of tables and understand the links or joins between tables. Then, I shall be able to write the sql on my own.
    Thanks

    Hi;
    Please check below thread which could be helpful for your issue:
    http://forums.oracle.com/forums/thread.jspa?messageID=9155702
    Regard
    Helios

  • Need query linking parent and child discrete jobs created through ascp planning

    Could you help me create a query that will show both the parent and child discrete jobs created through ascp run? I do not need entire query. I need to know the names of tables and understand the links or joins between tables. Then, I shall be able to write the sql on my own.
    Thanks

    Just use a format like this:
    http://<Server Name>:<port Number>/OpenDocument/opendoc/openDocument.jsp?sDocName=reportB&sType=wid&sRefresh=Y
    &lsMObjectName=[test1],[test2]
    Here in lsM[ObjectName] parameter [ObjectName] = the object name which you want to send data to ReportB
    I can give you a idea of creating hyperlink for jumping another report (Here ReportB)
    Just use  a formula like that in any cell:
    ="<a href=http://<Server Name>:<port Number>/OpenDocument/opendoc/openDocument.jsp?sDocName=reportB&sType=wid&sRefresh=Y&lsMObjectName=[test1],[test2]&sWIndow=New> Click here to view </a>
    Now from the property select Read cell content as "Hyperlink"...
    thats it......
    For more information please see the
    "OpenDocument" artile
    Hope you can  get help from this
    Edited by: Arif Arifuzzaman on Aug 20, 2009 7:24 AM

  • Display tree node data in bold characters

    Hi,
    I have a requirement where I need to display tree nodes data in bold characters. If I click on a particular tree node, next time it should appear in normal font only which means that some task had done using that tree node. Is my question clear??
    Plz help me....
    thanks,
    ravindra.

    Hi Ravindra,
    I think it is possible, i have not done it but let me explain how we can do it.
    In <htmlb:treeNode> tag there is an attribute 'text' in
    which we specify title of that treeNode.
    Now you define a page attribute 'treeNodeTitle' type
    edpline and in onCreate assign it value <html><b>MyTreeNode</b></html>
    When you click on this node then you do event handling
    in onInputProcessing, there assign only 'MyTreeNode' to
    treeNodeTitle.
    sample code may look like this...
    <htmlb:treeNode
      id = 'treeNode1'
      text = '<%=treeNodeTitle %>' >
    </htmlb:treeNode>
    Page Attribute
    treeNodeTitle type edpline
    in onCreate
    treeNodeTitle = '<html><b>MyTreeNode</b></html>'
    in onInputProcessing
    in event-handling code for that treeNode write
    treeNodeTitle = 'MyTreeNode'
    I hope this will work.
    Regards,
    Narinder Hartala

  • Why do I have a constant notification on my settings? How do I get rid of it? Looked through everything and can't see why it's there

    Why do I have a constant notification on my settings? How do I get rid of it? Looked through everything and can't see why it's there

    Restore from a backup will get you some 'other' back.
    Still not happy, Restore in iTunes, Setup as new. Sync back personal data using iTunes Tabs

  • My mobile Was stolen and i erase the data through app find my iphone but I want to Destroy the hard disk What shall i do ?

    Dear Sir,
    i bought iphone 6 plus 2 months ago from Apple store in UK.
    And it Was stolen 5 days ago in Paris and I erase the data through ( app find my iphone ).
    but I want to Destroy the hard disk What shall i do ?
    Please i need your help.
    Best regards
    Alaa Baeshen

    Dear sir,
    DO you have any idea how to get delivery report for the sent  messages ?
    Or receipt messages ?
    Thanks
    Best regards

  • HT201364 I have a macbook pro 15" 2007 version 10.6.8 and try to up date to mavericks and it's not allowing too. what should i do?

    I have a macbook pro 15" 2007 version 10.6.8 and try to up date to mavericks and it's not allowing too. what should i do?

    What does it tell you. If it says it isn't compatible, then you don't have a mid/late 2007 MBP. You might have an early 2007 MBP, which cannot run Mountain Lion or Mavericks.
    You can check here to see exactly which MBP you have: http://support.apple.com/kb/ht4132
    If you hold down the Option key and select System Profiler from the Apple Menu, it will display the model identifier under the Hardware Section.
    It must be a macbookpro3,1 or later.

  • I have an Ipad2. I wanted to pay for some accessories on a game through my brothers credit card and it wouldn't go through. And now a message pops up cannot connect to iTunes Store please contact iTune support.

    I have an Ipad2. I wanted to pay for some accessories on a game through my brothers credit card and it wouldn't go through. And now a message pops up cannot connect to iTunes Store please contact iTune support.

    You have to contact Apple Support.
    https://ssl.apple.com/emea/support/itunes/contact.html

  • How to run a form using tree node selection??

    hi...
    i have populated a tree with all the form name.There is a particular id for every form.i want to show a form using tree node selection.What i did...i write a trigger in button's click event when the tree node is selected then i get a id.if id=1 then open_form('test.fmx').when i want to execute this code then it is showing the same form 2 times.Can anyone help me to solve my problem?If so plz tell me what code i have to write to show a form using node selection?.

    I've done the same thing, and i think it works fine.
    Check this code (Sorry for the long post, but i cannot find how to attach files.
    PACKAGE menu_pk IS
    --Initialization of the menu.
    procedure Init;
    --Called from WHEN-TREE-NODE-EXPANDED
    procedure Expanded;
    --Called from WHEN-TREE-NODE-ACTIVATED
    procedure ExecuteCommand;
    END;
    PACKAGE BODY menu_pk IS
    MENU_NAME constant varchar2(30) := 'menu.menu';
    cursor c_menu(pRoot in varchar2) is
    select apm_code, apm_parcode, apm_descr, decode(apm_type, 0, Ftree.EXPANDED_NODE, Ftree.LEAF_NODE) apm_type,
    decode(apm_type, 0, 'menu', 1, 'form', 2, 'report') || '.ico' apm_icon
    from app_menu
    where apm_parcode = pRoot
    order by apm_code asc;
    procedure Init is
         new_node ftree.node;
    begin
         for i in c_menu('root')
         loop
    new_node := Ftree.add_tree_node(MENU_NAME, FTree.ROOT_NODE,
    Ftree.PARENT_OFFSET, Ftree.LAST_CHILD,
    i.apm_type, i.apm_descr, i.apm_icon, i.apm_code);
         end loop;
    end;
    procedure FillNode(pNode in FTree.Node) is
         new_node ftree.node;
    begin
         for i in c_menu(FTree.get_tree_node_property(MENU_NAME, pNode, FTree.NODE_VALUE))
         loop
    new_node := Ftree.add_tree_node(MENU_NAME, pNode,
    Ftree.PARENT_OFFSET, Ftree.LAST_CHILD,
    i.apm_type, i.apm_descr, i.apm_icon, i.apm_code);
         end loop;
    end;
    procedure DeleteNodeChilds is
    node FTree.NODE;
    begin
         loop
    node := FTree.Find_Tree_Node(MENU_NAME, '',
         FTree.FIND_NEXT_CHILD, FTree.NODE_VALUE,
         name_in('system.trigger_node'), name_in('system.trigger_node'));
              exit when Ftree.ID_NULL(node);
              FTree.delete_tree_node(MENU_NAME, node);
         end loop;
    end;
    procedure Expanded is
    begin
         if (FTree.GET_TREE_NODE_PROPERTY(MENU_NAME, :system.trigger_node, FTree.Node_State) = FTree.EXPANDED_NODE) then
         menu_pk.FillNode(name_in('system.trigger_node'));
         else
              menu_pk.DeleteNodeChilds;
         end if;
    end;
    procedure ExecuteCommand is
    cursor c_command(pCode in varchar2) is
    select apm_form, apm_type
    from app_menu
    where apm_code = pCode;
    fCommand c_command%rowtype;
    fMenuCode varchar2(20);
    begin
         -- if it is as menu node then exit.
    if (not FTree.Get_Tree_Node_Property(MENU_NAME, :system.trigger_node, FTree.NODE_STATE) = FTree.LEAF_NODE) then
         return;
    end if;
    fMenuCode := FTree.Get_Tree_Node_Property(MENU_NAME, :system.trigger_node, FTree.NODE_VALUE);
         open c_command(fMenuCode);
         fetch c_command into fCommand;
         close c_command;
         if (fCommand.apm_type = 1) and (fCommand.apm_form is not null) then
              globals.Set_MenuChoice(fMenuCode);
              OPEN_FORM(fCommand.apm_form);--, ACTIVATE, SESSION);
         end if;
    end;
    END;
    The menu table definition follows.
    create table APP_MENU
    APM_CODE VARCHAR2(10) not null,
    APM_PARCODE VARCHAR2(10) not null,
    APM_DESCR VARCHAR2(40) not null,
    APM_TYPE NUMBER(1) not null,
    APM_FORM VARCHAR2(50)
    alter table APP_MENU
    add constraint APP_MENU_PRI primary key (APM_CODE);
    Hope this helps

  • How to identify parent item & child (component) item??

    Hi
    Plz let me know how we can identify parent item & component item in the same bom?? I am checking it in table STPO but not able to identify.
    Thnx
    Neel

    Hi,
    I hope there is no such indicator to differeciate parent material and child material in same BOM.
    i will explain one simple way to find out.
    Suppose you are  having three Material Number ex P1,C1,C2 .
    Suppose ur having three Material Number ex P1,C1,C2 .
    1.Use table MAST and give the Material List - It will give Parent Material list only(P1)  
    2.Give the BOM Number to table STPO -  It will give child material list of Parent Material BOM(C1,C2) with repect to BOM
    3. Use report CS15  to find out that Parent Material (P1 Material from MAST) material is being used as component in Some other BOM.
    regards
    pradeep

  • Af:tree - how do I highlight the selected tree node?

    af:tree
    I checked the generated CSS file. I found that when a tree node is selected, the related CSS attribute is:
    .xj:link{
    font-family:Arial,Helvetica,Geneva,sans-serif;
    font-size:10pt;
    font-weight:normal;
    color:#663300
    I created a customized CSS attribute, but then all of the links have the customized CSS attributes.
    How do I just highlight the selected tree node link?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    try doing the onclick javascript method
    you have to place it on the node element and id must be made dynamic
    for this use 'this.id'
    by which the current id of the node is passed
    and by capturing the id name in a var
    use the same for invoking its selected property and make it true
    like this
    var currentid = this.id;
    this.form.currentid.selected = true;

  • How to hide default tooltip for tree nodes?

    I have an af:tree.
    When a node contains a long string, the tree automatically creates a horizontal scroll bar to accomodate it.
    But when I hover my mouse on top of the node, a tooltip is coming showing the complete text of the node.
    Because of this I cannot drag and drop this node.
    Is there anyway to hide this?

    Still can't get rid of the tooltip the layout is:
    <af:panelStretchLayout>
        <f:facet name="center">
            <af:panelSplitter>
                <f:facet name="first">
                   <af:panelAccordion>
                       <af:showDetailItem stretchChildren="first">
                           <af:tree>
                           </af:tree>
                       </af:showDetailItem>
                   </af:panelAccordion>
                </f:facet>
            </af:panelSplitter>
        </f:facet>
    </af:panelStretchlayout>Which should be pretty fine in terms of geometry management.
    If I move the splitter too much to the left the whole label can not be displayed => a tooptip pops, which prevents the node from being clicked.
    Maybe the lables have to wrap in some way instead of stay 'under' the splitter.
    Same behaviour with or without af:panelCollection wrapping the af:tree.

  • JTree and selected tree node

    I am allowing the user to search for a node in a JTree. I can find the node and progamatically expand and select the node. What I would like to do next is find the x,y coordinates of this selected node so I can use Robot to move the mouse to this node. I have hover help which is chock full of information in HTML describing this node, however, the user now is required to move the cursor to this selected node to see the hover help.
    Any help would be appreciated.

    Hi ,
    try this
    jlabel.setIcon( null ) ;

  • How can I edit the selected tree node immediately?

    I have completed a popup menu ,which appeares when I have a mouse rightclicked event
    over the selected tree node.when I selected the popup menu item,i can edit the tree node ,but
    I feel that the tree celleditor appear slowly ,what should i do? the following is my code:
    menuItemRenameNode.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    renameNode_ActionPerformed(ae);
    void renameNode_ActionPerformed(ActionEvent ae){
    setEditable(true);
    this.getCellEditor().addCellEditorListener(new CellEditorListener(){
    public void editingCanceled(ChangeEvent e){
    CellEditor cellEditor =(CellEditor)e.getSource();
    System.out.println("editing canceled:"+cellEditor.getCellEditorValue().toString());
    protected boolean canEditImmediately(EventObject e){
    return true;
    public void editingStopped(ChangeEvent e){
    CellEditor cellEditor =(CellEditor)e.getSource();
    System.out.println("editing stopped:"+cellEditor.getCellEditorValue().toString());

    Please check the suggestions in the thread: https://forums.adobe.com/thread/692020?tstart=0
    Regards,
    | T. Ravi Kumar

Maybe you are looking for

  • 220v skype home phone?

    I currently live in Europe and just ordered the 31591GE1 phone for my house.   There was mixed data on if the voltage transformer/adaptor would operate on 220V.  Now that I have received it, I can clearly read it is 110v only.  Is there a Skype cordl

  • My Mac Pro doesn't chime every time at startup

    I've heard this is not a good sign, but the kid on the phone at Apple says he can connect it to no known problem. My computer chimes at startup after a PRAM reset and never again after that. Does anyone feel comfortable or uncomfortable with this acc

  • Problem to extract data using DS 2LIS_11_VAHDR & 2LIS_11_VAITM

    Hello Experts, my requirement is to extract the SD sales Item & sales header data int BI.  while executing the Reports in BI  I find some incosistencies in data Ex:  for for some Sales organizations         0CRM_NUMDOC = 17 and the corresponding   0N

  • Please, please, please help!

    Ok. This is an ongoing problem from me. Maybe someone on here can suggest something that I may have missed. This is my setup: MSI K8N NEO4 Ultra the bios that came with the board 1.1 I think? AMD Athlon 64 3200+ MUSHkin RAM PC3200 DDR400 2x512 1 200G

  • Picture uploading in iPhone

    Is it possible to upload pictures from the pc to the iPhone's photo section? If so, how?