Click handler for a span

Hi
I have a TextFlow which contains several span elements. (Each has an ID attribute.) When the user clicks on one of these spans, a pop up should appear whe the user can style the span.
I tried to assign a different event listener to each of the spans, but failed.
This brings the same result for both spans:
     element.tlf_internal::getEventMirror().addEventListener(MouseEvent.CLICK, regionClickHandler);
    public function regionClickHandler(evt:MouseEvent):void {
       Alert.show(evt.currentTarget.name.toString());
Any ideas?
Tobi

Thanks for your reply Richard!
I have
    textFlow.interactionManager = editManager;
and no SelectionManager. (I assume only one of them can be used for a specific TextFlow instance).
It seems editManager.tlf_internal::computeSelectionIndex doesn't exist.
To all TLF implementers:
When a user clicks on a span in an editable TextFlow, my click handler should do something with that span (open a pop up containing a style editor for that span).
Is there a simple way to get the span that the user clicked on? It would be great if the event would have a method which returns that span.
Tobi

Similar Messages

  • How to get event.target/event.currentTarget for HTML-5 canvas for click handler

    Hi,
    I hope everyone is doing great.
    I belong to Actionscript background and just started on Flash CC HTML-5 canvas.
    How to get event.target or event.currentTarget in Flash CC for HTML-5 canvas for click event.
    Like we used to do it in AS 3.0
    btn.addEventListener(MouseEvent.CLICK , go);
    function go(evt:MouseEvent){
       trace(" evt - "+evt.currentTarget); // It will let us know the clicked target
    For  HTML-5
    btn.addEventListener('click' , go.bind(this));
    function go(evt){
       console.log(" evt - "+evt.????t); // what is the correct syntax here?
    Thanks,

    Hey guys found the answer from stackoverflow
    it is - evt.target

  • How to find out the set handler for a particular signal?

    I have an interesting puzzle to solve. l'm investigating problems with someone else's code and I'd like to get the name of the handler that is set for SEGV. psig shows that the process catches SEGV, however I don't have access to the source code for all the libraries it links against and none of the source code I have sets a handler for SEGV. Is there a way to find out the name of the signal handler that is set for a particular signal in a process? I'm sure the source was compiled with cc -g. Solaris 8

    Hello Haritha,
    Please follow the path.
    Go to RSA1 -> Metadata Repository ->DataStore Objects(ODS) -> Find you DSO(ODS) there and click on that, you will get all the details(Queries, Objects - Char, Key figures, update rules,etc..) related to that particular DSO(ODS), same is the case for Cube as well.
    Please assign points.

  • HTTP handler for starting an external service cannot be read

    Hi,
    When i execute the work item from Business Work place and also from the UWL in Enterprise portal of the task TS21300098 for HR Process Requisition workflow.
    In the Error is says
    HTTP handler for starting an external service cannot be read
    Message no. SWK045
    Diagnosis
    This work item is a link to a HTTP service. To start the service, a launch handler must be known to the SAP System.
    However, the system could not find a launch handler.
    System Response
    The workflow system cannot start execution of the work item.
    Procedure
    Contact your workflow administrator:
    In Customizing you must maintain a launch handler for HTTP-supported dialog services.
    I have checked the config under WF_HANDCUST transaction and made the launch Handler settings generated automatically.
    But still the problem occurs.
    Any Suggesions and help?
    Thanks & Regards
    Sumanth

    hi Guys,
    I have got the same issue. This blog helped me with tcode WF_HANDCUST. I have generated the url
    http://waspgh.kcc.com:8083/sap/bc/webflow/wshandler-->Click on Generate URL and click on distribution.
    Immediately u will get click on Test url . Click Test url . Then It is not successful. It stopped at 
    http://waspgh.kcc.com:8083/sap/bc/webflow
    Getting http page error. So use tcode sicf >sap>bc-->webflow service and activate it.
    Then test the connection. It will be successfull.
    http://waspgh.kcc.com:8083/sap/bc/webflow/wshandler?ping=true&sap-client=400
    Handler test
    Test successful
    Thanks,
    Shankar

  • Error handling for a save button

    hi. how do i get error handling say in a button, and then to give an error to the user, without crashing the whole application. can any one point me to any articles, tried searching , and not finding wxactly what i am looking for. thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

    hi. maybe i did not make my self clear. okay, here's how this button works, you have a open dialog button, and a open dialog box, you click the file, and it loads in the data grid. now you click on the save button, and a message says file was saved, need
    try / catch code, to catch this, if the file was not saved, or other errors, then a error friendly message, any code for this. read the article, but need a specific error handler for the save button, like i had for the open dialog file dialog box. any suggestions,
    or links, to look at sample code. thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

  • Event Handling for Graphic Shapes

    Hi guys,
    I have a problem on the implementation of a piece of software that i'm making, to be more specific i implement a GUI. In this GUI i draw rectangles, lines and that kind of things.
    The problem is that i want when clicking on a rectangle, an event to take place such as the drawing of something else, or a message, etc.
    How am i to achieve that? I've tried many things but didn't succeeded it unfortunately. How am i going to "give" life to my rectangles by adding event handling for them? What code should i write?
    Note: My class extends JPanel & i'm using paint(Graphics g) for drawing the shapes
    Thanks,
    John.

    Try this:
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.util.*;
    public class Shapes extends JFrame
         DPanel pan = new DPanel();
    public Shapes()
         addWindowListener(new WindowAdapter()
              public void windowClosing(WindowEvent ev)
                   dispose();
                   System.exit(0);
         setBounds(10,10,400,350); 
         setContentPane(pan);
         setVisible(true);
    public class DPanel extends JPanel implements MouseListener
         Vector shapes = new Vector();
         Shape  cs;
    public DPanel()
         addMouseListener(this);
         shapes.add(new Rectangle(20,20,100,40));
         shapes.add(new Rectangle(40,80,130,60));
         shapes.add(new Line2D.Double(20,150,200,180));
    public void paintComponent(Graphics g)
         super.paintComponent(g);
         Graphics2D g2 = (Graphics2D)g;
         for (int j=0; j < shapes.size(); j++)
              g2.draw((Shape)shapes.get(j));
         g.setColor(Color.red);
         if (cs != null) g2.draw(cs);
    public void mouseClicked(MouseEvent m) {}
    public void mouseEntered(MouseEvent m) {}
    public void mouseExited(MouseEvent m)  {}
    public void mouseReleased(MouseEvent m){}
    public void mousePressed(MouseEvent m)
         for (int j=0; j < shapes.size(); j++)
              Shape s = (Shape)shapes.get(j);
              Rectangle r = new Rectangle(m.getX()-1,m.getY()-1,2,2);
              if (s.intersects(r))
                   cs = s;
                   repaint();
    public static void main (String[] args) 
          new Shapes();
    }Noah

  • PCR workflow - HTTP handler for starting an external service cannot be read

    Hi,
    We are implementing PCR Approval using adobe forms. Currently when we try to open the adobe form for Approval from the UWL we get the error(it actually displays with an information message symbol) "<b>HTTP handler for starting an external service cannot be read</b>" in an ITS screen. We found an exactly similar problem in the below link but unable to find a resolution from that.
    HTTP handler for starting an external service cannot be read
    The detailed information message displayed is as given below,
    <b>
    HTTP handler for starting an external service cannot be read
    Message no. SWK045
    Diagnosis
    This work item is a link to a HTTP service. To start the service, a launch handler must be known to the SAP System.
    However, the system could not find a launch handler.
    System response
    The workflow system cannot start execution of the work item.
    Procedure
    Contact your workflow administrator:
    In Customizing you must maintain a launch handler for HTTP-supported dialog services.</b>
    We use the standard task TS50000075 for PCR Approval
    Can anyone help us on this?
    Thanks,
    Prasath N

    Hi Jocelyn,
    Thanks for that reply.
    I tried the transactions SICF and WF_HANDCUST.
    1. In SICF under sap>bc>webflow-->wshandler when i double click on wshandler it shows that the service is active. But when i right click on the same and try to TEST it, i get an error
    <b>Error in Web service execution
    The launch handler was called with an incomplete parameter list </b>
    I am not sure what this error means.
    The configurations available in this service are as follows,
    ICF path --> /default_host/sap/bc/webflow/
    ICF Object --> wshandler
    Decription --> English
    Logon Procedure --> Standard
    Security Requirements --> Standard
    Basic Authentication --> Standard R/3 user
    Anonymous logon data
    client --> <empty>
    user --> empty
    password --> <empty-stillinitial>
    Language --> <empty>
    I am not clear what id and password should be maintained here. Can you please help us on this.
    2. When i try to generate the URL in WF_HANDCUST and test them i get a success message.
    <b>Handler test
    Test successful
    </b>
    Thanks,
    Prasath N

  • Click Handler

    Hi,
    this might be pretty simple, but I'm trying to find the
    button component's click Handler in flash... can anyone help me
    with this or help me with the action scripting for such an event...
    thanks!

    click handler is for component under flash MX & below,
    you can find it under parameters at property inspector, or
    component inspector...
    in MX2004 & above, we can attach the script directly to
    the component instance
    on(click){
    //do something
    }

  • 3.2 to 4.1 Upgrade - Error Handling for Unavailable Database Links

    Hi,
    I'm having a 3.2 -> 4.1 upgrade issue related to error handling for failed database links.
    I have a conditional Exists button on a page that has a SQL query to linked tables. However, for the 10 minutes every day where the target of the database link is getting a cold backup, the query fails. In the old 3.2 apex I simply got an error inside the region where the button is located but otherwise the page was still visible:
    "Invalid exists/not exists condition: ORA-02068: following severe error from MYDBLINK ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist"
    However, in apex 4.1.0.00.32 I get the following unhandled error, and clicking "OK" takes me to the edit page when logged in as developer.
    i.e., the page can't be run at all while the database links are failing in this one region.
    Error Error processing condition.
    ORA-12518: TNS:listener could not hand off client connection
    Technical Info (only visible for developers):
    is_internal_error: true
    apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
    ora_sqlcode: -12518
    ora_sqlerrm: ORA-12518: TNS:listener could not hand off client connection
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 4
    component.name: Current Alerts
    error_backtrace:
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 1041
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 687
    ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 272
    General users see this:
    Error Error processing condition.
    ORA-01034: ORACLE not available ORA-02063: preceding line from MYDBLINK
    clicking "OK" takes user to another page, not sure how apex decides which, but not a concern at the moment.
    I've done a search and read the page http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/ but the new apex error handling isn't clear to me, and I don't know if the apex_error_handling_example provided on that page would be applicable to this situation.

    Thanks Patrick.
    The PL/SQL Function Body returning boolean condition with:
    begin
        for l_check in (
          SELECT 1
           FROM myview@MYDBLINK
          WHERE ... ) loop
            return true;
        end loop;
        return false;
    exception when others then
        sys.htp.p('Invalid exists/not exists condition: ' || sys.htf.escape_sc(sqlerrm));
        return false;
    end; Resulted in a similar issue:
    Error Error processing condition.
    ORA-04052: error occurred when looking up remote object MYLINKUSER.myview@MYDBLINK
    ORA-00604: error occurred at recursive SQL level 3
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-02063: preceding line from MYDBLINK
      Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
    ora_sqlcode: -4052
    ora_sqlerrm: ORA-04052: error occurred when looking up remote object MYLINKUSER.myview@MYDBLINK
    ORA-00604: error occurred at recursive SQL level 3
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-02063: preceding line from MYDBLINK
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 4
    component.name: Current Alerts
    error_backtrace:
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 904
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 588
    ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 148However, I created a view with the same query:
    CREATE OR REPLACE VIEW v_localview (ALERT_1)
    AS
    SELECT 1
      FROM myview@MYDBLINK ...then change the condition to look at the local view:
    begin
        for l_check in (
          select alert_1 from v_localview ) loop
            return true;
        end loop;
        return false;
    exception when others then
        sys.htp.p('Invalid exists/not exists condition: ' || sys.htf.escape_sc(sqlerrm));
        return false;
    end;As a view is simply a query I'm surprised this should make any difference but it now looks similar to the 3.2 error, inside the region, when the linked database gets its morning cold backup, and this is fine:
    Invalid exists/not exists condition: ORA-12518: TNS:listener could not hand off client connection

  • How to use common event handler for selected movie clips?

    I have a 50-state map in a flash movie. Each state is a movie
    clip.
    Goal: when mouse moves over a state or is clicked in a state,
    the state will be highlighted in a bright color and a small box
    will pop up near the state and display some information about the
    state.
    Question: I know I can add mouse event handler for each state
    movie clip. But this is simply not good since this has to be done
    50 times and codes thus scattered different places. Ideally, I only
    want to have one script that determines where the mouse position is
    when events trigged and then do right things (highlight the state
    and display info. in a pop-up). How can this be implemented?
    Thanks!

    There are a number of ways. Which way is best depends on how
    you have things set up so far.
    E.g. If they have an enumerable naming convention:
    e.g. each clip is like state_0 , state_1 etc.
    Then you can loop through them and assign them all to the
    same mouse event handler via the loop. You would need properties
    other than the name of the clip to identify the state. E.g. each
    clip could contain its own data or the index could be a pointer to
    the state data (objects with state name and info properties) in a
    separate array.
    //state clips named
    for (var i=0;i<50;i++) {
    this["state_"+i].stateindex=i;
    this["state_"+i].onPress= statePressHandler;
    var stateData:Array = [{name:"StateName,info:"this state
    Info"}, name:"StateName,info:"this state Info"}, etc...]
    function statePressHandler() {
    trace(this);
    trace(stateData[this.stateindex].name+"="+stateData[this.stateindex].info);
    Other ways are possible too but the best approach depends on
    how you have named the clips and whether you're creating them with
    code or whether they're already on stage from authoring (my guess).
    If they're already on stage and they're called "Alaska" etc, then I
    would be inclined to put them all inside a container clip that
    contains nothing else other than states. It would avoid the need
    for an array of clip names or for checking some other specific
    property of each clip to determine if its a 'state' clip and not
    something else in a for..in loop.

  • Is there a Drag-Drop handler for TextAreas ?

    Is there a Drag-drop handler for TextAreas where new x,y positions can be saved as well ? Thanks in advannce

    Bernd, thanks for the helpful suggestion - I may be able to change my procedure and use that feature.  It would save me thousands of mouse clicks if I just found and dragged each .doc into the target folder, then used an Action to convert them all to PDF.  I still like the 'smart' folder idea, though....it would be a cool utility.

  • Unable to get automatic event handling for OK button.

    Hello,
    I have created a form using creatobject. This form contains an edit control and Search, Cancel buttons. I have set the Search buttons UID to "1" so it can handle the Enter key hit event. Instead its caption changes to Update when i start typing in the edit control and it does not respond to the Enter key hit. Cancel happens when Esc is hit.
    My code looks like this -
    Dim oCreationParams As SAPbouiCOM.FormCreationParams
            oCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
            oCreationParams.UniqueID = "MySearchForm"
            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
                    Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.AddEx(oCreationParams)
    oForm.Visible = True
    '// set the form properties
            oForm.Title = "Search Form"
            oForm.Left = 300
            oForm.ClientWidth = 500
            oForm.Top = 100
            oForm.ClientHeight = 240
            '// Adding Items to the form
            '// and setting their properties
            '// Adding an Ok button
            '// We get automatic event handling for
            '// the Ok and Cancel Buttons by setting
            '// their UIDs to 1 and 2 respectively
            oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Search"
            '// Adding a Cancel button
            oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 75
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Cancel"
    oItem = oForm.Items.Add("NUM", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oItem.Left = 105
            oItem.Width = 140
            oItem.Top = 20
            oItem.Height = 16
            Dim oEditText As SAPbouiCOM.EditText = oItem.Specific
    What changes do i have to make to get the enter key to work?
    Thanks for your help.
    Regards,
    Sheetal

    Hello Felipe,
    Thanks for pointing me to the correct direction.
    So on refering to the documentation i tried out a few things. But I am still missing something here.
    I made the following changes to my code -
    oForm.AutoManaged = True
    oForm.SupportedModes = 1 ' afm_Ok
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, 1, SAPbouiCOM.BoModeVisualBehavior.mvb_Default)
            oButton = oItem.Specific
            oButton.Caption = "OK"
    AND
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.AffectsFormMode = False
    I get the same behaviour OK button changes to update and enter key does not work.
    Could you please tell me find what is it that i am doing wrong?
    Regards,
    Sheetal

  • HT3576 Ok so i have this iPod touch (3rd gen) and i'm trying to update it through iTunes and when i click  check for update it keeps saying this version of iPod software (2.2.1) is your current version. what do i do? how do i update it?

    Ok so i have this iPod touch (3rd gen) and i'm trying to update it through iTunes and when i click  check for update it keeps saying this version of iPod software (2.2.1) is your current version. what do i do? how do i update it?

    You have a 1st generation iPod Touch. It can not be upgraded beyond iOS 3.1.3, it is available at the link below.
    http://support.apple.com/kb/HT2052

  • HT4623 I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    Tap to enlarge.

  • Exception Handling for OPEN DATA SET and CLOSE DATA SET

    Hi ppl,
    Can you please let me know what are the exceptions that can be handled for open, read, transfer and close data set ?
    Many Thanks.

    HI,
    try this way....
      DO.
        TRY.
        READ DATASET filename INTO datatab.
          CATCH cx_sy_conversion_codepage cx_sy_codepage_converter_init
                cx_sy_file_authority cx_sy_file_io cx_sy_file_open .
        ENDTRY.
    READ DATASET filename INTO datatab.
    End of changes CHRK941728
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          APPEND datatab.
        ENDIF.
      ENDDO.

Maybe you are looking for

  • New region in a page

    Hi, I was trying to create a new region in a page. For that i create a region RG1 in Jdeveloper and in that page, i created FlexLayout and Flex Content using personalization. Before i extend the RG1 region in Flex Content i have imported the RG1 regi

  • Connect Cable Box Output to MacPro USB Input

    Is it possible (using appropriate cable) to connect the HDMI output of a cable box to a USB 2.0 input on a Mc Pro in order to view cable TV programs?

  • Xpath query using greater than operator

    I'm trying to evaluate some xml to determine if it matches some criterium. MyXmlColumns contains the following kind of data "<Values><Value>data1</Value><Value>data2</Value><Values>" When I execute the following query I get zero rows returned when it

  • Lightroom does not recognise Canon EOS350D

    I can import pictures from my Canon 350D using the supplied Canon EOS Utility, but I cannot import direct to Lightroom - it pops up a mesage stating no device is connected.  I have to get the pictures (RAW + jpeg) onto my computer using the EOS Utili

  • Events in oops

    hi, in handling events is it compulsory to create the class? because i tried to do that and it worked i.e without creating class.isnt it possible just by call method to print for e.g top of page?