Add/Edit/Delete Tree Nodes using CL_GUI_ALV_TREE

Hi All,
I am looking for an example of program with CL_GUI_ALV_TREE that have a functionality of add a tree node, edit a tree node, and delete a tree node.
I have already looked the BCALV_TREE* demo program but could not able to find a program to add/edit/delete node tree elements.
Any info on this.
Thanks
aRs

Hello aRs
Here is a sample report showing how to delete nodes in an ALV tree. The report was copied from BCALV_TREE_01. Search for added code:
*$ADDED: begin
*$ADDED: end[/code]
When you display the tree expand the first folder completely. When entering 'DELETE' into the command field directly the first flight date node will be deleted.
REPORT ZUS_SDN_BCALV_TREE_01_DELNODE.
based on: REPORT  bcalv_tree_01.
Purpose:
~~~~~~~~
This report shows the essential steps to build up a hierarchy
using an ALV Tree Control (class CL_GUI_ALV_TREE).
Note that it is not possible to build up this hierarchy
using a simple ALV Tree Control (class CL_GUI_ALV_TREE_SIMPLE).
To check program behavior
~~~~~~~~~~~~~~~~~~~~~~~~~
Start this report. The hierarchy tree consists of nodes for each
month on top level (this level can not be build by a simple ALV Tree
because there is no field for months in our output table SFLIGHT.
Thus, you can not define this hierarchy by sorting).
Nor initial calculations neither a special layout has been applied
(the lines on the right do not show anything).
Note also that this example does not build up and change the
fieldcatalog of the output table. For this reason, all fields
of the output table are shown in the columns although the fields
CARRID and FLDATE are already placed in the tree on the left.
(Of course, this is not a good style. See BCALV_TREE_02 on how to
hide columns).
Essential steps (Search for '§')
~~~~~~~~~~~~~~~
1.Usual steps when using control technology.
   1a. Define reference variables.
   1b. Create ALV Tree Control and corresponding container.
2.Create Hierarchy-header
3.Create empty Tree Control
4.Create hierarchy (nodes and leaves)
   4a. Select data
   4b. Sort output table according to your conceived hierarchy
   4c. Add data to tree
5.Send data to frontend.
6.Call dispatch to process toolbar functions
*$ADDED: begin
DATA:
  gd_del_nkey      TYPE lvc_nkey.
*$ADDED: end
§1a. Define reference variables
DATA: g_alv_tree         TYPE REF TO cl_gui_alv_tree,
      g_custom_container TYPE REF TO cl_gui_custom_container.
DATA: gt_sflight      TYPE sflight OCCURS 0,      "Output-Table
      ok_code LIKE sy-ucomm,
      save_ok LIKE sy-ucomm,           "OK-Code
      g_max TYPE i VALUE 255.
END-OF-SELECTION.
  CALL SCREEN 100.
*&      Module  PBO  OUTPUT
      process before output
MODULE pbo OUTPUT.
  SET PF-STATUS 'MAIN100'.
  SET TITLEBAR 'MAINTITLE'.
  IF g_alv_tree IS INITIAL.
    PERFORM init_tree.
    CALL METHOD cl_gui_cfw=>flush
      EXCEPTIONS
        cntl_system_error = 1
        cntl_error        = 2.
    IF sy-subrc NE 0.
      CALL FUNCTION 'POPUP_TO_INFORM'
        EXPORTING
          titel = 'Automation Queue failure'(801)
          txt1  = 'Internal error:'(802)
          txt2  = 'A method in the automation queue'(803)
          txt3  = 'caused a failure.'(804).
    ENDIF.
  ENDIF.
ENDMODULE.                             " PBO  OUTPUT
*&      Module  PAI  INPUT
      process after input
MODULE pai INPUT.
  save_ok = ok_code.
  CLEAR ok_code.
  CASE save_ok.
    WHEN 'EXIT' OR 'BACK' OR 'CANC'.
      PERFORM exit_program.
*$ADDED: begin
    WHEN 'DELETE'.
      CALL METHOD g_alv_tree->delete_subtree
        EXPORTING
          i_node_key                = gd_del_nkey
         I_UPDATE_PARENTS_EXPANDER = SPACE
          i_update_parents_folder   = 'X'
        EXCEPTIONS
          node_key_not_in_model     = 1
          OTHERS                    = 2.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL METHOD g_alv_tree->frontend_update.
*$ADDED: end
    WHEN OTHERS.
§6. Call dispatch to process toolbar functions
      CALL METHOD cl_gui_cfw=>dispatch.
  ENDCASE.
  CALL METHOD cl_gui_cfw=>flush.
ENDMODULE.                             " PAI  INPUT
*&      Form  init_tree
      text
-->  p1        text
<--  p2        text
FORM init_tree.
§1b. Create ALV Tree Control and corresponding Container.
create container for alv-tree
  DATA: l_tree_container_name(30) TYPE c.
  l_tree_container_name = 'CCONTAINER1'.
  CREATE OBJECT g_custom_container
     EXPORTING
           container_name = l_tree_container_name
     EXCEPTIONS
           cntl_error                  = 1
           cntl_system_error           = 2
           create_error                = 3
           lifetime_error              = 4
           lifetime_dynpro_dynpro_link = 5.
  IF sy-subrc <> 0.
    MESSAGE x208(00) WITH 'ERROR'(100).
  ENDIF.
create tree control
  CREATE OBJECT g_alv_tree
    EXPORTING
        parent              = g_custom_container
        node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
        item_selection      = 'X'
        no_html_header      = 'X'
        no_toolbar          = ''
    EXCEPTIONS
        cntl_error                   = 1
        cntl_system_error            = 2
        create_error                 = 3
        lifetime_error               = 4
        illegal_node_selection_mode  = 5
        failed                       = 6
        illegal_column_name          = 7.
  IF sy-subrc <> 0.
    MESSAGE x208(00) WITH 'ERROR'.                          "#EC NOTEXT
  ENDIF.
§2. Create Hierarchy-header
The simple ALV Tree uses the text of the fields which were used
for sorting to define this header. When you use
the 'normal' ALV Tree the hierarchy is build up freely
by the programmer this is not possible, so he has to define it
himself.
  DATA l_hierarchy_header TYPE treev_hhdr.
  PERFORM build_hierarchy_header CHANGING l_hierarchy_header.
§3. Create empty Tree Control
IMPORTANT: Table 'gt_sflight' must be empty. Do not change this table
(even after this method call). You can change data of your table
by calling methods of CL_GUI_ALV_TREE.
Furthermore, the output table 'gt_outtab' must be global and can
only be used for one ALV Tree Control.
  CALL METHOD g_alv_tree->set_table_for_first_display
    EXPORTING
      i_structure_name    = 'SFLIGHT'
      is_hierarchy_header = l_hierarchy_header
    CHANGING
      it_outtab           = gt_sflight. "table must be empty !
§4. Create hierarchy (nodes and leaves)
  PERFORM create_hierarchy.
§5. Send data to frontend.
  CALL METHOD g_alv_tree->frontend_update.
wait for automatic flush at end of pbo
ENDFORM.                               " init_tree
*&      Form  build_hierarchy_header
      build hierarchy-header-information
     -->P_L_HIERARCHY_HEADER  strucxture for hierarchy-header
FORM build_hierarchy_header CHANGING
                               p_hierarchy_header TYPE treev_hhdr.
  p_hierarchy_header-heading = 'Month/Carrier/Date'(300).
  p_hierarchy_header-tooltip = 'Flights in a month'(400).
  p_hierarchy_header-width = 30.
  p_hierarchy_header-width_pix = ' '.
ENDFORM.                               " build_hierarchy_header
*&      Form  exit_program
      free object and leave program
FORM exit_program.
  CALL METHOD g_custom_container->free.
  LEAVE PROGRAM.
ENDFORM.                               " exit_program
*&      Form  create_hierarchy
      text
-->  p1        text
<--  p2        text
FORM create_hierarchy.
  DATA: ls_sflight TYPE sflight,
        lt_sflight TYPE sflight OCCURS 0,
        l_yyyymm(6) TYPE c,            "year and month of sflight-fldate
        l_yyyymm_last(6) TYPE c,
        l_carrid LIKE sflight-carrid,
        l_carrid_last LIKE sflight-carrid.
  DATA: l_month_key TYPE lvc_nkey,
        l_carrid_key TYPE lvc_nkey,
        l_last_key TYPE lvc_nkey.
§4a. Select data
  SELECT * FROM sflight INTO TABLE lt_sflight UP TO g_max ROWS.
§4b. Sort output table according to your conceived hierarchy
We sort in this order:
   year and month (top level nodes, yyyymm of DATS)
     carrier id (next level)
        day of month (leaves, dd of DATS)
  SORT lt_sflight BY fldate0(6) carrid fldate6(2).
Note: The top level nodes do not correspond to a field of the
output table. Instead we use data of the table to invent another
hierarchy level above the levels that can be build by sorting.
§4c. Add data to tree
  LOOP AT lt_sflight INTO ls_sflight.
Prerequesite: The table is sorted.
You add a node everytime the values of a sorted field changes.
Finally, the complete line is added as a leaf below the last
node.
    l_yyyymm = ls_sflight-fldate+0(6).
    l_carrid = ls_sflight-carrid.
Top level nodes:
    IF l_yyyymm <> l_yyyymm_last.      "on change of l_yyyymm
      l_yyyymm_last = l_yyyymm.
*Providing no key means that the node is added on top level:
      PERFORM add_month USING    l_yyyymm
                             CHANGING l_month_key.
The month changed, thus, there is no predecessor carrier
      CLEAR l_carrid_last.
    ENDIF.
Carrier nodes:
(always inserted as child of the last month
which is identified by 'l_month_key')
    IF l_carrid <> l_carrid_last.      "on change of l_carrid
      l_carrid_last = l_carrid.
      PERFORM add_carrid_line USING    ls_sflight
                                       l_month_key
                              CHANGING l_carrid_key.
    ENDIF.
Leaf:
(always inserted as child of the last carrier
which is identified by 'l_carrid_key')
    PERFORM add_complete_line USING  ls_sflight
                                     l_carrid_key
                            CHANGING l_last_key.
  ENDLOOP.
ENDFORM.                               " create_hierarchy
*&      Form  add_month
FORM add_month  USING     p_yyyymm TYPE c
                          p_relat_key TYPE lvc_nkey
                CHANGING  p_node_key TYPE lvc_nkey.
  DATA: l_node_text TYPE lvc_value,
        ls_sflight TYPE sflight,
        l_month(15) TYPE c.            "output string for month
get month name for node text
  PERFORM get_month USING p_yyyymm
                    CHANGING l_month.
  l_node_text = l_month.
add node:
ALV Tree firstly inserts this node as a leaf if you do not provide
IS_NODE_LAYOUT with field ISFOLDER set. In form 'add_carrid_line'
the leaf gets a child and thus ALV converts it to a folder
automatically.
  CALL METHOD g_alv_tree->add_node
    EXPORTING
      i_relat_node_key = p_relat_key
      i_relationship   = cl_gui_column_tree=>relat_last_child
      i_node_text      = l_node_text
      is_outtab_line   = ls_sflight
    IMPORTING
      e_new_node_key   = p_node_key.
ENDFORM.                               " add_month
FORM add_carrid_line USING     ps_sflight TYPE sflight
                               p_relat_key TYPE lvc_nkey
                     CHANGING  p_node_key TYPE lvc_nkey.
  DATA: l_node_text TYPE lvc_value,
        ls_sflight TYPE sflight.
add node
ALV Tree firstly inserts this node as a leaf if you do not provide
IS_NODE_LAYOUT with field ISFOLDER set. In form 'add_carrid_line'
the leaf gets a child and thus ALV converts it to a folder
automatically.
  l_node_text =  ps_sflight-carrid.
  CALL METHOD g_alv_tree->add_node
    EXPORTING
      i_relat_node_key = p_relat_key
      i_relationship   = cl_gui_column_tree=>relat_last_child
      i_node_text      = l_node_text
      is_outtab_line   = ls_sflight
    IMPORTING
      e_new_node_key   = p_node_key.
ENDFORM.                               " add_carrid_line
*&      Form  add_complete_line
FORM add_complete_line USING   ps_sflight TYPE sflight
                               p_relat_key TYPE lvc_nkey
                     CHANGING  p_node_key TYPE lvc_nkey.
  DATA: l_node_text TYPE lvc_value.
  WRITE ps_sflight-fldate TO l_node_text MM/DD/YYYY.
add leaf:
ALV Tree firstly inserts this node as a leaf if you do not provide
IS_NODE_LAYOUT with field ISFOLDER set.
Since these nodes will never get children they stay leaves
(as intended).
  CALL METHOD g_alv_tree->add_node
    EXPORTING
      i_relat_node_key = p_relat_key
      i_relationship   = cl_gui_column_tree=>relat_last_child
      is_outtab_line   = ps_sflight
      i_node_text      = l_node_text
    IMPORTING
      e_new_node_key   = p_node_key.
*$ADDED: begin
  IF ( ps_sflight-fldate = '20040522' ).  " first flight date
    IF ( gd_del_nkey IS INITIAL ).  " collect only first date
      gd_del_nkey = p_node_key.
    ENDIF.
  ENDIF.
*$ADDED: end
ENDFORM.                               " add_complete_line
*&      Form  GET_MONTH
      text
     -->P_P_YYYYMM  text
     <--P_L_MONTH  text
FORM get_month USING    p_yyyymm
               CHANGING p_month.
Returns the name of month according to the digits in p_yyyymm
  DATA: l_monthdigits(2) TYPE c.
  l_monthdigits = p_yyyymm+4(2).
  CASE l_monthdigits.
    WHEN '01'.
      p_month = 'January'(701).
    WHEN '02'.
      p_month = 'February'(702).
    WHEN '03'.
      p_month = 'March'(703).
    WHEN '04'.
      p_month = 'April'(704).
    WHEN '05'.
      p_month = 'May'(705).
    WHEN '06'.
      p_month = 'June'(706).
    WHEN '07'.
      p_month = 'July'(707).
    WHEN '08'.
      p_month = 'August'(708).
    WHEN '09'.
      p_month = 'September'(709).
    WHEN '10'.
      p_month = 'October'(710).
    WHEN '11'.
      p_month = 'November'(711).
    WHEN '12'.
      p_month = 'December'(712).
  ENDCASE.
  CONCATENATE p_yyyymm+0(4) '->' p_month INTO p_month.
ENDFORM.                               " GET_MONTH
/code
Regards
  Uwe

Similar Messages

  • Editable field in alv tree output using cl_gui_alv_tree

    Hi,
    i need Editable field with F4 help in alv tree output using cl_gui_alv_tree.
    regards,
    Naresh

    sadly, this is not possible. An ALV Tree cannot by editable.
    Regards

  • Editable field with F4 help in alv tree output using cl_gui_alv_tree

    HI
    i need Editable field with F4 help in alv tree output using cl_gui_alv_tree
    Regards
    Naresh

    Hi Naresh,
    Pass the field catalog with the additional parameter (ls_fcat-edit = 'X'.).
    for F4 help if the data element have the search help it automatically will come. other wise include the additional parameter in the field catalog (ls_fcat-F4AVAILABL = 'X')
    Reward if found helpful.
    Regards,
    Boobalan Suburaj

  • Content retrieved through RIDC after add/edit/delete is not updated

    Hi
    There is a functionality such that a user is shown the content details like folder name and content under the folder name to be displayed on the portal.
    Basically, the metadata of the folder and content need to be displayed and add/edit/delete operations need to be available for the user.
    So any updates performed on the UCM content from the portal need to be updated on the UCM.
    To enable this functionality made use of the RIDC API. Everything as to content display, add/edit/delete operations are all working fine and getting updated on the UCM front also.
    But the issue is that after these operations being performed the user needs to be displayed updated content information on the portal. But while trying to retrieve the results using SEARCH RIDC Service, results are fetching the old data and hence the content information displayed on the page is also stale.
    While trying to hit the URL again i.e. a new request then the updated contents get dispalyed.
    Can anybody tell me what could be the issue? I am unable to understand the issue.
    All this has been done using taskflows.
    Thanks

    Hi ,
    Most probably the content is not indexed in the interval when it is updated and then retrieved with search call . As a test , recreate the issue and then open UCM Web UI - Content Information (of the content updated / searched ) - check the Status value for the latest revision .
    Most likely it will be in Done status (if no conversion is being used) .
    Second time when you the actual correct data shows up then check the Status and there it would be in Released status .
    I believe that you are trying to search / display the content even before the new version is indexed and made available for search .
    Thanks
    Srinath

  • ICal 4.0 and Snow Leopard: can't add / edit / delete events + workaround

    Hi,
    iCal 4.0 under 10.6.1, any changes I made in iCal was reversed when I quit and reopened iCal. Plus my changes didn't sync to my iPod.
    When looking at the Console.app, I saw:
    2009/09/15 13:31:51 iCal[11918] save failed: Error Domain=CalCalendarStorePersistenceErrorDomain Code=1 UserInfo=0x115d4c780 "The end date can’t be set to occur before the start date. Change the end or start date." {
    NSLocalizedDescription = "The end date can\U2019t be set to occur before the start date. Change the end or start date.";
    I tried to export / delete / import all my calendars, that didn't help. Then I noticed I also have the calendar automatically generated for the birthdays from my address book.
    I unchecked "Show Birthdays calendar" from the General preferences. Now iCal works again (I can add / edit / delete events and the error message doesn't show in the Console.app anymore)
    Cheers,
    Janus

    I have updated my OS to 10.9 hoping this to fix my problem.... but nothing... It's still the same....

  • ADF data table with Add,Edit,Delete functionality

    Hi Experts,
    I have a adf page where I need to implement add,edit,delete button. The table was bind with the Webservice obj call.I need to have one single button as "Add" which should add an inline row at end of the table.When I ll double click on the row I should have the in-line edit of the row.And for delete functionality,there should be delete button on each row which should delete the correspond row.Please help me to solve my problem.Please share the code to meif u ve any.my email: [email protected]
    Thanx
    Aswini

    Can you check the below links
    http://andrejusb.blogspot.com/2010/05/crud-operations-in-oracle-adf-11g-table.html
    http://andrejusb.blogspot.com/2009/11/crud-operations-in-jdeveloperadf-11g-r1.html
    ~Abhijit

  • Edit/delete/insert forms using php

    Hi,
    I have created an application that will allow me to
    edit/delete/insert data to my database using php.
    The functions work. But when I click on a tab i get an error
    like this:
    ypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at
    StoreManagement/runFeed()[C:\adobeStoreManagement\StoreManagement\src\StoreManagement.mxm l:26]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
    mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\co re\UIComponent.as:9051]
    at
    mx.containers::ViewStack/dispatchChangeEvent()[E:\dev\3.0.x\frameworks\projects\framework \src\mx\containers\ViewStack.as:1165]
    at
    mx.containers::ViewStack/commitProperties()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\containers\ViewStack.as:672]
    at
    mx.containers::TabNavigator/commitProperties()[E:\dev\3.0.x\frameworks\projects\framework \src\mx\containers\TabNavigator.as:504]
    at
    mx.core::UIComponent/validateProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\ mx\core\UIComponent.as:5670]
    at
    mx.managers::LayoutManager/validateProperties()[E:\dev\3.0.x\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:519]
    at
    mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:669]
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at
    mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\core\UIComponent.as:8460]
    at
    mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src \mx\core\UIComponent.as:8403]
    Also the first time I click on the edit program link it
    doesnt show any data in the combo. Then when I click on new store.
    It fills up the comboboxes. When I go back to the edit program tab.
    It now also has the data inside the combobox.
    When I add a new program, store or categorie. It says
    operation succesfull. But the new program is not added to the new
    comboboxes. I have to close the browser and rerun the application.
    Then it shows the entered value inside the comboboxes.
    I have attached all my code for this application, any help
    would be greatly appreciated. Also could you advise me on what is
    the best approach to do this?
    With friendly regards,
    Thomas

    A few things:
    * Do not use lastResult in AS code. It is intended for use in
    binding expressions only. I suspect that it is the cause of your
    error, since it will not yet exist where you are trying to
    reference it.
    * All data service calls in Flex are asynchronous. this means
    you can *never* access the result data in the same function you
    call send(), as you are attempting.
    * Use a result handler for all HTTPService calls
    * Your data model methodology is *good*, using instance vars
    to hold ArrayCollections, and binding to those vars. Just set the
    vars in a result handler, instead of in the send function
    * the default resultFormat of HTTPService is object. This
    causes Flex to convert the HTTPService XML into a tree of dynamic
    objects. While it provides a quick start, it has long term
    drawbacks. I advise setting resultFormat="e4x", so that youcan use
    the powerful e4x XML API on your data.

  • How to add custom ADF Tree Node icon

    Hi All,
    i am using below code in style sheet to set the tree node icon,
    af|tree::node-icon:nodetype-collapsed
    but i don't have any idea how to add getnodetype() method in the node class, (I am using Jdeveloper 11.1.1.2.0). please suggest me the steps to achive it.
    Thanks,
    Mahesh

    i did as you suggested, but i am not getting any image, below is my source
    <nodeDefinition DefName="com.mahesh.SSCExplorer.model.ROview.OrdrHdrVO"
    Name="OrdrHdr20"
    TargetIterator="${bindings.OrdrHdr2Iterator}"
    ClosedIcon="/Nuvola_filesystems_folder.png"
    OpenIcon="/Nuvola_filesystems_folder.png"
    Icon="/Nuvola_filesystems_folder.png">
    please suggest is there any other settings i need to do.
    Thanks,
    Mahesh

  • Deleting Tree Node

    Hello All
    I am Creating a Tree and It is going to Populate only when the Node is Expanded.
    I.E. the Child records are created only when the Node is Expanded.
    What we Did is that when we are creating a Parent Node, we are populating a dummy child node to the Parent Node, so that the + sign will be shown.
    Now when I am Expanding the + sign, it has to delete the Dummy child node and then create the Child nodes under the Dummy one.
    For this One I am unable to Find a solution.
    PLEASE HELP ME REGARDING THIS ONE.
    THIS PROBLEM IS RELATING TO FORMS

    In the when-tree-node-expanded trigger.
    Store the system.trigger_node. This is the parent.
    Search, starting with the parent, for a child which has the value/label that you gave the dummy node. Did you find one? If yes then delete it.
    If you didn't find one then you stop as you've already expanded this node I guess.
    After you delete the child you must then add the new children. So loop through the code that produces the list of new children you want, and add them under the parent that you started with.
    Hope this helps.

  • Delete tree nodes from Table

    I have created a tree table
    create table subforums (
    id          NUMBER(5) primary key,
    parent_id     references subforums,
    name          varchar2(100)
    And now i dont know how to delete a tree with a specified id and all of his children.
    I tried to find out but i couldnt

    Hi,
    When you delete a node and all of its children, what do you want to do with the grandchildren? If you want to set their parent_id to NULL, do that in a separate UPDATE statement first, then DELETE the original node and all its remaining descendants, as show below.
    If, when you say "children", you mean "descendants" (including
    children,
    children of children,
    children of children of children,
    and so on, to any level,
    ) then do a CONNECT BY query to find their primary keys, and DELETE everything in that list, like this:
    DELETE  subforms
    WHERE   id  IN
            SELECT  id
            FROM    subforms
            START WITH        id = :specified_id
            CONNECT BY  PRIOR id = parent_id
            );

  • Edit / delete MySql records using dreamweaver Tutorial

    is there any tutorials out there to show the edit & delete records, i can add records into a mySql database, then when i try and edit the list whatever record i try to edit off a edit list it just takes me to the first record on the database? instead of the record i have selected?
    any ideas would be appreciated
    Thanks

    I know of a great book that you would really benefit from. I got started on php/mysql with it. Sometimes the author contributes on this forum too. It is called PHP Solutions by David Powers. It is way better than any simple tutorial.
    If you are actually trying to learn php/mysql this book is going to be one you will reference frequently and find what you are looking for.
    Good luck. Check out amazon, they usually have it for pretty cheap (about 30 USD).

  • How to Add/Edit/Delete UI Components(i.e not text values) in a UIContainer as per XML data using mxml.

    Hi All,
    I was asked to make a application for monitoring a remote devices and data is accessed through XMLSocket, the devices at the remote system could be added/deleted at runtime. and Web UI should act accotdingly. What is the best way of approch to implement it ?is it using mxml component or using action script?.I already implemented using mxml and could display devices in Web, for dynamic addiotion/deletion/edition of devices and its properties i'm looking for your inputs/suggestion.
    thanks in Advance.

    hi satyamurthy,
    assign unique name to each of the UIComponents adding to the container ( default stage )
    by using the name property of the components you can get the object from the container using
    container.getChildByName("name assigned to the property") this function will return as DisplayObject
    typecast the DisplayObject to the target class to that you can edit the object.
    example:
    var sp:Sprite = myContainer.getChildByName("one") as Sprite;   // here I am getting sprite reference with name 'one' from 'myContainer'
    sp.x=sp.x + 10;  // here I am editing the property 'x' of the Sprite whose name is 'one'
    Note : similarly you can perform operation on the sprite
    Deleting UIComponent:
    removeChild will be used to remove the child from the container where it is added
    container.removeChild(container.getChildByName("name assigned to the property"));
    If this post answers your question or helps, please mark it as such

  • Cannot expand tree nodes using t:tree tag

    Hi, I have a question.
    I am a beginner of JSF. I am trying to deploy a very simple tree using <t:tree> in my local tomcat server, similar to the following one:
    http://www.irian.at/myfaces/tree.jsf
    The result is that the tree is properly displayed, but I cannot expand the nodes when I click on the "+" icon of the nodes.
    Can someone help me? Thanks a lot!

    Take a look at Lilya Jsf Widgets and Ajax Capabilities at http://qlogic.ma/lilya
    the new era of technology

  • How to add icons to tree node ?

    hi,
    i want to set node icon of a JTree with respect to the level of that node.
    Also need to expand the tree up to 1st level while loading.
    how can i get the thing done?

    Read the tutorial: [How to Use Tables|https://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    kaushalya.cse wrote:
    i want to set node icon of a JTree with respect to the level of that node.You will probably need a custom renderer for this.
    Also need to expand the tree up to 1st level while loading.You can use the expand methods in JTree to expand any node you want.

  • Start Editing an Tree-Node programmatically

    Hello there!
    I have a JTree which the user can edit by clicking on the nodes three times. This I did setting "tree.setEditable(true);". Now i want a selected node to switch to editing-mode when the user clicks on a menu.
    So how can I programmatically start editing?
    Thanks a lot, DreamiX.

    JTree has method
    startEditingAtPath(TreePath path)
    best regards
    Stas

Maybe you are looking for