How to use the action OnExpandAll on UI element Tree

Hi, experts .
I am in WDA developing project and developing the screen which has Tree .
I want to expand all nodes when users click the button on the head of Tree .
I copied the application `WDT_TREE` and created Tree of my application successfully .
And I created the action OnExpandAll on my Tree and tried to create the function to expand all nodes .
But I do not know how to use the action OnExpandAll .
I can see the button to start action OnExpandAll on the head of Tree .
I am trying to write logic in the action . But it does not work successfully .
(In my tree , when I click the button for OnExpandAll , all nodes are outputted on root node .
Because my logic is wrong ... )
Please give me any hints .
Masao

Hi
As your case it is a recursive node.
then you have to create method and call it recursively for the expanall functionality.
do it like this.
create an attribute the node FOLDER
name = 'ISEXPANDED'
type = WDY_BOOLEAN.
Now bind the property expanded of treenode FOLDER UI to this attribute.
now go to the methods tab and create one method say name ZEXPANDALL.
in thsi method make one importing parameter of type ( type ref to ) if_wd_context_node. and name NODE.
then write the following code in this method.
method ZEXPANDALL .
DATA ELT TYPE WDR_CONTEXT_ELEMENT_SET.
DATA EL TYPE REF TO IF_WD_CONTEXT_ELEMENT.
data nd type ref to if_wd_context_node.
data nds type WDR_CONTEXT_CHILD_MAP.
data chld type wdr_context_child.
data nf type ref to if_wd_context_node_info.
data name type string.
ELT = node->GET_ELEMENTS( ).
LOOP AT ELT INTO EL.
  EL->SET_ATTRIBUTE(
  NAME = 'ISEXPANDED'
  VALUE = ABAP_TRUE
  data parent_key type string.
EL->get_attribute( exporting name = 'TEXT' importing value
= parent_key ).
* create the child nodes
    create_node(
      exporting
        cur_element = EL
        parent_key  = parent_key ).
nds = el->get_child_nodes( ).
loop at nds into chld.
  nd ?= chld-node.
  nf = nd->get_node_info( ).
name  = nf->get_name( ).
if name eq 'FOLDER'.
  zexpandall(                             "recursive call
  nd
endif.
  endloop.
  ENDLOOP.
endmethod.
NOw go to your eventhandler created for action expandall.
there write the following code.
method ONACTIONEXPANDALL .
DATA lo_nd TYPE REF TO if_wd_context_node.
  lo_nd = wd_context->get_child_node( 'FOLDER' ).
  ZEXPANDALL( lo_nd ).
endmethod.
thats it.
Thanks
sarbjeet singh

Similar Messages

  • How to use the "Actions" in Photoshop Elements 11

    I am wanting to use the "Actions" in Photoshop Elements 11.  But when I get the actions box up, it is only showing a small list of effects to use.  The tutorials I have checked into all show a very long list of actions. When I click on the little arrow and click on "load actions", I am getting nothing. Everything is blank.  It says "No items match your search."  Please help! 

    To use the existing actions, try the following:
    1. Open one of the Action Sets, in this example Special Effects is the Action Set, by pressing the small arrow beside the set name.
    2. Then click on the name of the Action, in this example Faded Ink is the Action name.
    3. Then press the Play button to run the action.

  • How to use the Rolling Edit in Premiere Elements 9?

    Hi there,
    I can't seem to find the rolling edit option in Premiere Elements 9. Is it still in the program or is it removed? And while we're at it, are the slip and the slide edit still in there?
    Thanks,
    Ronald

    Hi Steve,
    Yes, if I have two clips or images beside each other on the timeline, the rolling edit will allow me to simultaneously move the cut point of the first clip and the start point of the 2nd clip by moving the (single) cursor forward or backwards.
    This was in Premiere in the past.

  • How to use the cases in button action?

    Hi Experts,
    I want to get a prompt message if the field is empty.I got it but at the same time if the field is filled I want the other action to be performed that is to call a BAPI and give me output.How can I give two events for the same action.
    How to use the cases in button action?
    So, please guide me.Urgent need
    Regards
    Nutan

    Hi Nutan,
    if I understand you, then you have a simple validation. Therefore you can use the validation functionality of VC for your components. An alternative could be by writing a new ABAP RFC function module like:
    BAPI Input parameters as input and BAPI output parameters as output and an additional return code or string for a message:
    IF I_FIELD IS INITIAL.
      E_RETURN_CODE = "THE FIELD IS EMPTY."
    ELSE.
      CALL FUNCTION <YOUR_BAPI>
      <BAPI PARAMETERS>
    ENDIF.
    I hope that helps.
    Best Regards,
    Marcel

  • How hard is it to use javascript to show/hide fields. Is it easier to use the action builder?

    I know nothing about javascript and all that ive been using so far has been stuff ive found on here (thank you everyone).
    Using the action builder seems like its gonna be very tedious to do since i have so many subforms that hide, would it be esier to use javascript?

    I know nothing about javascript myself but I just created a form with about 10 different subform that show or hide depending on what the user chooses from a drop down list and I used Action Builder. If we don't know javascript, how can we use it? But Action Builder did a fine job of hiding/showing wherever I needed it. And Action Builder can do more than one thing by clicking that + sign when you are building an action.
    For instance, I needed to place a button in each subform that would close both the field that the person was working in and also the subform on the next page where the information was going into floating fields in a text block that was only visible thru a drop down list text select. I could have never figured out how to do that based on my knowledge of javascript. Thank Adobe for including Action Builder in this version of LiveCycle and I use it all the time. I find it extremely easy to use but it takes a little mental training to think thru the steps of how you can use the menu in Action Builder to make your form do what you need it to do.
    And if all else fails, ask this forum. I struggle for just so long before I come here and ask for help. I always get the answer I need. I hope you will too.
    Good luck,
    Jeanette

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • Follow up task without using the action profile

    Hi,
    Is it possible to create the follow up task without using the action profile? If so, please let me know how we can do that?
    as per the requirements, i have to the custom coding that will automatically create follow-on task triggered by status change on the all the transaction type. Please guide me how can we do that.
    Task details (task id, description), I'm reading it from the custom table.
    Thanks for your help.
    Regards,
    Vaibhav

    Thanks Naresh for the response.
    Not sure if I can use the CRMV_EVENT. Even I'm not aware how to use that. Let me tell what i am doing in the logic.
    - implementing the logic in the badi order_save (method - CHECK_BEFORE_SAVE)
    - get the header and item details using the FM CRM_ORDER_READ.
    - get the status of header / item from the output of CRM_ORDER_READ.
    - compare the status with the custom table (having info of hearder type, item type, status, tast id, task description etc)
    - if status is different, create the task using the details from the custom table.
    now i want to write the logic to implement the last step. Do we have any standard FM where I can pass the task ID and it will create the task? Please help.

  • How to use the table maintenance events for validating the input entries..?

    Hi,
    I have created a Z table with 6 fields in which all are KEY fields. All are of CHAR type. I have created the Table Maintenance Generator for the same. While maintaining the entries in the table, even though I maintain a blank entry for a field it is saving the entry. But, I don't want that way. All the fields are mandatory in my table. One should enter all the fields. Otherwise it should not allow to save the entry. So, I think it can be done using the Table Maintenance Events. can someone tell me how to use the Table Maintenance Events. and which event to use for my reuqirement and what is the logic to be written.
    Or Is there any other way to solve my problem.
    Please share your inputs. Thanks in advance.
    Best regards,
    paddu.

    In the table maintenance generator, Environment --> Modifications --> Events then a screen will be appear here,we need to create the Events.In the EVENTS screen, press new Entries, there give 01(Before Saving the Data in the Database) and give a name(This will become a PERFORM), then click the Editor pushbutton, this will be there at the right side of the entry, then a popup will be appear, you can create an include program, there inside of the include program write ur code.
    Here is documentation for Event 01(Before Saving the Data in the Database )
    Event 01: Before Saving the Data in the Database
    Use
    This event occurs before new, changed or deleted entries are written to the database. Other activities can be performed, for example:
    hidden entry processing
    fill hidden fields
    flag data to be written to hidden tables after the database change.
    To have the changes saved by the central maintenance dialog routines, SY-SUBRC must be set to 0 at the end of the routine.
    Realization
    This event has no standard routine. The following global data is available for the realization of the user routine:
    internal table TOTAL
    field symbols
    field symbols <ACTION> and <ACTION_TEXT>
    <STATUS>-UPD_FLAG
    If internal table data are to be changed before saving, t he changes should be made in both the internal table TOTAL and in the internal table EXTRACT.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM.
    Regards,
    Joy.

  • How to use the different class for each screen as well as function.

    Hi Experts,
    How to use the different class for each screen as well as function.
    With BestRegards,
    M.Thippa Reddy.

    Hi ThippaReddy,
    see this sample code
    Public Class ClsMenInBlack
    #Region "Declarations"
        'Class objects
        'UI and Di objects
        Dim objForm As SAPbouiCOM.Form
        'Variables
        Dim strQuery As String
    #End Region
    #Region "Methods"
        Private Function GeRate() As Double
                Return Double
        End Function
    #End Region
    Public Sub SBO_Appln_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
            If pVal.BeforeAction = True Then
                If pVal.MenuUID = "ENV_Menu_MIB" Then
                End If
            Else ' Before Action False
                End If
        End Sub
    #End Region
    End Class
    End Class
    Rgds
    Micheal
    Vasu Anna Regional Feeling a???? Just Kidding
    Edited by: micheal willis on Jul 27, 2009 5:49 PM
    Edited by: micheal willis on Jul 27, 2009 5:50 PM

  • How to use same actions for differ pop-up

    Hi gurus,
    I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
    But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
    Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
    Plz sugges me.
    <b>Points will be sured.</b>
    Sanket sethi

    Hi,
    Take one integer value attribute in the context of view
    when you r performing action on POP1 set it's value to 1
    when you r performing action on POP2 set it's value to 2
    create one method which receives integer argument, say diaplay(int a)
    In the action call display(wdContext.currentContextElement().get<intvariable>()) by passing the value in the context attribute
    in display() method, Check the value of integer variable..
    if it is 1 then perform action related to POP1
    if it is 2 then perform action related to POP2
    Regards
    LakshmiNarayana

  • How to use same actions for differ pop-up buttons

    Hi gurus,
    I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
    But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
    Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
    Plz sugges me.
    <b>Points will be sured.</b>
    Sanket sethi

    Hi ,
    u can use the method SUBSCRIBE_TO_BUTTON_EVENT of the IF_WD_WINDOW interface ... to handle the event fired by the popup .....used this method after creating the popup window ...
    regards
    Yash

  • How to use the separate symbol in the text field in the adobe form.

    Hi,experts,
    I don’t know how to use the separate symbol to make a paragraph separate into several lines correctly in the text field in the adobe form.
    Action:
    1. config the ADS successfully.
    2. create the adobe form with a mult-line textfield(binding the 'remark' context in the interface of the form) using sfp.
    3. create a WDA for invoke the form and transfer the 'remark' context data.
    I use the following codes to display the paragraph in the PDF document:
    CONCATENATE
    '1&#12289;aaaaaaaaaaa&#65307;'
    '2&#12289;bbbbbbbbb '
    '3&#12289;ccccccccccc'
    '4&#12289;ddddddddd'
    INTO remark .
    lo_nd_z_hr_php_payslip->set_attribute(
    EXPORTING
    name = `REMARK`
    value = remark ).
    But I found all the content aren't paragraph separate correctly in the text field in the adobe form when I run the WDA.
    Could you please give me some hints to make the paragraph separate correctly in PDF document? Thanks a lot in advance!
    My email is : [email protected]
    Best regards,
    Tao
    Edited by: wang tao on Apr 8, 2008 1:58 AM

    Hi,
    If it is just a one word value then you could use this in the exist event;
    this.rawValue    
    = util.printx(">?<*",this.rawValue);
    This changes the first character (represented by the ?) to uppercase (represented by the >) and all trailing characters (represented by the *) to lowercase (represented by the <).
    If you wanted something more general ... if they could also enter a middle name then you could call a function like;
    function        toTitleCase(textValue)
      return  textValue.toLowerCase().replace(/\b[a-z]/g, function replacer(match) { return match.toUpperCase(); });
    This uses a regex to change all lowercase letters following a word boundary to uppercase.
    Bruce

  • How to use the separate symbol in the textfield in adobe form?..urgent

    Hi,experts,
    I don’t know how to use the separate symbol to make a paragraph separate into several lines correctly in the text field in the adobe form.
    Action:
    1. config the ADS successfully.
    2. create the adobe form with a mult-line textfield(binding the 'remark' context in the interface of the form) using sfp.
    3. create a WDA for invoke the form and transfer the 'remark' context data.
    I use the following codes to display the paragraph in the PDF document:
    CONCATENATE
    '1&#12289;aaaaaaaaaaa&#65307;'
    '2&#12289;bbbbbbbbb '
    '3&#12289;ccccccccccc'
    '4&#12289;ddddddddd'
    INTO remark .
    lo_nd_z_hr_php_payslip->set_attribute(
    EXPORTING
    name = `REMARK`
    value = remark ).
    But I found all the content aren't paragraph separate correctly in the text field in the adobe form when I run the WDA.
    Could you please give me some hints to make the paragraph separate correctly in PDF document? Thanks a lot in advance!
    My email is : [email protected]
    Best regards,
    Tao
    Edited by: wang tao on Apr 8, 2008 2:05 AM
    Edited by: wang tao on Apr 10, 2008 10:29 AM
    Edited by: wang tao on Apr 11, 2008 5:29 AM

    With the pen tool in Indesign, is there a way of making the points not join if you want to make a few single lines?

  • How to use the POST method In Oracle APEX 3.1

    Hi,
    In APEX if we are submitting the page the parameters( Variables ) will pass through URL.
    How to hide the these parameters from URL??
    I Hope POST method will solve this problem.
    How to use the POST method in APEX???
    Help me out to solve this problem.
    thanks in advance.
    Cheers,
    Shan

    In APEX if we are submitting the page the parameters( Variables ) will pass through URL.No they won't. Submission POSTs the <tt>wwv_flow</tt> form.
    Sometimes a branch may be performed after submission, generating a URL in which parameter values are visible. To avoid this, use the save state before branching option.
    Other actions&mdash;like using navigation lists, or clicking a link in a report&mdash;will perform a GET using parameters in the URL. In these cases using Session State Protection is advised.

  • I'm wanting to use the "Actions" in Photoshop Elements 11.  But when I get the Actions box up, it is only showing a small list of effects to use.  And no side bar to go any further.  When I click on the little arrow at top and then click on "load actions"

    I'm wanting to use the "Actions" in Photoshop Elements 11. But when I get the actions box up, it is only showing a small list of effects to use. And no side bar. So I can't go any further.  When I click on the little arrow at top and click on "load actions", I am only getting a box with empty space saying "No items match your search".  The folder at the top does say "Actions".  How do I get more effects?  The tutorials that I've checked into all show a long list of effects in their box.  Can anyone help? 

    To use the existing actions, try the following:
    1. Open one of the Action Sets, in this example Special Effects is the Action Set, by pressing the small arrow beside the set name.
    2. Then click on the name of the Action, in this example Faded Ink is the Action name.
    3. Then press the Play button to run the action.

Maybe you are looking for

  • Iphoto just lost my last import of pictures, how can i get them back?

    Uploaded my pictures on iphoto, when I went to add location to them, iphoto crashed, and i had deleted them fr0m my scan disk card. Help how can I get them back. Patty Asadoriar <Edited By Host>

  • How to develop Ping Service in Oracle Service Bus

    Hi all, I want to develop a ping service in OSB which will ping all the End-point URLs and Databases ( i.e It will do the health check of the end point URLs ) . when it is found any End Point URL is not reachable it should shutdown all the Osb Projec

  • Can't install OS 10.4.6 on my imac 5.1 with the install dvd.

    I borrowed the install disk from a friend and tried to format the HD and start up from the new OS but it doesn't work. Is the disk specific to my friend's computer or is my computer too old to support the new OS? How can I format and start up my comp

  • ISE - What happens when the on-boarded certificate expires?

    I'm trying to design a good BYOD deployment model but have a few questions that need direct answers.  I have down how to go about on-boarding and getting a certificate on a device, the ISE provides great flow for this to happen in many ways.  My ques

  • DVD Markers in FCP 3

    I had heard that one could put DVD markers in a project in FCP 3, and then drop that project into iDVD (I am in iDVD 4) and that program would be able to read them and add them to the DVD menu. Is this true...? Best, Evan Jacobs Message was edited by