Checkbox Trees

Hi All,
I have a requirement that I feel would be best implemented with a tree if I can get the functionality working.
First off I am on apex 4.2.2.00.11.  I implemented a solution for creating a checkbox tree that Alex Nuijten https://plus.google.com/118115428098299370580 discussed in his blog from 7/23/2013.  I then added in the drag and drop functionality that was discussed in forum thread https://forums.oracle.com/thread/2274874.
Now I have a tree that has the chechboxes and the ability to reparent a node through drag and drop.  The problem I now have is in trying to save the changes and acting upon the checked nodes.  When I check a node I would like to perform an action in the database.  Unfortunately I am drawing a blank on how to reference the nodes.
Just wondering if anyone might have any ideas on how to do this?
Thanks for your time.
Tom

Remy Suen wrote:
> On Wed, 16 Sep 2009 13:27:05 +0000, amay wrote:
>> I am using checkboxtreeviewer in my application. I want it to behave
>> like other checkbox trees in Eclipse IDE. When user checks parent
>> checkbox, all its child item checkboxes should get checked, if any child
>> item is checked, its parent item should get grayed and when all the
>> child items are checked then parent should get automatically checked and
>> so on.
> I think you want ContainerCheckedTreeViewer?
> http://help.eclipse.org/stable/nftopic/org.eclipse.platform. doc.isv/
> reference/api/org/eclipse/ui/dialogs/ContainerCheckedTreeVie wer.html
> Regards,
> Remy
Thank you Remy,
This is exactly what I wanted.
-amay.

Similar Messages

  • A checkbox tree control

    Hi All,
    I need to create a checkbox tree control to show the user and make him select the directory listing of application-home on the server side. I have a solution wherein I have to submit the page every time the checkbox is clicked, but that is not efficient.
    I need to select all the child node checkboxes once the parent checkbox is selected and well I need to show the parent checkbox greyed if even one child is not selected and show the parent deselected if all child nodes are unclicked.
    Please Help...
    Thanks
    Ultimate.

    U can handle all these by JavaScript. there's no time to sit and write code fer u, just try to show the way!
    do some search on huge set of javascript codes/sample on net to handle those things.
    --Behrad                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 3 State CheckBox Tree

    I just downloaded the 3 State CheckBox Tree custom control
    from the Flex dev exchange a few moments ago. I put the code into a
    Flex prject, compiled it and ran it pretty much unchanged. When I
    click on any of the tree controls I get the error message:
    ArgumentError: Error #2025: The supplied DisplayObject must
    be a child of the caller.
    at flash.display::DisplayObjectContainer/getChildIndex()
    at mx.managers::SystemManager/getChildIndex()
    at mx.managers::SystemManager/::mouseDownHandler()
    Anybody else download this tag and have a problem like
    this???
    Have an Ordinary Day...
    KomputerMan ~|:-)

    O.K. I pulled the downloaded component inside an existing
    application and ran it from there. The problem was that the
    downloaded component had a <mx:Application...> tag in it
    which gave me two templates with the <mx:Application ...>
    tag. Flex didn't like this too much. After I renamed the
    <mx:Application...> tag in the downloaded component to
    <mx:Canvas...> life was good. One of those duh moments...
    DUH!!! :)
    Have an Ordinary Day...
    KomputerMan ~|:-)

  • APEX 4 checkbox tree template

    Hello,
    why is no more available the checkbox tree template?
    is there a workaround to obtain the same result starting from the classic template?
    Thank you,
    matteo

    Oracle - can we not at least have what you had working for check boxes so we can try to extend it to our needs.????
    We have a great need for the ability to show what was checked, we can use AJAX to do whatever process...
    Any help is much appreciated... :>)
    Thanks, Bill

  • Checkbox Tree

    In old threads about new tree functionality in 4.0 I see examples of the Checkbox Tree, however, in the final version when I create the tree I do not see this option. Was it dropped from final release or am I doing something wrong?

    Hi All,
    I just came across this code that searching the forum for "tree", one of the first posts.
    It is not showing correctly below so go to this link and look at original:
    Tree Formatting
    It allows the HTML tags to be interpretted as HTML tags...
    /* getElementsByClass from http://bit.ly/dj8Xk8 */
    function getElementsByClass( searchClass, domNode, tagName) {
         if (domNode == null) domNode = document;
         if (tagName == null) tagName = '*';
         var el = new Array();
         var tags = domNode.getElementsByTagName(tagName);
         var tcl = " "+searchClass+" ";
         for(i=0,j=0; i<tags.length; i++) {
              var test = " " + tags.className + " ";
              if (test.indexOf(tcl) != -1)
                   el[j++] = tags[i];
         return el;
    function fixTreeHTML() {
         var treeParts = new Array("leaf","open","closed");
         for( p=0; p < treeParts.length; p++ ) {
              var nodes = getElementsByClass(treeParts[p],document,'li');
              for( i=0; i < nodes.length; i++ ) {
                   var ihtm = nodes[i].innerHTML;
                   ihtm = ihtm.replace(/& lt;/ig,"<"); // there is a space & lt just to post on forum
                   ihtm = ihtm.replace(/& gt;/ig,">"); // there is a space & gt just to post on forum
                   nodes[i].innerHTML = ihtm;
    Edited by: BillC on Oct 25, 2010 2:32 PM

  • Checkbox Tree in JavaFX

    Does anybody has an idea where I find an example for a checkbox Tree? Thx

    There is no Checkbox Tree control in JavaFX (as of now). I've written one long time back in Java. You could adopt it to use in JavaFX as a swing component.
    [http://winstonprakash.com/sources/java2html/tree/JCheckBoxTree.java.html]
    [http://winstonprakash.com/sources/java2html/tree/JCheckBoxTreeTester.java.html|http://winstonprakash.com/sources/java2html/tree/JCheckBoxTree.java.html]

  • CheckBox Tree Component

    Hye guys,
    I need a custom tree component for some xml elements that represent some files and their attributes. I have written one such component but what I need now to add to this component is Checkboxes.
    The user is supposed to select files from this Tree component via these chk boxes.
    Can someone point me in the direction of such an existing Tree component.
    Or if I have to write one how do I go about it.
    Pls donot point me to the Java tutorial. I read it but I still have a very very vague idea, if any idea at all, of doing this.
    Regards

    worth a look
    http://forum.java.sun.com/thread.jsp?forum=57&thread=122006

  • Can't get Checkbox selection status in Tree

    Hi,
    I'm using a Checkbox Tree which I got from here: [http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm|http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm]
    Now, I want to determine whether the Checkboxes are selected or not.
    Unfortunately, the custom CheckBox model class always returns true, which is stored in a Vector.
    In short, this is how the checkTree is created:
    CheckBoxNode tabFormatNode = new CheckBoxNode[]{new CheckBoxNode("GP3", true),
                                        new CheckBoxNode("GP4", true),
                                        new CheckBoxNode("GP5", true)};
    NamedVector formatVector = new NamedVector("Format", tabFormatNode);
    Object[] rootNodes = new Object[]{ formatVector }
    Vector rootVector = new NamedVector("root", rootNodes);
    TreeModel model = createTreeModel(rootVector);
    setModel(model);As I said, when I retrieve a CheckBoxNode from the Vector, it always return true on isSelected(), so that's no use.
    However, the renderer does manage to get the selection status correctly.
    private static class CheckBoxNodeRenderer implements TreeCellRenderer
            private JCheckBox leafRenderer = new JCheckBox();
            protected JCheckBox getLeafRenderer()
                return leafRenderer;
            public CheckBoxNodeRenderer()
            public Component getTreeCellRendererComponent(JTree tree, Object value,
                  boolean selected, boolean expanded, boolean leaf, int row,
                  boolean hasFocus)
                Component returnValue;
                if (leaf)
                    String stringValue = tree.convertValueToText(value, selected,
                        expanded, leaf, row, false);
                    leafRenderer.setText(stringValue);
                    leafRenderer.setSelected(false);
                    if (selected)
                        leafRenderer.setForeground(selectionForeground);
                        leafRenderer.setBackground(selectionBackground);
                    else
                        leafRenderer.setForeground(textForeground);
                        leafRenderer.setBackground(textBackground);
                    if ((value != null) && (value instanceof DefaultMutableTreeNode))
                        Object userObject = ((DefaultMutableTreeNode) value)
                        .getUserObject();
                        if (userObject instanceof CheckBoxNode)
                            CheckBoxNode node = (CheckBoxNode) userObject;
                            leafRenderer.setText(node.getText());
                            leafRenderer.setSelected(node.isSelected());
                            // eigen
                            leafRenderer.setEnabled(Overview.getTabbedPane().getActiveTabList().isLeftPaneEnabled());
                    returnValue = leafRenderer;
                else
                  returnValue = nonLeafRenderer.getTreeCellRendererComponent(tree,
                      value, selected, expanded, leaf, row, hasFocus);
                return returnValue;
        }Could anyone help me with retrieving the correct selection values of the CheckBoxes?
    Edited by: Tails on 21-mrt-2008 13:07

    OK Tails. here are the changes you need, in CheckBoxNodeEditor method getTreeCellEditorComponent. Note that Component editor is now declared as final so that in can be accessed from within the inner class.   public Component getTreeCellEditorComponent (JTree tree, Object value,
             boolean selected, boolean expanded, boolean leaf, int row) {
          // change to final
          final Component editor = renderer.getTreeCellRendererComponent (tree, value,
                true, expanded, leaf, row, true);
          // editor always selected / focused
          // line added
          final CheckBoxNode cbn = (CheckBoxNode) ((DefaultMutableTreeNode) value).getUserObject ();
          ItemListener itemListener = new ItemListener () {
             public void itemStateChanged (ItemEvent itemEvent) {
                // line added
                cbn.setSelected (((CheckBoxNode) getCellEditorValue ()).isSelected ());
                if (stopCellEditing ()) {
                   fireEditingStopped ();
          if (editor instanceof JCheckBox) {
             ((JCheckBox) editor).addItemListener (itemListener);
          return editor;
       }Get back to us on whether that solves the problem, willya.
    db

  • [APEX 4.0] EA2 Tree , checkbox

    I'm checking out the new APEX tree region, to be exact the checkbox tree. But how can you read values from this tree. It's values are not stored in the session it seems.

    Hello Harvey,
    It is the jsTree ([http://www.jstree.com/]) jQuery plugin. You should be able to use that already in the current version of APEX.
    If it will be an APEX Plugin in the near future? I guess that's more up to you (or "us", as APEX Developers) to create a nice Plugin for it.
    But maybe the APEX Dev Team will create one as example if you're nice to Patrick or Anthony ;-)
    Greetings,
    Roel
    http://roelhartman.blogspot.com/

  • Selected Tree Checkboxes Value

    Hi,
    can someone assist me on this?
    I have a Checkbox Tree and I would like to show in a page item (for example a Text Area) the value of all selected checkboxes.
    My page item name is P6_FEEDBACK and should be in the same page as my Tree region (name of Tree region is Treeviw1).
    This is my Tree Query:
    SELECT
      CASE
        WHEN connect_by_isleaf = 1
        THEN 0
        WHEN level = 1
        THEN 1
        ELSE -1
      END AS status,
      LEVEL,
      OBJECT_NAME  AS title,
      NULL        AS ICON,
      OBJECT_NAME AS value,
      OBJECT_NAME AS tooltip,
    null  as link 
    FROM
      OWNER.TABLE_NAME
    WHERE
        PARENT_OBJ_1 = v('TABLE')
      OR OBJECT_NAME = v('TABLE')
      OR PARENT_OBJ_2 = v('TABLE')
      START WITH PARENT_OBJ_2    is null
      CONNECT BY prior OB_P1= P1_P2
    ORDER SIBLINGS BY
      OBJECT_TYPE,OBJECT_NAME;
    I also tried to modify the above query and add a limk to the page item but this is not working.
    Thanks

    Hi ,
    Thank you that was exactly what I was looking for. I couldn't find how to pass database column to javascript as an input parameter. So thanks for your help. I made a couple of correction :
    1) I put additional ' characters to ('''||"NAME"||''') this part because my field is varchar.
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    NAME as title,
    null as icon,
    "ID" as value,
    null as tooltip,
    'javascript:setFObjName('''||"NAME"||''')' As link
    from "#OWNER#"."TABLE_NAME"
    start with "PID" is null
    connect by prior "ID" = "PID"
    2) In script I have added ' character before and after page item.
    function setFObjName(pobjName){
    $s('P1_OBJ_NAME', pobjName);
    So it works. Thanks tfor your help.

  • FileSystemTree and TreeItemRenderer random selected Checkboxes

    When implementing
    Three
    State Checkbox Tree solution on a FileSystemTree, the
    checkboxes will randomly change states while scrolling. This
    happens when the checkbox leaves the viewable area.
    The state of the check box is being held within a
    ModelLocator from the Cairngorm project (obviously using the
    framework). Is there any work around for this? I have changed very
    little of the code given in the cookbook example. Of course I am
    passing in the FileSystem.File object and checking the nativePath
    against the data inside the ModelLocator. There is a hash map
    implementation storing the state.
    Any help would be most welcome. I think I am far more bald
    now then when I started coding this.
    - Blake

    Hi Blake,
    I have been looking at it for the past couple of days.
    Couldn't figure it out yet.. With the FileSystemTree the File
    object is being passed in. How do you store state in it? Tried
    hacking by storing it in File properties like url but doesn't work.
    You mention about a "hash map implementation storing the state".
    Any info about it would be great.
    Thanks.

  • Code for complete JTree of mycomputer (dynamic) but need to add checkboxes

    //the bug is where i am sending the value to the checkbox.. if somebody can add checkboxes to every node plz reply soon
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Font;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import java.awt.event.MouseEvent;
    import java.util.EventObject;
    import java.util.Vector;
    import javax.swing.AbstractCellEditor;
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.event.ChangeEvent;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.TreeCellEditor;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreePath;
    public class CheckBoxNodeTreeSample {
    public static void main(String args[]) {
    JFrame frame = new JFrame("CheckBox Tree");
    /* CheckBoxNode accessibilityOptions[] = {
    new CheckBoxNode(
    "Move system caret with focus/selection changes", false),
    new CheckBoxNode("Always expand alt text for images", true) };
    CheckBoxNode browsingOptions[] = {
    new CheckBoxNode("Notify when downloads complete", true),
    new CheckBoxNode("Disable script debugging", true),
    new CheckBoxNode("Use AutoComplete", true),
    new CheckBoxNode("Browse in a new process", false) };
    Vector accessVector = new NamedVector("Accessibility",
    accessibilityOptions);
    Vector browseVector = new NamedVector("Browsing", browsingOptions);
    Object rootNodes[] = { accessVector, browseVector };
    Vector rootVector = new NamedVector("Root", rootNodes);
    setLayout(new GridLayout(1,1));
    //create the top node
    MutableTreeNode root = new DefaultMutableTreeNode("Computer");
    //get all nodes for top file systems or disks
    //On Linux/Unix this will only be '/'
    //while on Window there will typically be more: 'A:', 'C:' etc.
    File roots[] = File.listRoots();
    //loop through all these nodes and add them to the root Computer node
    int i = 0;
    for(File f : roots) {
    DefaultMutableTreeNode node = new DefaultMutableTreeNode(f.getAbsoluteFile().toString());
    root.insert(node, i++);
    //create a tree model with the Computer node as root
    model = new DefaultTreeModel(root);
    JTree tree = new JTree(model);
    CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer();
    tree.setCellRenderer(renderer);
    tree.setCellEditor(new CheckBoxNodeEditor(tree));
    tree.setEditable(true);
    JScrollPane scrollPane = new JScrollPane(tree);
    frame.getContentPane().add(scrollPane, BorderLayout.CENTER);
    frame.setSize(300, 150);
    frame.setVisible(true);
    class CheckBoxNodeRenderer implements TreeCellRenderer {
    private JCheckBox leafRenderer = new JCheckBox();
    private DefaultTreeCellRenderer nonLeafRenderer = new DefaultTreeCellRenderer();
    Color selectionBorderColor, selectionForeground, selectionBackground,
    textForeground, textBackground;
    protected JCheckBox getLeafRenderer() {
    return leafRenderer;
    public CheckBoxNodeRenderer() {
    Font fontValue;
    fontValue = UIManager.getFont("Tree.font");
    if (fontValue != null) {
    leafRenderer.setFont(fontValue);
    Boolean booleanValue = (Boolean) UIManager
    .get("Tree.drawsFocusBorderAroundIcon");
    leafRenderer.setFocusPainted((booleanValue != null)
    && (booleanValue.booleanValue()));
    selectionBorderColor = UIManager.getColor("Tree.selectionBorderColor");
    selectionForeground = UIManager.getColor("Tree.selectionForeground");
    selectionBackground = UIManager.getColor("Tree.selectionBackground");
    textForeground = UIManager.getColor("Tree.textForeground");
    textBackground = UIManager.getColor("Tree.textBackground");
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean selected, boolean expanded, boolean leaf, int row,
    boolean hasFocus) {
    Component returnValue;
    if (leaf) {
    String stringValue = tree.convertValueToText(value, selected,
    expanded, leaf, row, false);
    leafRenderer.setText(stringValue);
    leafRenderer.setSelected(false);
    leafRenderer.setEnabled(tree.isEnabled());
    if (selected) {
    leafRenderer.setForeground(selectionForeground);
    leafRenderer.setBackground(selectionBackground);
    } else {
    leafRenderer.setForeground(textForeground);
    leafRenderer.setBackground(textBackground);
    if ((value != null) && (value instanceof DefaultMutableTreeNode)) {
    Object userObject = ((DefaultMutableTreeNode) value)
    .getUserObject();
    if (userObject instanceof CheckBoxNode) {
    CheckBoxNode node = (CheckBoxNode) userObject;
    leafRenderer.setText(node.getText());
    leafRenderer.setSelected(node.isSelected());
    returnValue = leafRenderer;
    } else {
    returnValue = nonLeafRenderer.getTreeCellRendererComponent(tree,
    value, selected, expanded, leaf, row, hasFocus);
    return returnValue;
    class CheckBoxNodeEditor extends AbstractCellEditor implements TreeCellEditor {
    CheckBoxNodeRenderer renderer = new CheckBoxNodeRenderer();
    ChangeEvent changeEvent = null;
    JTree tree;
    public CheckBoxNodeEditor(JTree tree) {
    this.tree = tree;
    public Object getCellEditorValue() {
    JCheckBox checkbox = renderer.getLeafRenderer();
    CheckBoxNode checkBoxNode = new CheckBoxNode(checkbox.getText(),
    checkbox.isSelected());
    return checkBoxNode;
    public boolean isCellEditable(EventObject event) {
    boolean returnValue = false;
    if (event instanceof MouseEvent) {
    MouseEvent mouseEvent = (MouseEvent) event;
    TreePath path = tree.getPathForLocation(mouseEvent.getX(),
    mouseEvent.getY());
    if (path != null) {
    Object node = path.getLastPathComponent();
    if ((node != null) && (node instanceof DefaultMutableTreeNode)) {
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node;
    Object userObject = treeNode.getUserObject();
    returnValue = ((treeNode.isLeaf()) && (userObject instanceof CheckBoxNode));
    return returnValue;
    public Component getTreeCellEditorComponent(JTree tree, Object value,
    boolean selected, boolean expanded, boolean leaf, int row) {
    Component editor = renderer.getTreeCellRendererComponent(tree, value,
    true, expanded, leaf, row, true);
    // editor always selected / focused
    ItemListener itemListener = new ItemListener() {
    public void itemStateChanged(ItemEvent itemEvent) {
    if (stopCellEditing()) {
    fireEditingStopped();
    if (editor instanceof JCheckBox) {
    ((JCheckBox) editor).addItemListener(itemListener);
    return editor;
    class CheckBoxNode {
    String text;
    boolean selected;
    public CheckBoxNode(String text, boolean selected) {
    this.text = text;
    this.selected = selected;
    public boolean isSelected() {
    return selected;
    public void setSelected(boolean newValue) {
    selected = newValue;
    public String getText() {
    return text;
    public void setText(String newValue) {
    text = newValue;
    public String toString() {
    return getClass().getName() + "[" + text + "/" + selected + "]";
    class NamedVector extends Vector {
    String name;
    public NamedVector(String name) {
    this.name = name;
    public NamedVector(String name, Object elements[]) {
    this.name = name;
    for (int i = 0, n = elements.length; i < n; i++) {
    add(elements);
    public String toString() {
    return "[" + name + "]";

    Between when you posted the question and the entire 50 minutes you waited for an answer, I tried compiling that code you posted, with a view to help out.
    What I found was..
    That code did not compile as posted.
    - It was missing imports
    - There was a direct reference to setLayout that applied to no member
    - model was not declared properly
    It also shows unchecked add warnings, please fix those before posting.
    BTW - please do not remove indenting from posted code, it makes it very hard to read, replace any tabs in the source for 2-4 spaces instead. Also, code is easier to examine when it is enclosed in 'code' tags - this can be achieved by selecting the code and pressing the 'code' button above the form field we type the messages.
    On the subject of what you are trying to do, please trim your example down to something that tries to create this tree form any directory structure the user might specify with a JFileChooser, because I am running a slow machine with large drives, and creating a JTree of the entire file system would take far too long.
    Fix those things, and I'll take a second look.
    As an aside. If you wish to get answers 'within the hour', you will probably need a consultant or a help desk. If you post to these forums, you need to be more patient.

  • How to use frame in struts

    Hi all,
    I am using Struts framework.
    I have two part in a jsp page, in which i am getting data from previous page by using request.getParameterValues("date");
    i.e i am getting multiple date.
    Now in first part of jsp page i have checkbox tree ,where user can select checkbox, then click on submit .Now on click submit data will pass second part of jsp page.where with checked data
    and date i have to do some process.
    it is like frame type structure, where data from one frame will pass in second frame in jsp page.
    I request to all JGuru to guide me how to do it.
    Deepak

    Just let it access the request parameters the same way? Using HttpServletRequest#getParameter() and so on.

  • Creating TREE REPORT with CHECKBOX against each row

    Hi Friends,
    I need to create a <b>TREE REPORT with  CHECK BOX</b> against each row. when the user selects a row and clicks on a custom button then those should get populated into an internal table. <b>This is HIGH priority</b> one and I have tried my best but couldnt find any solution. Please advise me some sol.
    thanks in advance for your valuable time and help.
    Regards
    srithan
    Message edited by me for easyness
            Reddy

    Hi
    Following code is to add checkboxes in ALV tree:
    FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
    CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
    relationship = cl_gui_column_tree=>relat_last_child ).
    ... §0.2 if information should be displayed at
    the hierarchy column set the carrid as text for this node
    text = p_ls_data-object.
    node->set_text( text ).
    ... §0.3 set the data for the nes node
    node->set_data_row( p_ls_data ).
    item = node->get_hierarchy_item( ).
    item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
    item->set_type( if_salv_c_item_type=>checkbox ).
    pl_carrid_key = node->get_key( )._
    CATCH cx_salv_msg.
    ENDFORM_._Following code is for handling checbox_change event
    PERFORM application_action_events.
    FORM application_action_events .
    data: lr_events type ref to cl_salv_events_tree.
    *data gr_events type ref to lcl_handle_events.
    lr_events = gr_tree->get_event( ).
    create object gr_events.
    set handler gr_events->check for lr_events.
    set handler gr_events->on_link_click for lr_events.
    set handler gr_events->on_before_user_command for lr_events.
    set handler gr_events->on_after_user_command for lr_events.
    set handler gr_events->on_keypress for lr_events.
    endform. " application_action_events----
    CLASS lcl_handle_events DEFINITION.
    PUBLIC SECTION.
    METHODS:
    check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
    ENDCLASS. "lcl_handle_events DEFINITION
    CLASS lcl_handle_events IMPLEMENTATION
    §4.2 implement the events for handling the events of cl_salv_table
    CLASS lcl_handle_events IMPLEMENTATION_._
    METHOD check_._
    WRITE 'hello'_._
    DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
    node_key = node_key - 1_._
    READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
    if columnname = 'FCHECKBOX'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->fcheckbox =_ ' '_._
    ELSE_._
    lwa_modify_check->fcheckbox =_ 'X'_._
    ENDIF_._
    ENDIF_._
    if columnname = 'CHECKBOX_READ'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->checkbox_read =_ ' '_._
    ELSE_._
    lwa_modify_check->checkbox_read =_ 'X'_._
    ENDIF_._
    ENDIF_._
    *MODIFY TABLE csg_gt_list from l_wa_modify_check.
    flag_test = flag_test + 1_._
    ENDMETHOD_._ "check
    ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
    Please give me reward points

  • ALV Tree Problem with Checkboxes

    Hello,
    i've got a problem.
    I have an ALV-Tree and die ALV-Detaillist of the tree are type checkbox.
    That's working correct.
    But i want to fill initial data in the checkboxes but the checkbox isnt set.
    i've done as followed:
      CALL METHOD go_alv_tree->set_table_for_first_display
        EXPORTING
         I_STRUCTURE_NAME     =
         IS_VARIANT           =
         I_SAVE               =
          i_default            = abap_false
          is_hierarchy_header  = ls_header
         IS_EXCEPTION_FIELD   =
         IT_SPECIAL_GROUPS    =
         IT_LIST_COMMENTARY   =
         I_LOGO               =
         I_BACKGROUND_ID      =
         IT_TOOLBAR_EXCLUDING =
        CHANGING
          it_outtab            = <go_data_tab>
         IT_FILTER            =
          it_fieldcatalog      = lt_fcat.
    fieldcat are several fields all as checkbox.
    Then i get a component of the output structure and set a X.
    ASSIGN COMPONENT lv_help_arbpl OF STRUCTURE <go_data_struc>
                           TO <fs_arbl>.
          IF <fs_arbl> IS ASSIGNED.
            <fs_arbl> = lc_xfeld.
          ENDIF.
            CALL METHOD go_alv_tree->add_node
              EXPORTING
                i_relat_node_key     = lv_matnr
                i_relationship       = cl_gui_column_tree=>relat_last_child
                is_outtab_line       = <go_data_struc>
                is_node_layout       = ls_layout
             IT_ITEM_LAYOUT       =
                i_node_text          = lv_node_text
              IMPORTING
                e_new_node_key       = lv_period
              EXCEPTIONS
                relat_node_not_found = 1
                node_not_found       = 2
                OTHERS               = 3.
    in <go_data_struc> the fields which should be set, are set with X.
    But after i add all of my nodes and do CALL METHOD p_go_alv_tree->frontend_update, the checkbox is empty but there is an X in the field beside the checkbox.
    Thanks in advance.
    best regards,
    Dennis

    Ok i solved the problem.
    best regards,
    Dennis

Maybe you are looking for

  • Why no sound when exporting movie?

    Pretty new to Quicktime Pro. When I try to export a .Mov file for email purposes (or any other setting) the sound option is greyed out and the movie exports with no sound? Quicktime Pro 7.04

  • Adobe AIR and Adobe´s About Flash -site?

    I encountered a strange thing while checking if I have the latest version of Adobe Flash installed. When I go to About Flash page (http://www.adobe.com/software/flash/about/) I instantly get the following notification on separate window: "Adobe AIR S

  • Bought new 4s registered but not yet received mail

    hi ive registered my new 4s but not yet received confirmation mail from apple

  • IPhone4 shuts down when mildly cold?

    Just wondering if anyone else has encountered anything similar, and if someone might know whats going on... Aside from the consistently poor signal and practically unusable 3G speed in everyday use, I'm having a problem with my iPhone 4 completely sh

  • Material Rounding value...

    Dear Experts,      The material XXXX has the Round value so that while doing PO it is not allowing values like 12.22 so that the quantity should not be manditry as round values,it should have posiblity to change it in case it is necessary With Regard