2 Line Text for Tree Component

Hi
I am trying to use a tree component for a Course navigation ,
and I have a Node names Getting clipped and I wanted to have
mulitple lines in the tree node, I would appreciate if anyone could
help me in how the tree component can be extended to accomodate
this requirement.
Thanks
Sembian

Hi Begum,
There are few default attributes you need to fill in your data structure,
PARENT_KEY - Parent (in your ex : header1, header2)
ROW_KEY -  Children (col1, col2, col3, col4...)
EXPANDED
IS_LEAF -
TEXT
CHILDREN_LOADED
IMAGE_SRC
Include these fields with same name in your structure(structure of the table filling CT_DATA in GET_DATA method)  and fill the relevant data, output will be displayed.
Cheers,
Vemula.

Similar Messages

  • Horizontal scroll for Tree component scrolls too far right

    I've enabled the horizontal scroll bar for the Tree component.
    But the scroll bar allows the user to scroll very far to the right into blank space.
    The maximum width of my components measures 124px, as calculated by measureWidthOfItems(0,0), and I've verified this by measuring pixels of a screen shot.
    I have tried adding an event to set the Tree.maxHorizontalScrollPosition, and I traced the value that I'm setting it to, and I also traced the value that it actually assumed after I set it. Both are 124px.
    So I can't understand the behavior. I can scroll something more like ~400px to the right with lots of blank space.
    Any ideas why?
    Thanks,
    David

    Hmm, I'm not sure why this works, but it works, so for completeness here's what I did (in case anyone else runs across this same thread):
    var measWidth:Number = myTree.measureWidthOfItems(0,0);
    filesTree.maxHorizontalScrollPosition = measWidth - myTree.width;
    I call the above code whenever the window is resized (in my app there are 2 places that can cause a resize of the window, I manually added calls to a function with the above code). There is also an example out there that resizes any time the window is resized, but if you do this then you really can't have liveDragging=true in a DividedBox (which I have) because the cost of resizing is very high and overtaxes the cpu when called many times consecutively. I just call it when the dragging is finished (that way I have live dragging enabled, but it only updates the scroll bars when the user stops dragging, which is visually acceptable).

  • Code for Tree component(tomahawk )

    I am new to JSF,I want a tree component in my page and i want to construct the tree by retriving data from database.I searched most of materials but could'nt find any good one.

    How would it match the trees? What have you done so far?
    /Kaj

  • Save last selected and state for Tree Component?

    I have a Tree component that refreshes its data everytime I
    open the Tab containing it (doing a SQL call to return an index of
    models). The problem is that everytime the dataProvider changes (a
    new one overwrites the old one) with databinding, even if the data
    is exactly the same, it loses its old state and selected node. Is
    there any way to save this state/selected node when the
    dataProvider updates?

    good article on all aspects of trees including your issue.
    http://www.adobe.com/devnet/flex/quickstart/working_with_tree/

  • Garbage Collection Issue for Tree Component

    Dear:
    When I created a new Tree instance dynamically by following code, and clicked any tree node randomly and then I removed it via another button, but I found this instance couldn’t be removed by GC, if I just created this tree without mouse action, it can be removed by GC.
    Tree Component:
    -- TreeView
    <mx:canvas>
    <mx:Tree dataProvider="{data}"  />   // data is a XML staments
    </mx:canvas>
    Create Tree:
               public function createView(event:Event):void{
                  var view:TreeView = new TreeView ();
                  view.name="myTree";
                  addChild(view);
                  view=null;
    Remove Tree:
               public function deleteView(event:Event):void{
                  var view:TreeView= TreeView( _con.getChildByName("myTree"));
                  removeChild(view);
    Could someone give me some suggestion?
    Thanks a lot

    Hi ajmcfarlane,
    This is my first post here. I'm fairly new to AS3 still and
    have been getting my education from a number of places. The best
    education i have found is from the book located at
    http://www.learningactionscript3.com/
    Rich Shupe address this problem of removing the child from
    memory. I Downloaded your file and found 2 problems and resolved
    one of them. By now you might have already solved this anyway.
    To remove the child from the Display List use -->
    removeChild(myChildObject);
    To remove the object from memory use --> myChildObject =
    null;
    You did these two steps but in the incorrect order, just by
    moving the 'myChildObject = null' under the removeChild code makes
    it work.
    I found running a few trace statements after fixing the first
    problem, i found the second problem. The error of trying to remove
    a child when it is no longer there.
    You just need to rework the design so that the order of
    events fires as you want. Below is the traces i used and the output
    that is received.
    function Click1(e:MouseEvent){
    trace("four ", loadedcontent);
    modLoader.unload();
    modLoader = null;
    function unloadCompleteHandler(event:Event):void{
    trace("one ", loadedcontent);
    removeChild(loadedcontent);
    trace("two ", loadedcontent);
    loadedcontent = null;
    trace("three ", loadedcontent);
    output
    Loaded mem: 20668 KB
    four [object MainTimeline]
    one [object MainTimeline]
    two [object MainTimeline]
    three null
    unLoaded mem: 23352 KB
    So you can see the click event is firing of the unload first,
    when i think you want that last.
    I hope this has been of some help :)

  • Data Binding for Tree Component

    Hi ,
    I have to make a tree structure and bind it to a column in a table,
    which when expanded should list the rows of the table for the selected column as individual sub nodes of the tree.
    So far I am not able to get that done.
    Any suggestions how to do it?

    If find what I need among ADF Faces Core component, ... the ADF TreeTable (http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/imageIndex.html).
    Unfortunetly It seems quite dificult to integrate ADF or any other 3rd part component with JSC2.

  • Carriage Return in line Text for invoice line item.

    Hi,
    I am trying to create an non PO invoice through calling a BAPI "BAPI_INVOICE_CREATE"
    in which  i am passing all the required data . I have a field called "SGTXT" which is item text and i am passing this field
    which has maximum length of 50 char i just want to add a new line characters on to it. i.e want to support Carriage Return
    just want to know whether it can hold Carrige Return.
    I just tried by entering some Characters and hitting Enter the value which i am passing is simillar to
    itemtext
    "abcdabcdabcdabcd#
    abacdabcdabcd#
    abcdabcd"   My program is not able to parse this values hence landing into dump.
    How should i support this scenario.
    Thanks,

    Here is the dump.
    The termination occurred in the ABAP program "SAPLZIBA_SSP_READ_CSV" in
    "LINE_TO_CELL_ESC_SEP".                                                 
    The main program was "ZIBA_SSP_INVOICELOAD ".                                                                               
    The termination occurred in line 149 of the source code of the (Include) 
    program "LZIBA_SSP_READ_CSVF01"                                       
    of the source code of program "LZIBA_SSP_READ_CSVF01" (when calling the
    editor 1490).                                                           
            IF i_string CS l_pipe.                     
              l_stringlength = strlen( i_string ).     
              DO l_stringlength TIMES.                 
                REPLACE '  ' WITH '""' INTO i_string.  
                IF sy-subrc NE 0.                      
                  EXIT.                                
                ENDIF.                                 
              ENDDO.                                   
            ENDIF.                                     
            ASSIGN I_STRING(L_INT) TO <L_CELL>.        
            I_INTERN_VALUE = <L_CELL>.                 
          endif.                                       
          L_INT = L_INT + 2.                           
          I_SIC_INT = L_INT.                           
          I_STRING = I_STRING+L_INT.                   
        ELSEIF I_STRING CS C_ESC.                      
        letzte Celle                                 
          L_INT = SY-FDPOS.                            
          if l_int = 0.                                
            clear i_intern_value.                      
          else.                                        
            ASSIGN I_STRING(L_INT) TO <L_CELL>.        
            I_INTERN_VALUE = <L_CELL>.                 
          endif.                                       
          L_INT = L_INT + 1.                           
          I_SIC_INT = L_INT.                           
          I_STRING = I_STRING+L_INT.                   
          L_INT = STRLEN( I_STRING ).                  
          IF L_INT > 0 . MESSAGE X001(KX) . ENDIF.     
        ELSE.                                          
          MESSAGE X001(KX) . "was ist mit csv-Format   
        ENDIF.                                         
      ENDIF.                                           
    Can you let me knwo how should i put my condition to support CR .
    thanks,

  • 2 lines text for JButton

    Hi all,
    Easy question...is there a way to set 2 lines of text to JButton? Thanks!

    never mind, i figure it out!

  • Issue with af:tree component

    Hi All,
    I am using JDev 11.1.1.6
    I am creating a tree component with collection model.I want to provide different action to each node,so I have defined an action attribute in the bean
    which I set in the constructor as shown below
    TestTree node1 = new TestTree("node1", "#{TreeBean.action1}");
    Is this the correct approach..This gives me "method not found " error when I click on the node.
    Below is the code for tree component :
    <af:tree value="#{TreeBean.model}" id="t1" var="node"
    styleClass="AFStretchWidth" inlineStyle="height:600.0px;">
    <f:facet name="nodeStamp">
    <af:commandLink text="#{node.label}" id="cl1" immediate="true"
    actionListener="#{node.action}"/>
    </f:facet>
    <f:facet name="pathStamp"/>
    </af:tree>

    Hi Vinay,
    UseCase :
    I want a tree showing navigation links . these navigation links will be used to open a new page in panelTabbed Layout.

  • How do you display multi line text

    Hi
    How does one display multi line text? I would like to display address information on the screen so that the user can select it and copy/paste it into another application (ms word).
    I have the address information as separate columns (address1, address2, city, province, postal code) so I've changed the query on my view object to add it as address1 || chr(10) || address2 || chr(10) || city ....
    If I display it on the page as an output text, it all displays as one line (okay, the chr(10) thing did not work but that's beside the point).
    In general, is there a way to display multi line text? What component is suitable for this, if there is one?
    Thanks

    You can use normal outputText components in a panelGroupLayout (vertical layout) and add each attribute to it. The remove the labels or set the components to simple. You can then mark the data in the browser and use normal copy&paste to transfer the data.
    If you want to output longer text with line breaks you can use an outputText with escape=false and use the br html tag to generate a line break;
    <af:outputText escape="false"
    value="+++++++long<br>test<br> this is a long text in multiple lines" id="ot10" truncateAt="#{viewScope.ToggleBean.truncateLength}"/>Timo

  • UIX Tree Component

    I have an issue with using tree component for our application. We need to provide expand/collapse facility for tree component (using default (+) and (-) icons). Does ADF_UIX support s for this situation. Please provide me any guideline....

    I have an issue with using tree component for our application. We need to provide expand/collapse facility for tree component (using default (+) and (-) icons). Does ADF_UIX support s for this situation. Please provide me any guideline....

  • Tree component display problem when text too long???

    hi all
    whenever i use a tree component to display some sort of text, i run into problems when the width of the text being display for a node is larger than the width of the tree component.
    Given: Tree tree1 with Node node1 and Child Node child1
    When the text of either node1 or child1 is longer than the width of tree1, the text is displayed on its own single line UNDERNEATH the node images. this makes the text look like it does not belong to the group of children of a given node.
    is there anyway to add maybe a text area or some sort of scrolling region to allow for any length of text for any node??
    thanks everyone!

    Yes, you can change the size of the tree node text field. Please see the "Tree Node Component Properties Window" section in the Help Contents within the IDE. Look at the info under the "Appearance" section.

  • How to get Text for nodes in Tree Structure

    Hi Friends,
    How to get Text for nodes in Tree Structure
    REPORT  YFIIN_REP_TREE_STRUCTURE  no standard page heading.
                       I N I T I A L I Z A T I O N
    INITIALIZATION.
    AUTHORITY-CHECK OBJECT 'ZPRCHK_NEW' :
                      ID 'YFIINICD' FIELD SY-TCODE.
      IF SY-SUBRC NE 0.
        MESSAGE I000(yFI02) with SY-TCODE .
        LEAVE PROGRAM.
      ENDIF.
    class screen_init definition create private.
    Public section
      public section.
        class-methods init_screen.
        methods constructor.
    Private section
      private section.
        data: container1 type ref to cl_gui_custom_container,
              container2 type ref to cl_gui_custom_container,
              tree type ref to cl_gui_simple_tree.
        methods: fill_tree.
    endclass.
    Class for Handling Events
    class screen_handler definition.
    Public section
      public section.
        methods: constructor importing container
                   type ref to cl_gui_custom_container,
                 handle_node_double_click
                   for event node_double_click
                   of cl_gui_simple_tree
                   importing node_key .
    Private section
      private section.
    endclass.
    *&                        Classes implementation
    class screen_init implementation.
    *&                        Method INIT_SCREEN
      method init_screen.
        data screen type ref to screen_init.
        create object screen.
      endmethod.
    *&                        Method CONSTRUCTOR
      method constructor.
        data: events type cntl_simple_events,
              event like line of events,
              event_handler type ref to screen_handler.
        create object: container1 exporting container_name = 'CUSTOM_1',
                       tree exporting parent = container1
                         node_selection_mode =
                cl_gui_simple_tree=>node_sel_mode_multiple.
        create object: container2 exporting container_name = 'CUSTOM_2',
        event_handler exporting container = container2.
    event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
        event-appl_event = ' '.   "system event, does not trigger PAI
        append event to events.
        call method tree->set_registered_events
             exporting events = events.
        set handler event_handler->handle_node_double_click for tree.
         call method: me->fill_tree.
      endmethod.
    *&                        Method FILL_TREE
      method fill_tree.
        data: node_table type table of abdemonode,
              node type abdemonode.
    types:    begin of tree_node,
              folder(50) type c,
              tcode(60) type c,
              tcode1(60) type c,
              tcode2(60) type c,
              text(60) type c,
              text1(60) type c,
              text2(60) type c,
              end of tree_node.
      data:  wa_tree_node type tree_node,
                t_tree_node type table of tree_node.
    wa_tree_node-folder = text-001.
    wa_tree_node-tcode  = text-002.
    wa_tree_node-text =  'Creditors ageing'.
    wa_tree_node-tcode1 = text-003.
    wa_tree_node-text1 =  'GR/IR aging'.
    wa_tree_node-tcode2 = text-004.
    wa_tree_node-text2 =  'Bank Balance'.
    append wa_tree_node to t_tree_node.
    clear wa_tree_node .
    wa_tree_node-folder = text-005.
    wa_tree_node-tcode  = text-006.
    wa_tree_node-text =  'Creditors ageing'.
    wa_tree_node-tcode1 = text-007.
    wa_tree_node-text1 =  'Creditors ageing'.
    wa_tree_node-tcode2 = text-008.
    wa_tree_node-text2 =  'Creditors ageing'.
    append wa_tree_node to t_tree_node.
    clear wa_tree_node .
    wa_tree_node-folder = text-009.
    wa_tree_node-tcode  = text-010.
    wa_tree_node-text =  'Creditors ageing'.
    wa_tree_node-tcode1 = text-011.
    wa_tree_node-text1 =  'Creditors ageing'.
    wa_tree_node-tcode2 = text-012.
    wa_tree_node-text2 =  'Creditors ageing'.
    append wa_tree_node to t_tree_node.
    clear wa_tree_node .
    node-hidden = ' '.                 " All nodes are visible,
        node-disabled = ' '.               " selectable,
        node-isfolder = 'X'.                                    " a folder,
        node-expander = ' '.               " have no '+' sign forexpansion.
        loop at t_tree_node into wa_tree_node.
          at new folder.
            node-isfolder = 'X'.                      " a folder,
            node-node_key = wa_tree_node-folder.
                   clear node-relatkey.
            clear node-relatship.
            node-text = wa_tree_node-folder.
            node-n_image =   ' '.
            node-exp_image = ' '.
            append node to node_table.
          endat.
         at new tcode .
            node-isfolder = ' '.                          " a folder,
            node-n_image =   '@CS@'.       "AV is the internal code
            node-exp_image = '@CS@'.       "for an airplane icon
            node-node_key = wa_tree_node-tcode.
             node-text = wa_tree_node-text .
                     node-relatkey = wa_tree_node-folder.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
          endat.
          append node to node_table.
        at new tcode1 .
            node-isfolder = ' '.                          " a folder,
            node-n_image =   '@CS@'.       "AV is the internal code
            node-exp_image = '@CS@'.       "for an airplane icon
            node-node_key = wa_tree_node-tcode1.
                     node-relatkey = wa_tree_node-folder.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
              node-text = wa_tree_node-text1.
         endat.
          append node to node_table.
           at new tcode2 .
            node-isfolder = ' '.                          " a folder,
            node-n_image =   '@CS@'.       "AV is the internal code
            node-exp_image = '@CS@'.       "for an airplane icon
            node-node_key = wa_tree_node-tcode2.
                     node-relatkey = wa_tree_node-folder.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
            node-text = wa_tree_node-text2.
         endat.
          append node to node_table.
        endloop.
        call method tree->add_nodes
             exporting table_structure_name = 'ABDEMONODE'
                       node_table = node_table.
      endmethod.
    endclass.
    *&                        Class implementation
    class screen_handler implementation.
    *&                        Method CONSTRUCTOR
      method constructor.
       create object: HTML_VIEWER exporting PARENT = CONTAINER,
                      LIST_VIEWER exporting I_PARENT = CONTAINER.
      endmethod.
    *&                 Method HANDLE_NODE_DOUBLE_CLICK
      method handle_node_double_click.
      case node_key(12).
    when 'Creditors'.
    submit YFIIN_REP_CREADITORS_AGING  via selection-screen and return.
    when  'Vendor'.
    submit YFIIN_REP_VENDOR_OUTSTANDING  via selection-screen and return.
    when 'Customer'.
    submit YFIIN_REP_CUSTOMER_OUTSTANDING  via selection-screen and
    return.
    when 'GR/IR'.
    submit YFIIN_REP_GRIR_AGING  via selection-screen and return.
    when 'Acc_Doc_List'.
    submit YFIIN_REP_ACCOUNTINGDOCLIST  via selection-screen and return.
    when 'Bank Bal'.
    submit YFIIN_REP_BANKBALANCE  via selection-screen and return.
    when 'Ven_Cus_Dtl'.
    submit YFIIN_REP_VENDORCUST_DETAIL via selection-screen and return.
    when 'G/L_Open_Bal'.
    submit YFIIN_REP_OPENINGBALANCE via selection-screen and return.
    when 'Usr_Authn'.
    submit YFIIN_REP_USERAUTHRIZATION via selection-screen and return.
    endcase.
      endmethod.
    endclass.
    Program execution ************************************************
    load-of-program.
      call screen 9001.
    at selection-screen.
    Dialog Modules PBO
    *&      Module  STATUS_9001  OUTPUT
          text
    module status_9001 output.
      set pf-status 'SCREEN_9001'.
      set titlebar 'TIT_9001'.
      call method screen_init=>init_screen.
    endmodule.                 " STATUS_9001  OUTPUT
    Dialog Modules PAI
    *&      Module  USER_COMMAND_9001  INPUT
          text
    module user_command_9001 input.
    endmodule.                 " USER_COMMAND_9001  INPUT
    *&      Module  exit_9001  INPUT
          text
    module exit_9001 input.
    case sy-ucomm.
    when 'EXIT'.
      set screen 0.
    endcase.
    endmodule.
            exit_9001  INPUT

    you can read  the table node_table with nody key value which imports when docubble click the the tree node (Double clifk event).
    Regards,
    Gopi .
    Reward points if helpfull.

  • Tree component and loading xml files into text field

    Hello and thank you for taking the time to read my issue....
    I am making a simple self help application.  I have a tree component that loads the different catagories and topics for my help app dynamically via an xml file...no issues there.
    I then want it so that when the user cliecks on the actual topic that the TextArea component will load the info from another xml file using the name of the topic as the name of the xml file to make it that much easier for anyone to maintain this program.
    So far the code i have is this.
    myTreeListener.change = function(eventObject)
        var theSelectedNode = eventObject.target.selectedNode;
        var theSelectedNodeLabel = theSelectedNode.attributes.label;
        topicTextArea.text +=
    I am a little fuzzy when it comes to loading the xml file in.  Should i be loading html instead of xml is my other question as well?
    Thanks in advance for your help
    FG

    Check out the Oracle XDB Developer's Guide, Chapter 3. There is an example of using BFileName function to load the xml files from a directory object created using create or replace directory. It works really well.
    Ben

  • How to put text line just for a moment ?

    Hi,
    Do you know how to put a text line  just  for one photo? I mean I have more photos  in one portfolio but i need the text line to be seen just for one photo for the others no.
    Thank you in advance.

    You can use composition for this , where you can insert text frame for that specific photo where you want to add some description and for rest dont use text frame.
    Thanks,
    Sanjit

Maybe you are looking for

  • Upgraded to snow leopard, now safari scrolls a page down when space bar is hit and sometimes crashes.  Any ideas for a fix?

    I just upgraded to the new snow leopard, now my Safari is acting loopy.  At times, the page will scroll down when I hit the space bar.  As I type this discussion the screen isn't paging down, but if I go to the tab where I have facebook loaded and hi

  • Unable to Install 10.4.10 on External Hard Drives

    I have an iMac 24" 2.8 GHz Intel Core 2 Duo and I have been trying to install OS X 10.4.10 on to any of the 5 external hard drives I have so that I can boot from them as an alternative to booting from the internal hard disk. When I boot from the Mac

  • Problem with Mavericks 10.9.1 e Java Se 7  u 45

    Java SE 7 no longer works. Message in console: 07/01/14 10:59:09,221 java[1172]: objc[1172]: Class JavaLaunchHelper is implemented in both /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java and /Library/Internet Plug-Ins/JavaAp

  • ITunes comes up with an error message

    When I go to start iTunes a popup comes up, it says ' iTunes has encountered a problem and needs to close'. It gives the option to send an error report to Windows. What can i do? Someone please help. I've tried reinstalling iTunes and turning off nor

  • Pdf files will not open upon downloading

    I download a lot of pdf docs for work and want them to open automatically upon download so I can screen them.  Since upgrading to Safari 5.1, when I download files (which has gotten much more cumbersome) they do not automatically open upon download.