Left Click event lost in IE7 - Portal v6

We had a few users accept the IE7 install by mistake, which caused issues.  The left click event is not being recognized in the left menu panel when attempting to run a report.  The user can right click and "open in new window" to run the report.
Has anyone come across this problem?

This is how we solved this.
We added the internal websites into the Security and Privacy Area in the Internet Explorer's Options.  This enabled the left click event again.

Similar Messages

  • Handling Right & Left Click Events in ALV Grid

    Hi Friends,
    Please give me the idea how to handle Right & Left mouse Click Events in ALV Grid.
    My requirement is that when i click on the grid i need to pop up a message.
    Eagerly waiting for your replies
    Thanks
    Satish

    you have to Define a class and implement event handler methods for this purpose.
    and the following events can help.
    LEFT_CLICK_DESIGN
    LEFT_CLICK_RUN
    Regards
    Raja

  • How to post an Event (mouse left click) to JTree node

    Hi,
    I am using JTree for my application just like the windows explorer tree. By default, Jtree node will got focus using left click. But, I'd like that my tree will detect a right click so that I can copy any file to the Jtree. I've added a mouselistener to it but the node is not selected by the right click. Anyboby can teach me how to post a mouse left click event to the Jtree so that it will become selected using left click.
    Thanks a million

    See if this is useful
    public void mouseClicked(MouseEvent event)
    Object object = event.getSource();
    if (object == mTree)
    mTree_mouseClicked(event);
    private void mTree_mouseClicked(MouseEvent event)
    if(event.getModifiers()==event.BUTTON3_MASK)
    //your logic goes here
    }//close method

  • How to post an Event (mouse left click) to JTree

    Hi,
    I am using JTree for my application just like the windows explorer tree. By default, Jtree node will got focus using left click. But, I'd like that my tree will detect a right click so that I can copy any file to the Jtree. I've added a mouselistener to it but the node is not selected by the right click. Anyboby can teach me how to post a mouse left click event to the Jtree so that it will become selected using left click.
    Thanks a million

    Hi
    In the class JTree there is a method getClosestPathForLocation(int, int). The parameters are the coordinates which you can get from the MouseEvent. If you have this TreePath you can select the Node.
    This should solve your problem.
    Regards
    Dieter

  • Disable left-click on buttons

    Hi guys!
    I need to disable the left-click event on a button, but not the right-click one! I don't want to catch the mouseClickedEvent and then to find if it was the left or the right button to be pressed because left-clicking on a button makes it "appear pressed", so the user wonders "What's going wrong with this button??!!"
    Any help?

    Updates:
    Looking at the source code of javax.swing.plaf.ButtonUI.BasicButtonUI I saw that there's a call to model.isPressed(). Following this clue I found the method javax.swing.AbstractButton.getModel() and ...
    yes, this can be a way to intercept the event (I did not try), but it's not the answer to my question: I got a java.awt.Button :(
    Why did I choose AWT???

  • Lost left click on Mac mini 5.1 and Mavericks

    As of yesterday I lost my left click on my Mac mini 5.1 running Mavericks. I was working with several programs, Mathematicas was one of them and suddenly I lost the click on my trackpad, I still have the arrow. I turned on my wireless mouse and I got the right click, but still not  left click. I have shutdown my computer, restarted and nothing. Started it in safe mode and nothing. I ran the hardware test (I didn't see the bluetooth interface in the connectivity page) and found everything ok. But the problem persists. In this configuration the computer is pretty much useless (haven't try voice commands, but still mostly useless within a program).

    It seems that the trackpad collapsed and was interfering the left button signal. I remove the batteries and everything returned to normal.

  • Left-click on firefox icon in taskbar shows a list of all tabs. how to just open to last tab?

    I use the tab grouping feature a lot. That means I have 100s of tabs open at any one time.
    The problem: once one switch between tab groups, the Firefox icon on the taskbar changes to what looks like multiple echoes of the Firefox icon. I guess it is supposed to represent multiple tab groups.
    Before Firefox 20 one could click on the Firefox icon on the taskbar, and Firefox would come up and show the last tab I have been working on.
    Since Firefox 20 a left-click on the Firefox icon on the taskbar now shows a tab list of 28+ seemingly random tabs. Many of them just says "Mozilla Firefox" instead of the website represented by that tab (because the tab was not accessed recently).
    To open Firefox to the last tab I have been working on is now a real chore. I now have to pick one of these 28+ tabs (which is 99% of the time the wrong tab), then switch to the correct tab group, and then find the tab I have been working on. It typically takes 5-10 clicks to get back to where I was before I minimized Firefox, or before Firefox lost the focus. (In the past I could simply click on the Firefox icon on the taskbar, and Firefox restored where I last left off.)
    How can I turn off the tab list that pops up when one left-click or hover the mouse over the Firefox icon on the taskbar? I would love to get the ability to minimize/restore Firefox back by clicking on the Firefox icon on the taskbar as it was in the past, not get a choice of random tabs.

    Okay, with a lack of replies here, here are some solutions I came up with:
    * Quit Firefox and restart it. It reduces the number of clicks to just two. It is even faster than wading through the list of tab groups and tabs to get back to the last tab I was working on.
    * Use Alt-Tab to switch between applications instead of clicking on the Firefox icon on the taskbar. I'll have to change my habits, as I'm used to clicking on the icon to toggle between applications, especially if one has many applications open. I typically have a dozen applications open at any time, and Alt-Tabbing through them all can be time-consuming.
    * I found nothing that seems related in the about:config screens, e.g. an option to turn off tab.list
    * Switch to Chrome.
    Anyone got better ideas or solutions?

  • Open a parameter report by clicked event

    Hi friends
    I created a parameter report in oracle portal 10g.
    Do we have some way to pass a parameter and open this report in code ? or by clicked event?
    It seems that we have not ability to use a link to do by a clicked event in oracle portal application.
    Any help?
    Thanks,
    newweber
    *******************report SQL
    report SQL as
    select * from SCOTT.EMP
    where DEPTNO = :department

    <body>
         <form METHOD="GET" NAME="theForm" onSubmit="return false">
         <table CELLSPACING=5 WIDTH=90%>
         <tr>
         <td>
         <table WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR="#FFFFFF" >
         <tr>
         <td> </td>
         <td ALIGN=center> <b><font color="#000099"><font size=+3>Oracle Portal </font></font></b></td>
         </tr>
         </table>
         <font color="#000099">Customization Form for Portal Report</font>
         <br>
         </td></tr>
         <tr><td>
         <table BORDER=0 WIDTH="100%" >
         <tr><td colspan=3>
         <font color="#000099"><b><i>Title:</i></b>
         </td></tr>
         <tr>
         <td> </td>
         <td>Display Name:</td>
         <td><input NAME="title" SIZE="30" ></td>
         </tr>
         <tr>
         <td> </td>
         <td> </td>
         <td> </td>
         </tr>
         <tr>
         <td colspan=3>
         <font color="#000099"><b><i>Query Options:</i></b>
         </td>
         </tr>
         <tr>
         <td> </td>
         <td>Employee Name:</td>
         <td>
         <input NAME="employee" SIZE="30" maxlength="30"></td>
         </tr>
         <tr>
         <td> </td>
         <td>Employee ID:</td>
         <td>
         <input TYPE="text" NAME="id" SIZE="10" maxlength="10"></td>
         </tr>
         <tr>
         <td> </td>
         <td>Department Name:</td>
         <td><select NAME="department" SIZE="1" >
         <option SELECTED VALUE="">All</option>
         <option VALUE="ACCOUNTING">Accounting</option>
         <option VALUE="RESEARCH">Research</option>
         <option VALUE="SALES">Sales</option>
         </select></td>
         </tr>
         <tr>
         <td> </td>
         <td> </td>
         <td> </td>
         </tr>
         <tr>
         <td colspan=3>
         <font color="#000099"><b><i>Row Order Options:</i></b>
         </td>
         </tr>
         <tr>
         <td> </td>
         <td>1.</td>
         <td><select NAME="ordByCol1" SIZE="1" >
         <option Value="">%
         <option Value="ENAME">Ename
         <option Value="EMPNO">Empno
         <option Value="HIREDATE">Hiredate
         <option SELECTED Value="DNAME">Dname
         </select>
         </td>
         <td><select NAME="ordByOrd1" SIZE="1" >
         <option SELECTED VALUE="ASC">Ascending
         <option VALUE="DESC">Descending
         </select>
         </td>
         </tr>
         <tr>
         <td> </td>
         <td>2.</td>
         <td><select NAME="ordByCol2" SIZE="1" >
         <option Value="">%
         <option Value="ENAME">Ename
         <option SELECTED Value="EMPNO">Empno
         <option Value="HIREDATE">Hiredate
         <option Value="DNAME">Dname
         </select>
         </td>
         <td><select NAME="ordByOrd2" SIZE="1" >
         <option SELECTED VALUE="ASC">Ascending
         <option VALUE="DESC">Descending
         </select>
         </td>
         </tr>
         <tr>
         <td> </td>
         <td>3.</td>
         <td><select NAME="ordByCol3" SIZE="1" >
         <option Value="">%
         <option SELECTED Value="ENAME">Ename
         <option Value="EMPNO">Empno
         <option Value="HIREDATE">Hiredate
         <option Value="DNAME">Dname
         </select>
         </td>
         <td><select NAME="ordByOrd3" SIZE="1" >
         <option SELECTED VALUE="ASC">Ascending
         <option VALUE="DESC">Descending
         </select>
         </td>
         </tr>
         <tr>
         <td> </td>
         <td>4.</td>
         <td><select NAME="ordByCol4" SIZE="1" >
         <option Value="">%
         <option Value="ENAME">Ename
         <option Value="EMPNO">Empno
         <option SELECTED Value="HIREDATE">Hiredate
         <option Value="DNAME">Dname
         </select>
         </td>
         <td><select NAME="ordByOrd4" SIZE="1" >
         <option SELECTED VALUE="ASC">Ascending
         <option VALUE="DESC">Descending
         </select>
         </td>
         </tr>
         <tr>
         <td> </td>
         <td> </td>
         <td> </td>
         </tr>
         <tr>
         <td colspan=3>
         <font color="#000099"><b><i>General Options:</i></b>
         </td>
         </tr>
         <tr>
         <td> </td>
         <td>Output Format:</td>
         <td><select NAME="format_out" SIZE="1" >
         <option SELECTED VALUE="HTML">HTML</option>
         <option VALUE="Excel">Excel</option>
         <option VALUE="ASCII">ASCII</option>
         </select></td>
         </tr>
         <tr>
         <td> </td>
         <td>Layout Style:</td>
         <td><select NAME="layout_style" SIZE="1" >
         <option SELECTED VALUE="TABULAR">TABULAR</option>
         <option VALUE="FORM">FORM</option>
         </select></td>
         </tr>
         <tr>
         <td> </td>
         <td>Maximum Rows/Page:</td>
         <td><select NAME="max_rows" SIZE="1" >
         <option SELECTED VALUE="25">25</option>
         <option VALUE="50">50</option>
         <option VALUE="100">100</option>
         <option VALUE="250">250</option>
         </select></td>
         </tr>
         <tr>
         <td> </td>
         <td>Font Size:</td>
         <td><select NAME="font_size" SIZE="1" >
         <option VALUE="8">8</option><option>9</option>
         <option VALUE="10">10</option>
         <option SELECTED VALUE="11">11</option>
         <option VALUE="12">12</option>
         <option VALUE="14">14</option>
         <option VALUE="16">16</option>
         <option VALUE="18">18</option>
         <option VALUE="20">20</option>
         </select></td>
         </tr>
         <tr>
         <td> </td>
         <td> </td>
         <td> </td>
         </tr>
         <tr>
         <td> </td>
         <td> </td>
         <td>
         <input TYPE="SUBMIT" VALUE="Run form" onClick="runForm();">
         <input TYPE="RESET" VALUE="Reset">
         </td>
         </tr>
         </table></center>
         </form>
         </td>
         </tr>
         </table>
         </body>
         </html>
    I hope this helps
    PS.: Metalink Note:230222.1

  • Fire a left click when the right button is pressed

    I am working on a small program with a text area and mouse functionality. I have all my listeners in place but I need one additional feature and I am unsure how to go about implementing it. I want to be able to fire a left click when the right button is pressed.
    The reason is because right clicking does not move the caret around the text area. I need to be able to move the caret with a right click so I can then invoke another method to do some other functionality that is associated with the right click. Any method is acceptable as long as a right click will result in the caret being able to move to a location much like a left click can.
    all help is appreciated. Thanks.

    I'm not sure if this is "better", and my guess is that it isn't, but how about using a Robot object here to create a left mouse press and release? For instance,
    import java.awt.AWTException;
    import java.awt.Robot;
    import java.awt.event.InputEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JComponent;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    public class RightClickAsLeft
      private JPanel mainPanel = new JPanel();
      private JTextArea area = new JTextArea(20, 50);
      private Robot robot;
      public RightClickAsLeft()
        try
          robot = new Robot();
        catch (AWTException e)
          // TODO Auto-generated catch block
          e.printStackTrace();
        mainPanel.add(new JScrollPane(area));
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 18; i++)
          for (int j = 0; j < 80; j++)
            sb.append((char)(40 + j));
          sb.append("\n");
        area.setText(sb.toString());
        area.addMouseListener(new MyMouseListener());
      public JComponent getComponent()
        return mainPanel;
      private class MyMouseListener extends MouseAdapter
        @Override
        public void mouseClicked(MouseEvent e)
          int button = e.getButton();
          if (button == MouseEvent.BUTTON3)
            if (robot != null)
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
      private static void createAndShowUI()
        JFrame frame = new JFrame("RightClickAsLeft");
        frame.getContentPane().add(new RightClickAsLeft().getComponent());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args)
        java.awt.EventQueue.invokeLater(new Runnable()
          public void run()
            createAndShowUI();
    }Edited by: Encephalopathic on Apr 10, 2009 9:59 AM

  • When i double click on and item in the firefox downloads window the item dosn't open, left clicking on the item still dose not give me the choice to "open". how to fix this problem thanks

    When i double click on an item in the firefox dowloads window the item dos'nt open.Left clicking on the item dose not give me the choice to "open" the item.
    the downloaded item is a pdf file of 59 kb, and was downloaded using adobe acrobat version 5

    I have sort of the exact same problem. Extremely far away from user friendly
    I have an second issue as well: When I hook off all-day it comes up with an 8 hour event!
    And then if I put in a late start hour it pushes end time to next day due to the 8 hour event suggestion.
    All in all this gives a lot of changes just to enter an event.
    Command N
    I learnt from your input to use this fuction. At least that comes up with a one hour event as default.

  • Horizontal scroll on MX1000 sends click event as well. [SOLVED]

    As in the topic, I'm having problems with the horizontal scroll sending regular click events to apps as well as the scrolling, making the function pretty unusable. All my other keys work exactly as they should.
    As for my configuration, I'm running evdev, and I have "pointer = 1 2 3 4 5 7 6 8 9 10 11 12" in xmodmap.
    Ive tried changing the input with both imwheel and xbindkeys, but none of them would intercept the horizontal scroll. (Strange though, since it works fine with the other buttons)
    I don't know what else I can do. Is it just a lost cause?
    P.S: I know it's not app dependent, because I have tried it with every application I have.
    Last edited by Aziere (2007-03-25 16:05:48)

    I prefer evdev because I can't seem to get the thumb buttons to work without it.
    As for xev:
    ButtonPress event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1058103, (48,34), root:(471,325),
    state 0x10, button 13, same_screen YES
    EnterNotify event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x0, time 1058103, (48,34), root:(471,325),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 16
    KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys: 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    ButtonPress event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1058127, (48,34), root:(471,325),
    state 0x10, button 6, same_screen YES
    ButtonRelease event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1058127, (48,34), root:(471,325),
    state 0x10, button 6, same_screen YES
    LeaveNotify event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x0, time 1058127, (48,34), root:(471,325),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 16
    ButtonRelease event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1058263, (48,34), root:(471,325),
    state 0x10, button 13, same_screen YES
    ButtonPress event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1127089, (43,37), root:(466,328),
    state 0x10, button 14, same_screen YES
    EnterNotify event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x0, time 1127089, (43,37), root:(466,328),
    mode NotifyGrab, detail NotifyInferior, same_screen YES,
    focus YES, state 16
    KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys: 38 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    ButtonPress event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1127105, (43,37), root:(466,328),
    state 0x10, button 7, same_screen YES
    ButtonRelease event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1127105, (43,37), root:(466,328),
    state 0x10, button 7, same_screen YES
    LeaveNotify event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x0, time 1127105, (43,37), root:(466,328),
    mode NotifyUngrab, detail NotifyInferior, same_screen YES,
    focus YES, state 16
    ButtonRelease event, serial 31, synthetic NO, window 0x1e00001,
    root 0x155, subw 0x1e00002, time 1127489, (43,37), root:(466,328),
    state 0x10, button 14, same_screen YES
    Seems pretty obvious what the problem is. It sends button 13/14 as input first, the continues with 6/7 which is the scroll. So what do I do to fix that?

  • Problem in Button Click Event

    Hi All!
    In Good issue I have create One Button and in click event I call one function, but my problem when click this button it call my function 2 times. Please help me fix this problem, my code below:
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If ((pVal.FormType = 720 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
                    oItem = oForm.Items.Item("2")
                    oNewItem = oForm.Items.Add("MyBtnP", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                    oNewItem.Top = oItem.Top
                    oNewItem.Height = oItem.Height
                    oNewItem.Width = oItem.Width + 5
                    oNewItem.Left = oItem.Left + oItem.Width + 5
                    oButton = oNewItem.Specific
                    oNewItem.Visible = True
                    oButton.Caption = "Fixed Asset"
                End If
                Select Case pVal.ItemUID
                    Case "MyBtnP"
                        If SAPbouiCOM.BoEventTypes.et_CLICK Then
                            Try
                                oMatrix = oForm.Items.Item("13").Specific
                                colItemCode = oMatrix.Columns.Item("1")
                                Dim Row As Integer = oMatrix.RowCount
                                For i As Integer = 1 To Row
                                    oEditItemCode = colItemCode.Cells.Item(i).Specific
                                    If oEditItemCode.Value.ToString() <> "" Then
                                       AssetMaster_Add(oEditItemCode.Value.Trim())
                                    End If
                                Next
              Me.SBO_Application.SetStatusBarMessage("Inserted Fixed Asset Successfully.", SAPbouiCOM.BoMessageTime.bmt_Short, False)
                                Exit Sub
                            Catch ex As Exception
                            End Try
                        End If
                End Select
            End If
        End Sub

    Hi Tao,
    1. use et_ITEM_PRESSED instead of et_CLICK and combine it with BeforeAction:
    If SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED and pval.BeforeAction = False Then
    2. generally i recommend you to use BeforeAction  instead of the old Before_Action (deprecated)
    i saw that in et_FORM_LOAD in top of your code
    lg David

  • How can I capture mouse click events on BSP or Web Dynpro ABAP Screen

    hi Guys,
    Currently we have a user inactivity problem,
    the requirement is: if user is clicking on BSP/Web Dynpro ABAP screen, he/she is considered active. so we need an mechanism to capture the mouse click event.
    Using Firebug, we found that this js is in the iframe which contains BSP/web dynpro scrren: /sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    we want to find this js file & put in some javascript code to track user's mouse click, but i cannot find it on server.
    while in ie if we type http://host:port/sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    this file can be downloaded, means this file is there.
    Any one can help on this issue? find the js file or another way to capture the mouse click event.
    Thanks a lot with points!

    Hi  Feng Guo,
                        We can not capture mouse click events on Web Dynpro ABAP Screen . I am not sure about BSP. But as for as I know the portal keep active the iViews until unless mouse clicks happens.
    But for your problem I think you can get solution by setting iView Expiration to some more time period.
    Regards,
    Siva

  • C# COM server events "lost" when raising events while Excel is in edit mode

    I posted this question on StackOverflow (http://stackoverflow.com/questions/23798443/c-sharp-com-server-events-lost-when-raising-events-while-excel-is-in-edit-mode) but did not receive a good answer, so I'm trying my luck here.
    I have an in-proc COM server written in C# (using .NET Framework 3.5) that raises COM events based on this example: http://msdn.microsoft.com/en-us/library/dd8bf0x3(v=vs.90).aspx
    Excel VBA is the most common client of my COM server.  I’ve found that when I raise COM events while Excel is in edit mode (e.g. a cell is being edited) the event is “lost”.  Meaning, the VBA event handler is never called (even after the Excel
    edit mode is finished) and the call to the C# event delegate passes through and fails silently with no exceptions being thrown.  Do you know how I can detect this situation on my COM server?  Or better still, make the event delegate call block until
    Excel is out of edit mode?
    I have tried:
    Inspecting the properties of the event delegate – could not find any property to indicate that the event failed to be raised on the client.
    Calling the event delegate directly from a worker thread and from the main thread – event not raised on the client, no exceptions thrown on the server.
    Pushing the event delegate onto a worker thread’s Dispatcher and invoking it synchronously – event not raised on the client, no exceptions thrown on the server.
    Pushing the event delegate onto the main thread’s Dispatcher and invoking it synchronously and asynchronously – event not raised on the client, no exceptions thrown on the server.
    Checking the status code of the Dispatcher.BeginInvoke call (using DispatcherOperation.Status) – the status is always ends with “Completed”, and is never in “Aborted” state.
    Creating an out-of-proc C# COM server exe and tested raising the events from there – same result, event handler never called, no exceptions.
    Since I get no indication that the event was not raised on the client, I cannot handle this situation in my code.
    I have tested this with Excel 2010 and Excel 2013.
    Here is a simple test case.  The C# COM server:
    namespace ComServerTest
    public delegate void EventOneDelegate();
    // Interface
    [Guid("2B2C1A74-248D-48B0-ACB0-3EE94223BDD3"), Description("ManagerClass interface")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    [ComVisible(true)]
    public interface IManagerClass
    [DispId(1), Description("Describes MethodAAA")]
    String MethodAAA(String strValue);
    [DispId(2), Description("Start thread work")]
    String StartThreadWork(String strIn);
    [DispId(3), Description("Stop thread work")]
    String StopThreadWork(String strIn);
    [Guid("596AEB63-33C1-4CFD-8C9F-5BEF17D4C7AC"), Description("Manager events interface")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [ComVisible(true)]
    public interface ManagerEvents
    [DispId(1), Description("Event one")]
    void EventOne();
    [Guid("4D0A42CB-A950-4422-A8F0-3A714EBA3EC7"), Description("ManagerClass implementation")]
    [ComVisible(true), ClassInterface(ClassInterfaceType.None)]
    [ComSourceInterfaces(typeof(ManagerEvents))]
    public class ManagerClass : IManagerClass
    private event EventOneDelegate EventOne;
    private System.Threading.Thread m_workerThread;
    private bool m_doWork;
    private System.Windows.Threading.Dispatcher MainThreadDispatcher = null;
    public ManagerClass()
    // Assumes this is created on the main thread
    MainThreadDispatcher = System.Windows.Threading.Dispatcher.CurrentDispatcher;
    m_doWork = false;
    m_workerThread = new System.Threading.Thread(DoThreadWork);
    // Simple thread that raises an event every few seconds
    private void DoThreadWork()
    DateTime dtStart = DateTime.Now;
    TimeSpan fiveSecs = new TimeSpan(0, 0, 5);
    while (m_doWork)
    if ((DateTime.Now - dtStart) > fiveSecs)
    System.Diagnostics.Debug.Print("Raising event...");
    try
    if (EventOne != null)
    // Tried calling the event delegate directly
    EventOne();
    // Tried synchronously invoking the event delegate from the main thread's dispatcher
    MainThreadDispatcher.Invoke(EventOne, new object[] { });
    // Tried asynchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.DispatcherOperation dispOp = MainThreadDispatcher.BeginInvoke(EventOne, new object[] { });
    // Tried synchronously invoking the event delegate from the worker thread's dispatcher.
    // Asynchronously invoking the event delegate from the worker thread's dispatcher did not work regardless of whether Excel is in edit mode or not.
    System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(EventOne, new object[] { });
    catch (System.Exception ex)
    // No exceptions were thrown when attempting to raise the event when Excel is in edit mode
    System.Diagnostics.Debug.Print(ex.ToString());
    dtStart = DateTime.Now;
    // Method should be called from the main thread
    [ComVisible(true), Description("Implements MethodAAA")]
    public String MethodAAA(String strValue)
    if (EventOne != null)
    try
    // Tried calling the event delegate directly
    EventOne();
    // Tried asynchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.DispatcherOperation dispOp = System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(EventOne, new object[] { });
    // Tried synchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(EventOne, new object[] { });
    catch (System.Exception ex)
    // No exceptions were thrown when attempting to raise the event when Excel is in edit mode
    System.Diagnostics.Debug.Print(ex.ToString());
    return "";
    return "";
    [ComVisible(true), Description("Start thread work")]
    public String StartThreadWork(String strIn)
    m_doWork = true;
    m_workerThread.Start();
    return "";
    [ComVisible(true), Description("Stop thread work")]
    public String StopThreadWork(String strIn)
    m_doWork = false;
    m_workerThread.Join();
    return "";
    I register it using regasm:
    %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm /codebase ComServerTest.dll /tlb:ComServerTest.tlb
    Excel VBA client code:
    Public WithEvents managerObj As ComServerTest.ManagerClass
    Public g_nCounter As Long
    Sub TestEventsFromWorkerThread()
    Set managerObj = New ComServerTest.ManagerClass
    Dim dtStart As Date
    dtStart = DateTime.Now
    g_nCounter = 0
    Debug.Print "Start"
    ' Starts the worker thread which will raise the EventOne event every few seconds
    managerObj.StartThreadWork ""
    Do While True
    DoEvents
    ' Loop for 20 secs
    If ((DateTime.Now - dtStart) * 24 * 60 * 60) > 20 Then
    ' Stops the worker thread
    managerObj.StopThreadWork ""
    Exit Do
    End If
    Loop
    Debug.Print "Done"
    End Sub
    Sub TestEventFromMainThread()
    Set managerObj = New ComServerTest.ManagerClass
    Debug.Print "Start"
    ' This call will raise the EventOne event
    managerObj.MethodAAA ""
    Debug.Print "Done"
    End Sub
    ' EventOne handler
    Private Sub managerObj_EventOne()
    Debug.Print "EventOne " & g_nCounter
    g_nCounter = g_nCounter + 1
    End Sub
    This problem also occurs for a C++ MFC Automation server that raises COM events.  If I raise the COM event from the main thread when Excel is in edit mode, the event handler is never called.  No errors or exceptions are thrown on the server,
    similar to my C# COM server.  However, if I use the Global Interface Table to marshal the event sink interface from the main thread
    back to the main thread, then invoking the event - it will block while Excel is in edit mode.  (I also used COleMessageFilter to disable the busy dialog and not responding dialogs, otherwise I'd receive the exception:
    RPC_E_CANTCALLOUT_INEXTERNALCALL It is illegal to call out while inside message filter.)
    Knowing that, I tried to do the same on my C# COM server.  I could instantiate the Global Interface Table (using the definition from pinvoke.net) and the message filter (using the IOleMessageFilter definition from MSDN).  However, the event still
    gets "lost" and does not block while Excel is in edit mode.
    Here's my additional C# code to try to make use of the Global Interface Table:
    namespace ComServerTest
    // Global Interface Table definition from pinvoke.net
    ComImport,
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
    Guid("00000146-0000-0000-C000-000000000046")
    interface IGlobalInterfaceTable
    uint RegisterInterfaceInGlobal(
    [MarshalAs(UnmanagedType.IUnknown)] object pUnk,
    [In] ref Guid riid);
    void RevokeInterfaceFromGlobal(uint dwCookie);
    [return: MarshalAs(UnmanagedType.IUnknown)]
    object GetInterfaceFromGlobal(uint dwCookie, [In] ref Guid riid);
    ComImport,
    Guid("00000323-0000-0000-C000-000000000046") // CLSID_StdGlobalInterfaceTable
    class StdGlobalInterfaceTable /* : IGlobalInterfaceTable */
    public class ManagerClass : IManagerClass
    //...skipped code already mentioned in earlier sample above...
    //...also skipped the message filter code for brevity...
    private Guid IID_IDispatch = new Guid("00020400-0000-0000-C000-000000000046");
    private IGlobalInterfaceTable m_GIT = null;
    public ManagerClass()
    //...skipped code already mentioned in earlier sample above...
    m_GIT = (IGlobalInterfaceTable)new StdGlobalInterfaceTable();
    public void FireEventOne()
    // Using the GIT to marshal the (event?) interface from the main thread back to the main thread (like the MFC Automation server).
    // Should we be marshalling the ManagerEvents interface pointer instead? How do we get at it?
    uint uCookie = m_GIT.RegisterInterfaceInGlobal(this, ref IID_IDispatch);
    ManagerClass mgr = (ManagerClass)m_GIT.GetInterfaceFromGlobal(uCookie, ref IID_IDispatch);
    mgr.EventOne(); // when Excel is in edit mode, event handler is never called and does not block, event is "lost"
    m_GIT.RevokeInterfaceFromGlobal(uCookie);
    I’d like my C# COM server to behave in a similar way to the MFC Automation server.  Is this possible?  I think I should be registering the ManagerEvents interface pointer in the GIT but I don't know how to get at it? I tried using Marshal.GetComInterfaceForObject(this,
    typeof(ManagerEvents)) but that just throws an exception: System.InvalidCastException: Specified cast is not valid.
    Thanks.

    Hi Jason-F,
    I’ve found that when I raise COM events while Excel is in edit mode (e.g. a cell is being edited) the event is “lost”.  Meaning,
    the VBA event handler is never called (even after the Excel edit mode is finished) and the call to the C# event delegate passes through and fails silently with no exceptions being thrown.
    Do you mean you didn't raise EventOne event? EventOne handler like following?
    ' EventOne handler
    Private Sub managerObj_EventOne()
    Debug.Print "EventOne " & g_nCounter
    g_nCounter = g_nCounter + 1
    End Sub
    After test your code, here is my screenshot
    And here is my execute log in C# ComServerTest.
    ManagerClass1/1/2015 5:48:11 PM
    DoThreadWork()1/1/2015 5:48:12 PM
    ManagerClass_EventOne()1/1/2015 5:48:17 PM
    ManagerClass_EventOne()1/1/2015 5:48:22 PM
    ManagerClass_EventOne()1/1/2015 5:48:27 PM
    ManagerClass_EventOne()1/1/2015 5:48:32 PM
    ManagerClass_EventOne()1/1/2015 5:48:37 PM
    ManagerClass_EventOne()1/1/2015 5:48:42 PM
    ManagerClass1/1/2015 5:49:56 PM
    DoThreadWork()1/1/2015 5:49:56 PM
    ManagerClass_EventOne()1/1/2015 5:50:01 PM
    ManagerClass1/1/2015 5:50:04 PM
    If i misunderstand you, please feel free to let me know.
    Best regards,
    kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • On Click event for button not firing

    Hi,
    I'm writing a portlet under Plumtree 5.0.2 and using web controls 2.1 (released version).
    I have a form that has a text box, a label, and a submit button. By cliking on the button the text from the box should appear in the label. If I run the application outside the portal everything seems to work fine, but on the portal the click event does not fire. why?
    I have my ptrender tag on the form, httpmodules in the config file, GetPostBackEventReference on Page_Load. Did I forget something?
    any advice is appreciated. Thanks
    Tania

    Tania,
    You'll need to add ptrender="true"to the button's opening tag if you want the button's server-side code to execute. Also, you won't need ptrender on the form's opening tag.
    From what I can see, placing ptrender on the form's opening tag can be used for two things:(i) when the user clicks a button (which doesn't have ptrender itself) causes the browser to return to the portal, similar to executing portletresponse.ReturnToPortal() in your server-side code.(ii) causing a third-party control to similarly return to the portal as (i) above.
    Nick.

Maybe you are looking for