How to handle MANY buttons?

hi!
lets say i create n buttons..
i need a function (i bet it has to be only one) that handles
all of them.. for example onClick it will trace "u've pressed the
10th button" or will open the "10thpage.swf" .. it doesnt matter..
i nned to know how to get the id of the one button i pressed..
i tried trace(event.target.name); and i expected to get u've
pressed but[10] or something like that.. but all i get is the
components of that button i pressed: like buttonBckgMC, or
buttonTextField, or buttonSelectionMC
thank you!

evt.target.id should work fine if everything is defined (like
text and you have a MenuButton class that contains a textfield name
text).
you might want to use currentTarget instead of target, in
case your buttons overlap.

Similar Messages

  • How to handle Back button, Browser Refresh problem at server side.

    Hi Friends,
    How to handle Back button, Browser Refresh problem at server side in java?.
    I am able to trace that,
    request.getHeader("ACCEPT") is returning value- */*
    when the browser was refreshed and returning different MIME types
    for all other actions from browser.
    I have doubt, will the above solution works always for all servers,browsers?.
    Please also specify any solution to handle back button at server side?.
    Thanks in Advance.
    Venkat..

    I'm sorry I don't think tht's the right solution for
    the above question....
    We must be aware that whatever scripting methdologies
    we either javascript/vbscript would executed @
    client(browser) side not @ server side....
    Dud If U get a good solution keep me updated.....
    THANKS & REGARDS,
    RAHULMy dear friend ...
    the bad news is that u simply cant disable or add any listener to the back button of the browser.
    When u hit the back button of ur browser the URL gets re-executed. So in case u have a JSP then the history.forward() is the best solution. [only if the page doesnt get expired similar to secure https sites]
    Now dont say that user can have javascript disabled ...those users will have a pretty touch time browsing websites since javascripts r used extensively by almost all websites.
    But in case u have an action.do or servlet call then u need to manage it using a session variable since the request will be sent to the server rather than client.
    For multiple form submittion issues read the following article in javaworld...
    Client vs. server solutions
    Different solutions can solve this multiple form submission situation. Some transactional sites simply warn the user to wait for a response after submitting and not to submit twice. More sophisticated solutions involve either client scripting or server programming.
    In the client-only strategy, a flag is set on the first submission, and, from then on, the submit button is disabled based on this flag. While appropriate in some situations, this strategy is more or less browser dependent and not as dependable as server solutions.
    For a server-based solution, the Synchronizer Token pattern (from Core J2EE Patterns) can be applied, which requires minimal contribution from the client side. The basic idea is to set a token in a session variable before returning a transactional page to the client. This page carries the token inside a hidden field. Upon submission, request processing first tests for the presence of a valid token in the request parameter by comparing it with the one registered in the session. If the token is valid, processing can continue normally, otherwise an alternate course of action is taken. After testing, the token resets to null to prevent subsequent submissions until a new token is saved in the session, which must be done at the appropriate time based on the desired application flow of control.
    for more details refer :
    http://www.javaworld.com/javaworld/javatips/jw-javatip136.html
    Hope u got the idea.
    FYI I have been using both these ideas in my credit card payment gateway project. This concept has worked really well.

  • How to handle radio-buttons in FB05  bdc????

    How to change Additional selections radio-button from none to Document numbers in CALL TRANSACTION BACKGROUND MODE..............................................
    Edited by: Raghavender Poosarla on Apr 8, 2008 10:32 AM

    I have BDC requirement of FB05 transaction... I am stuck at one point where this recordin is working in Foreground mode and not in Backgroung mode...The reason being there is a bit in which I am selecting a readio-button from value 'NONE' to 'Document numbers' WHICH IS HAPPENING IN FOREGROUND AND NOT IN BACKGROUND ....Can any one tell is there any special way for handling radio-buttons in recording of an transaction???

  • How to handle Back button in IA06 BDC

    Hi all,
    I am calling IA06 inspection screen for an task list operation using BDC from my custom program. on this screen user can change the SAP data. if I save the task list then it's working fine.
    But I have one issue how to control back button, when user make any changes on this screen and click on back button because it calls all the previous screens which i skipped using BDC.
    Or for this particular functionality there is any Function module same as for Characterstics as "CLFM_OBJECT_CLASSIFICATION"
    Please advice.
    Thanks,
    Sanket Sethi

    Hi all,
    Please suggest if there is any function module/ API  to call Task list characteristic screen directly; same as for Task list classification screen using Function module CLAF_CLASSIFICATION_OF_OBJECTS.
    Thanks,
    Sanket Sethi

  • How to handle enter button in Jdevloper

    hi all,
    Is there any code to handle ENTER button,
    Thanks

    I'd be really cautious here.
    I read "self service pages" and immediately thought "Oracle E-Business Suite, OA Framework"
    If that's the case, I suggest you post on the OA Framework forum. If you're talking about ADF Faces, then Didier has pointed you in the proper direction.
    Regards,
    John

  • How to handle a button double click

    I know how to define and IBAction and link it to a control by (Click-Drag)ing.
    But that does not make me chose what action (event for x-Microsoft) in the control am I linking to.
    By other words, when I click-drag, I dont mention, anywhere that I want this action to be linked to the "Click" event of a button. So what if I want this action method to be called when a button is double clicked for example, or when the mouse moves over it.
    Thanks

    Hi Tony, and welcome to the Dev Forum!
    The good news is Apple provides thorough documentation on tracking, interpreting and handling Cocoa mouse events. The bad news is the info is carved into pieces that are scattered all over the library. The challenge is to identify the docs that contain one or more pieces of the puzzle, and then to fit everything together.
    As to double clicks, there's no NSControl equivalent to the double-click notification that many Windows controls send (e.g. BN_DOUBLECLICKED). Also, as you've seen, when connecting an event to an action method in IB, there's only one event to choose from (Cocoa Touch is different in this regard, btw. You'll have a choice of several events when connecting a UIControl object to an action method in IB, though "double-touch" isn't among them).
    So how do Cocoa programmers detect a double click in, for example, an NSButton? The default action message for this class is generated by a NSLeftMouseUp event. I.e. when the left button is released while the control is tracking the cursor.
    One crude but effective solution is to have the listener (the action method connected to the button) set an ivar and start a one-shot timer on the first message. If a second message is received before the timer method resets the ivar, we have a double click. Otherwise we have two single clicks.
    A more general solution is based on two methods you might easily overlook. Firstly, [setContinuous:|http://developer.apple.com/mac/library/documentation/Cocoa/Refe rence/ApplicationKit/Classes/NSCellClass/Reference/NSCell.html#//appleref/doc/uid/20000074-BBCCCEAA] allows you to configure the associated NSActionCell object to send a stream of messages to the button's target instead of just one. The stream starts with the mouse down event that initiated tracking and ends with the mouse up that ends tracking (also see [trackMouse:inRect:ofView:untilMouseUp:|http://developer.apple.com/mac/library/ documentation/Cocoa/Reference/ApplicationKit/Classes/NSCellClass/Reference/NSCell.html#//appleref/doc/uid/20000074-BBCCJAFJ]).
    The next piece of the puzzle is the [currentEvent|http://developer.apple.com/mac/library/documentation/Cocoa/Refere nce/ApplicationKit/Classes/NSApplicationClass/Reference/Reference.html#//appleref/occ/instm/NSApplication/currentEvent] method of NSApplication. This returns the NSEvent object the started the current event cycle, i.e., the event which caused NSButton to send the current action message.
    Thus the listener has access to the stream of event objects which represents the mouse activity from the start of tracking to the end. Using the position and time stamp data from this stream, the listener can distinguish between clicks and drags (hovering is detected differently; I won't try to cover that topic in this post).
    A couple reference links that might help with the rest of the puzzle:
    [Handling Mouse Events|http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Ev entOverview/HandlingMouseEvents/HandlingMouseEvents.html#//apple_ref/doc/uid/100 00060i-CH6-SW1]
    [Control and Cell Programming Topics for Cocoa|http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Con trolCell/ControlCell.html#//apple_ref/doc/uid/10000015i]
    Hope that helps!
    \- Ray

  • How to handle the button "cancel" in a dialog box for displaying views?

    Hello!
    I ve a question about handling the cancel button in a dialog box for displaying views.
    I ve already implemented the dialog box by using the following code:
    METHOD eh_onnewqact.
      DATA stitle TYPE string.
      IF m_popup IS BOUND.
        stitle = cl_bsp_runtime=>get_otr_text( alias = 'ZCC_ICRM/NEW_TASK' )."cl_wd_utilities=>get_otr_text_by_alias( 'ZCC_ICRM/NEW_TASK' ).
        m_popup = comp_controller->window_manager->create_popup(
          iv_interface_view_name = 'ZCC_POPUP_NEWBT/NewQActWindow'
          iv_usage_name = 'CUNewQAct'
          iv_title = stitle
        CALL METHOD m_popup->set_on_close_event
          EXPORTING
            iv_view       = me
            iv_event_name = 'NEWQACT_POPUP_CLOSED'.
      ENDIF.
      m_popup->open( ).
    ENDMETHOD.
    My dialog box consists two buttons - cancel and create.
    The cancel buttons should close the popup and the create button should create an entity of a specified object. but let us come to the cancel button. I did´nt find any information about implementing an cancel button. So, how should I implement it? I thougt
    me->close( ). But that didnt works!
    Could u give me further information about that, because my cancel event-handler is empty?
    method EH_ONCANCEL_QACT.
    endmethod.
    After that I would know how my calling view could know that the user pushes the Create Button and how the data of 2 inputfields of the dialog box finds their way to the calling view in order to process this data there?
    Thank you very much!

    Hi Michael,
    thank you for your advice! This problem is solved...
    ...but I have another issue. Ive implemented 2 editable fields in my popup. The user should fill that fields with context and that context should be processed in the calling view of my popup.
    My question is how to transfer these information from my popup to my calling view or method?
    I tried the following...
          lv_context_node ?= m_popup->get_context_node( 'QUICKACT' ).
          IF lv_context_node IS NOT INITIAL.
            lv_text = lv_context_node->get_date( attribute_path = '' ).
          ENDIF.
    But it doesnt work! The context node object is always empty/initial.
    Thank you!
    PS: Another possibility could be that the object / node of the calling view is transferred to the pop-up in order to process it there.
    Edited by: Marcus Findeisen on Feb 22, 2011 12:13 PM

  • How to handle OK button in faces error message

    Hi everyone,
    Iam using Jdev 11.1.2.0. I have a scenario where faces error message will be displayed . After clicking ok button, some validation should be done . If iam using popup with dialog, i can handle my requirement using java script but now my scenario is with faces message . Kindly suggest me how to get hook for the button OK in faces message. Thanks in advance.
    Regards
    Alekhya

    As Frank said, it does not allow customization.Instead of Faces message you can use an popup with dialog.use dialog listener in ok button
    like
    public void dialogListener1(DialogEvent dialogEvent) 
        if (dialogEvent.getOutcome() == DialogEvent.Outcome.ok)
         // write your custom code for ok event
        } else
          // write your custom code for cancel event
    read more on http://www.techartifact.com/blogs/2013/03/handling-ok-and-cancel-button-in-afdialog-using-popup-in-oracle-adf-by-dialogl…

  • How to handle advance button on LOV popup

    HI,
    I have implemented framework classes to get the handle of search button of inputlistofvalues pop up window.
    Now i want to perform advance search with different type of operator.
    Can anybody tell me how can i archive it.
    Thanks in Advance

    Hi,
    you get a handle to a LOV button. And this is all we know. What you really want to do is not mentioned in your post. You don't mention the JDeveloper version and you don't mention the usecase
    Frank

  • How to handle Many-to-Many tables

    I have table_1 with a primary key, x
    I have table_2 with primary key y
    Table_3 represents the many-to-many relationship between table_1 and table_2, and has a primary key x,y.
    Okay - so I know how to set up master detail forms for table_1 and for table_2, but what type of form do I use for table_3? I want to use the primary key of table_1 as an item (:pagenum_x, I guess) and then select from a drop-down list for key y.
    I am am newbie, so if this is somewhere in the documentation (I can't find it after a few days trying), just tell me to keep looking. :)
    Norm

    Vojin,
    Thanks for the reply. It helps to have some corroboration when these types of issues come up.
    I can create regions or pages that handle the associations, but it seems as though I am fighting or fooling the product (APEX) to do so. Maybe adding the rowid with a sequence / trigger will simplify the design.
    Thanks,
    Norm

  • How to handle many tables in ERD

    Hi:
    I have a schema with about 400 tables in it. They tend to be grouped into 5-10 groups of related tables. In a perfect world, I'd be able to arrange them in an ERD diagram and zoom into the appropriate area when I want to work on that section but I wouldn't have to recreate the arrangement of the tables in the diagram. I'm not aware that OWB can do this. I don't even think it can save the diagram as anything but SVG, which means every time I want to work an ERD I have to recreate it? I have to select all the tables, maximize them, arrange them each time?
    How do people normally handle hundreds of tables in OWB? Do you break the large schema up into numerous smaller source schemas and only end up with the large schema after deployment?
    Thanks

    I meant both, actually. I'm trying to create an ERD or set of ERDs to help me figure out what I need to do in a large (to me!) ETL project. I'm using OWB to create a new target schema based on a source schema. I'll be converting VARCHAR2(2000) and LONGs to CLOBS and consolidating tables and doing other stuff. An ERD would help me visualize the current schema and work on isolated pieces of it. Does that make sense?

  • How to handle radio buttons

    hi.
    i put 3 radio buttons in my scene and i wan't to handle the state of this buttons in an other component "graph"
    so i create group of buttons
    var group = SwingToggleGroup{
    var choiceText = ["Cercle","Square" ,"Rectangle"];
    var formchoices = for (text in choiceText)
        SwingRadioButton{
            text: text
            foreground: Color.GRAY
            font: Font{
                name: "Tahoma"
                size: 15
            toggleGroup: group
        }//SwingRadioButtonand after i passed values to my graph component :
    var graph: Graph = Graph{
    cercleForm : bind formchoices[1].focused
    squareForm : bind formchoices[2].focused
    rectangleForm  : bind formchoices[3].focused
    };but that's not working !!
    thx

    hi
    yes that's it ! i have to use the selected attribute and not focused. it's fine now :)
    But i am asking the question : must i pass the parameters for each component ?
    is it possible to      access to one component in the Scene from an other directly ?
    ( in flash it's possible with "root")
    thx
    ilyes

  • How to handle Radio buttons on screen.(urgant)

    Dear all,
    my req is : i had a screen , on that there are 3 radio buttons,Based on the radion button selection on that screen i've to trigger the 3 select statements.
    if  Radio button 1
        execute select stmt 1.
    if  Radio button 2
        execute select stmt 2.
    if  Radio button 3
        execute select stmt 3.
    how to write this and where.
    Pls frnds this is urgant for me.
    please help me,
    Thanks in advance,
    With regards,
    Ajay Kumar K,
    9908979994.

    hiii....
    you have to remember that you have to define the radio buttons in 1 group.because if changes are made in the group from the elements list then it would affect on all the radio buttons for a particular tasks.
    again radio buttons are always been declared with the parameter statements.
    for eg..
    Parameters:
    p_rad1 radiobutton group rad1 default 'X' user-command rad1,
    p_rad2 radiobutton group rad1,
    p_rad3 radiobutton group rad1.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF p_rad1 = 'X'.
    select statement 1.
    elseif p_rad2 = 'X'.
    select statement 2.
    elseif p_rad3 = 'X'.
    select statement 3.
    endif.
    The group group over here is RAD1.
    the default radio button over here is in radio button 1. you can also also check any of the radio buttons as default.
    thanks..
    any more help pzz revert back...

  • How to handle "Detach" button at af:panelCollection manually?

    I have created a refresh button at af:panelCollection toolbar. Click refresh button, the table data under af:panelCollection will be flashed out and get refresh data again. If table inside af:panelCollection is under "Detached" status, and click refresh button, I will lose "Detached" status at af:panelCollection . How can I manager "Detached" status of af:panelCollection manually? I use JDev 11g 11.1.1.1.0. Thanks.

    Hi,
    before giving the answer, lets start with a disclaimer
    ****** THE CODE BELOW REFERENCES INTERNAL CLASSES THAT MAY CHANGE IN THE FUTURE WITHOUT NOTICE *********
    You can do this using JavaScript, which can also be called from a managed bean
    pc = AdfPage.PAGE.findComponentByAbsoluteId('yourPanelCollectionId');
    pc.getPeer().detach();   As you see, the cal uses a peer object, which is considered internal and may change in the future. I filed an ER to provide a public API for this which
    you then should use.
    Frank

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

Maybe you are looking for