Creation of Custom context menu in CL_GUI_TEXTEDIT

Hello all,
I need to develop a custom context menu in the Text Editor.
I am using the <b>CONTEXT_MENU</b> event of the class
<b>CL_GUI_TEXTEDIT </b>for the same.
It is giving a short dump with an exception 'empty_obj' in the method
<b>CL_CTXMNU_MGR=>CREATE_PROXY</b>.
Please help.

Hello Tejas
The following sample report ZUS_SDN_TEXTEDIT_CTXMENU shows how to trigger context menus in text editor. Please note that the editor must be set <b>enabled</b>.
If you inactivate subroutine <b>SET_REGISTERED_EVENTS</b> the new context menu function will no be displayed. Thus you need to <b>register</b> the event for context menu handling.
*& Report  ZUS_SDN_TEXTEDIT_CTXMENU
*& Flow logic of screen 100.
*      PROCESS BEFORE OUTPUT.
*       MODULE STATUS_0100.
*      PROCESS AFTER INPUT.
*       MODULE USER_COMMAND_0100.
REPORT  ZUS_SDN_TEXTEDIT_CTXMENU.
TYPE-POOLS: cntl.  " Types for Controls
DATA:
  gd_okcode      TYPE ui_func,
  go_docking     TYPE REF TO cl_gui_docking_container,
  go_textedit    TYPE REF TO cl_gui_textedit,
  gd_name        TYPE thead-tdname,
  gs_header      TYPE thead,
  gd_langu       TYPE thead-tdspras,
  gt_lines       TYPE STANDARD TABLE OF tline.
*       CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      handle_context_menu
        FOR EVENT context_menu OF cl_gui_textedit
          IMPORTING
            menu
            sender,
      handle_ctxmenu_selected
        FOR EVENT context_menu_selected OF cl_gui_textedit
          IMPORTING
            fcode
            sender.
ENDCLASS.                    "lcl_eventhandler DEFINITION
*       CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
  METHOD handle_context_menu.
    CALL METHOD menu->add_function
      EXPORTING
        fcode       = 'MY_FUNC'
        text        = 'My Function'
*        ICON        =
*        FTYPE       =
*        DISABLED    =
*        HIDDEN      =
*        CHECKED     =
*        ACCELERATOR =
  ENDMETHOD.                    "handle_context_menu
  METHOD handle_ctxmenu_selected.
    CASE fcode.
      WHEN 'MY_FUNC'.
        MESSAGE 'My function selected from ctxmenu' TYPE 'I'.
      WHEN OTHERS.
    ENDCASE.
  ENDMETHOD.                    "handle_ctxmenu_selected
ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
PARAMETERS:
  p_pspnr    TYPE prps-pspnr.
START-OF-SELECTION.
* Get the text object
  gs_header-tdid = 'LTXT'.  " long text
  gs_header-tdspras = syst-langu.
  CONCATENATE syst-langu p_pspnr
      INTO gs_header-tdname.
  gs_header-tdobject = 'PMS'.
  CALL FUNCTION 'READ_TEXT'
    EXPORTING
*     CLIENT                        = SY-MANDT
      id                            = gs_header-tdid
      language                      = gs_header-tdspras
      name                          = gs_header-tdname
      object                        = gs_header-tdobject
*     ARCHIVE_HANDLE                = 0
*     LOCAL_CAT                     = ' '
*   IMPORTING
*     HEADER                        =
    TABLES
      lines                         = gt_lines
    EXCEPTIONS
      id                            = 1
      language                      = 2
      name                          = 3
      not_found                     = 4
      object                        = 5
      reference_check               = 6
      wrong_access_to_archive       = 7
      OTHERS                        = 8.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL SCREEN '0100'.
END-OF-SELECTION.
*&      Form  SET_REGISTERED_EVENTS
*       text
*  -->  p1        text
*  <--  p2        text
FORM
set_registered_events .
* define local data
  DATA:
    lt_events      TYPE cntl_simple_events,
    ls_event       TYPE cntl_simple_event.
  TYPES: BEGIN OF cntl_simple_event,
       eventid TYPE i,
       appl_event TYPE c,
     END OF cntl_simple_event.
  ls_event-eventid = cl_gui_textedit=>event_context_menu.
  APPEND ls_event TO lt_events.
  ls_event-eventid = cl_gui_textedit=>event_context_menu_selected.
  APPEND ls_event TO lt_events.
  CALL METHOD go_textedit->set_registered_events
    EXPORTING
      events                    = lt_events
    EXCEPTIONS
      cntl_error                = 1
      cntl_system_error         = 2
      illegal_event_combination = 3
      OTHERS                    = 4.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " SET_REGISTERED_EVENTS
*&      Module  STATUS_0100  OUTPUT
*       text
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'MAIN_0100'.
*  SET TITLEBAR 'xxx'.
  CLEAR: gd_okcode.
  IF ( go_textedit IS NOT BOUND ).
    CREATE OBJECT go_docking
       EXPORTING
         parent                      = cl_gui_container=>screen0
*        REPID                       =
*        DYNNR                       =
*        SIDE                        = DOCK_AT_LEFT
*        EXTENSION                   = 50
*        STYLE                       =
*        LIFETIME                    = lifetime_default
*        CAPTION                     =
*        METRIC                      = 0
        ratio                       = 90
*        NO_AUTODEF_PROGID_DYNNR     =
*        NAME                        =
      EXCEPTIONS
        cntl_error                  = 1
        cntl_system_error           = 2
        create_error                = 3
        lifetime_error              = 4
        lifetime_dynpro_dynpro_link = 5
        OTHERS                      = 6.
    IF sy-subrc <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CREATE OBJECT go_textedit
      EXPORTING
*        MAX_NUMBER_CHARS       =
*        STYLE                  = 0
        wordwrap_mode          =
            c_textedit_control=>wordwrap_at_windowborder
*        WORDWRAP_POSITION      =
        wordwrap_to_linebreak_mode =
           c_textedit_control=>true
*        FILEDROP_MODE          = DROPFILE_EVENT_OFF
        parent                 = go_docking
*        LIFETIME               =
*        NAME                   =
      EXCEPTIONS
        error_cntl_create      = 1
        error_cntl_init        = 2
        error_cntl_link        = 3
        error_dp_create        = 4
        gui_type_not_supported = 5
        OTHERS                 = 6.
    IF sy-subrc <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD go_textedit->set_text_as_r3table
      EXPORTING
        table           = gt_lines
      EXCEPTIONS
        error_dp        = 1
        error_dp_create = 2
        OTHERS          = 3.
    IF sy-subrc <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD go_textedit->set_enable
      EXPORTING
        enable            = cl_gui_cfw=>true
      EXCEPTIONS
        cntl_error        = 1
        cntl_system_error = 2
        OTHERS            = 3.
    IF sy-subrc <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  PERFORM set_registered_events.
  SET HANDLER:
    lcl_eventhandler=>handle_context_menu     FOR go_textedit,
    lcl_eventhandler=>handle_ctxmenu_selected FOR go_textedit.
  ENDIF.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
*       text
MODULE user_command_0100 INPUT.
  CASE gd_okcode.
    WHEN 'BACK'  OR
         'EXIT'  OR
         'CANC'.
      SET SCREEN 0. LEAVE SCREEN.
    WHEN OTHERS.
  ENDCASE.
  CLEAR: gd_okcode.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
Regards
  Uwe

Similar Messages

  • How to Get List Item in Custom Context Menu?

    Hi,
    I got this code from the net.
    <CustomAction Id="SPTest.CustomMenuItem.ButtonClicked"
    RegistrationType="ContentType"
    RegistrationId="0x0101"
    Location="EditControlBlock"
    ImageUrl="/_layouts/IMAGES/DOCLINK.GIF"
    Sequence="600"
    Title="Click Me!"
    Description="Shows an alert message for this content type."
    >
    <UrlAction Url="javascript:alert('Hello World!');" />
    </CustomAction>
    It creates a custom context menu. How can i get the selected item using that code..
    Sorry for the tons of question. SharePoint newbie here (5 weeks in SP), Hehhehe!

    If you can redirect your request on context.....you can try this line of code
    <UrlActionUrl=”~site/_layouts/ItemAudit.aspx?ID={ItemId}&amp;List={ListId}”/>
    The Idea is to send in query string parameter and get the ItemID in the Pageload Event of the page you want to redirect to.
    Other tokens that are available
    Token
    Replaced By
    ~site/
    SPContext.Current.Web.ServerRelativeUrl
    ~sitecollection/
    SPContext.Current.Site.ServerRelativeUrl
    {ItemId}
    item.ID.ToString()
    {ItemUrl}
    item.Url
    {SiteUrl}
    web.Url
    {ListId}
    list.ID.ToString(“B”)
    {RecurrenceId}
    item.RecurrenceID
    Srikant N , MCPD SharePoint Developer 2010

  • Custom context menu without separators?

    The following code adds two custom items to a context menu.
    However, they are separated into two different menu sections where
    I need them to be in only one. What am I missing?
    var cmiDrillIn:ContextMenuItem = new ContextMenuItem("Drill
    in...", true);
    var cmiDrillOut:ContextMenuItem = new ContextMenuItem("Drill
    Out...", true);
    cmiDrillIn.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
    contextMenuItem_menuItemSelect);
    cmiDrillOut.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
    contextMenuItem_menuItemSelect);
    cm = new ContextMenu();
    cm.hideBuiltInItems();
    cm.customItems = [cmiDrillIn,cmiDrillOut];
    cm.addEventListener(ContextMenuEvent.MENU_SELECT,
    contextMenu_menuSelect);

    Hi,
    According to your post, my understanding is that custom context menu is not available to every user.
    You can check whether you stop inheriting permsissions in the list setting.
    In addition, you can add javascript code as simple as possible to check whether it works.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to retrieve DB package from JDev custom context menu

    Hi everyboby,
    I have a question, sorry in advance if it sounds dumb .
    In my JDev project I declaratively added a context menu to a database package (<folder type="PACKAGE">...) . It's to say when log in to a DB and you click on a package you can see the defined custom menu.
    Here is the structure of my custom menu added in the package context menu:
    -MyMenu
         -MySubMenu
    Programmaticaly, I managed to open a JFrame by affecting MySubMenu a java class file (<item className="OpenJFrame"><title>MySubMenu</title></item> for instance) which is in charge of creating the JFrame. Now if I click on MySubMenu a window opens.
    This window simply contains a button "commit package - svn".
    There comes my struggle. The opened window would let me press the button and commit the content of the package but I can't find how to retrieve the name or even the content of the previously clicked package.
    I tried to add a listener to the button and searched for the parent but I miserably failed to access the package.
    Do you have any idea on how I can perform this?
    Thank you.

    Hi',
    I think you are trying to do this "select empName from emp where empID=$empid" and the $empid should dynamically come.
    check this http://kr.forums.oracle.com/forums/thread.jspa?threadID=674513
    -Yatan

  • Customizing context menu in Bookmarks toolbar

    I would like to change the key I need to press in order to open a web page in a new tab. When I right-click on a saved page in the Bookmark Toolbar, I can press '''W''' in order to open in new tab. I would like to change this to the '''T''' key, just like the context menu from a link on an already opened page. The '''T''' key isn't assigned to anything else in the Bookmark Toolbar context menu, so I believe this can be done.

    The "T" in the context menu of the Bookmarks Toolbar is reserved for the Cut operation, so can't be used.<br />
    If you cut a bookmarks by accident then use Organize > Undo (Ctrl+Z) in the bookmarks manager.

  • [TUTORIAL] Context Menu to export EML files

    Hello there folks!
    I'm pretty new to the topic of C3PO, GW and all the Novell stuff and one of my tasks was to "code an export mechanism for GW8 thats lats us save e-mails to our storage system". Ok, that was a hammer. But wrapping my head around it and starting to error out the things got me pretty far and I guessed it was tutorial material. So here we go:
    @Moderators: This is the thread that has everything in it. the other one can be deleted.
    This tutorial is intendend for C# only. I don't like VB and I'm too dumb for C++ so if you need it for another dialect you need to work it out your self.
    Agenda:
    Needed packages
    C3PO wizard
    Loading to Visual Studio 2010
    Needed Imports/References
    Simple MessageBoxing
    Export Code
    Registering and caching the .DLL
    Testing (please help me with a better way here)
    1. Needed packages
    the novell-gwc3po-devel-2012.11.15.zip file (unzip this after downloading)
    an installed version of Visual Studio 2012 C# (or if you want to work with a different dialect choose another)
    cmd access to some of the registering tools:
    It may be the best thing to set tose paths up in you env variables. Allthough when running the cmd with administrator privileges you can't use regasm from env variables and need to cd to the directory.
    RegAsm (regasm.exe): C:\Windows\Microsoft.NET\Framework\v4.0.30319 (the version depends on the target)
    GACUtil (gacutil.exe): C:\Program Files(x86)\Micrsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\ (this path is also dependent on your target framework version, I chose .NET4)
    StrongName (sn.exe): C:\Program Files(x86)\Micrsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\ (this path is also dependent on your target framework version, I chose .NET4)
    a good beverage :D (you should obtain multiple of these :D)
    2. The C3PO wizard
    In my case I wanted to add the functionality via the context menu. So the code executes when right-clicking on one or multiple messages displays another menu item and is clickable.
    This is pretty easy to realize via the C3PO wizard. You'll find it in the downloaded and extracted novell-gwc3po-devel-2012.11.15.zip from above. Start it (it is located in extracted-zip-folder/gwc3po-FILES/C3POWizard/C3POWizard.exe) and setup your project:
    Setup the project in the wizard step 1
    I usually setup the Wizard inside my Visual Studio 2010 projects folder, create a new folder there with the name of the project and check the options i want to have.
    In the next step I chose which type of View should display my custom context menu. Since I was only interested in exporting and working with e-mails I chose "GW.MESSAGE.MAIL" and added it to the bottom list via, you guessed it, "Add".
    Setup theView that invokes the new context menu item
    In the next step you I had to setup a new entry for the context menu. You could make side-droppable menus here etc. But for me a simple "Add Menu" was enough. Give it a name of your choice (beware: I'm yet to find out where to change this setting in the source files).
    Creating a Menu Item in step 3
    Click through next and the wizard will sum up you choices. In the next dialog window you will be prompted to specify the language you want the code to be generated. I chose .NET C#.
    In the prompt after that you will be asked if the wizard should create a .DLL-project. You click yes.
    Quit the wizard with the "Done" button.
    3. Loading to Visual Studio 2010
    Open up your Visual Studio and go to File -> Open Project. Navigate to the folder where you just created the files with the C3PO-Wizard. and open up the .csproj file.
    All the files get loaded and it seems quite well. but now it's time for some other stuff: Signing, or better, providing a key for signing.
    Allthough the README.txt (also in your project folder) states this is not neccessarily needed I did not get it to work without a key file.
    Open up a terminal and tpye in sn /? to see if the environment variables work. If not you can yuse the abolute path to sn (see: 1: Needed packages). If everything works as expected you can generate your keyfile with sn -k <PathToYourProject>\Archive.snk.
    In Visual Studio, go to Project -> <ProjectName>-Properties -> Signing -> Sign assembly [x] -> Search and pick the .snk-file you just created.
    Good. A first compilation of the project with F6 should rumble through without problems. Go to <ProjectFolder>\bin\Release and copy the .dll files to <GroupWiseInstallPath>.
    After that you need to open a cmd windows as administrator and cd to the RegAsm.exe directory and execute the following: [I]regasm "<GroupWiseInstallPath>\<TheDllName>.dll". Then execute gacutil -i "<GroupWiseInstallPath>\<TheDllName>.dll".
    RegAsm will register the extension to the Windows registry and GACUtil will cache the .dll content to make it available to GroupWise.
    You need to re-cache the .dll everytime you compile in VS. So basically the workflow is Compile -> Copy dll to GroupWise directory -> re-cache with gacutil -i -> Start Groupwise
    I have not found a method to post-build execute a script that does that. Problem is the copying and the gacutil caching (both must be done as administrator).
    IIf everything worked you see a new entry in the context menu when right-clicking a mail in Groupwise. When you click it, there will appear a message box.
    The MessageBox is defined in GWCommand.cs L. ~125
    4. Needed Imports/References
    Since we got the skeleton to compile and function properly, it's time to get our own code in there. FOr rapid prototyping I do all the stuff in GWCommand.cs.
    Go to Project -> add Reference -> COM and select "C3POTypeLibrary", "GroupWareTypeLibrary, "GroupWiseCommander", "GroupWiseConnectorLibrary" and click OK. The selected entries now appear in the project explorer.
    5. Simple MessageBoxing
    A thing I like to do (because I'm not a very good programmer) is to get all sorts of infos to get displayed with
    Code:
    MessageBox.Show();
    Just fling it in the code and see what get's where etc. An important thing is allready in the comments of the file.
    It is this line:
    Code:
    C3POTypeLibrary.IGWClientState6 myCL = (C3POTypeLibrary.IGWClientState6)WIASSArchivButton.g_C3POManager.ClientState;
    . Uncomment it and play around with the myCL-object in your code.
    The myCL has some properties we will use later on such as myCL.SelectedMessages which is exactly what we need for our archive functionality.
    6. Export Code
    Now we get to the code:
    With the
    Code:
    ClientState
    dug up in the code we can pass the
    Code:
    SelectedMessages
    into a
    Code:
    MessageList
    . Over this MessageList we will iterate and save each
    Code:
    Message
    with the so called
    Code:
    GroupWiseCommander
    to our disk. well that sounds simple. And, well after digging through a lot of threads here on the forum and the documentation, it is.
    Here is the Execute() method from GWCommand.cs:
    It has comments that should serve as a documentation.
    Code:
    public void Execute()
    try
    switch (m_PersistentID)
    case WIASSArchivButton.vWIASS:
    //C3PO WIZARD Put execute command code here for WIASS Context menu.
    /* this was in the comments and is essential!
    * the myCL object provides us everything we need to interact with the messages */
    C3POTypeLibrary.IGWClientState6 myCL = (C3POTypeLibrary.IGWClientState6)WIASSArchivButton.g_C3POManager.ClientState;
    // get the selected messages
    object o = myCL.SelectedMessages;
    // and convert the SelectedMessages to a MessagesList
    MessageList ml = (MessageList)o;
    // iterate over all the selected Messages
    // this was tricky: the index of the MessageList starts by 1 and not at 0
    for (int i = 1; i <= ml.Count; i++)
    // the .Item() method expects either a string or a long
    // see http://www.novell.com/documentation/developer/groupwise_sdk/gwsdk_gwobjapi/data/h20s5bdo.html
    long index = (long)i;
    // instantiate a Message object to get access to the different properties like subject, sender etc
    GroupwareTypeLibrary.Message oMessage = (GroupwareTypeLibrary.Message)ml.Item(index);
    // instantiate a GroupWiseCommander
    // this is the interface to the TOKEN API
    // TOKENS: https://www.novell.com/developer/documentation/gwtoken/index.html
    GroupWiseCommander.GWCommander cmdr = new GroupWiseCommander.GWCommander();
    // the GWCommander has an Execute() method that is able to take certain tokens kind of like SQL
    // lets build the token (the complete list is huge and awesome) to save our Messages
    // ItemSaveMessage(): https://www.novell.com/developer/documentation/gwtoken/gwtokens/data/hbt0bd7x.html
    string tokenCommand = "ItemSaveMessage(\"" + oMessage.MessageID + "\"; \"C:\\archiv\\" + oMessage.MessageID + ".eml\"; 900)";
    /* what happens here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ is that we build us a TOKEN command that the
    * GWCommander is able to execute.
    * the actual command is ItemSaveMassge()
    * everything between the semi-colons are the parameters:
    * \"" + oMessage.MessageID + "\" : builds an ANSISTRING of the MessageID which we get from the oMessage onject
    * \"C:\\archiv\\" + oMessage.MessageID + ".eml\" : build an ANSISTRING of the output filename
    * 900 is the type we want to export. 900 stands for Mime
    * CAUTION:In this example I use C:\archive\ as the destination folder. It must exist and be writable to the program
    // now that we have setup our command we can get it executed by the commander
    // the result is sort of a callback variable
    string result ="";
    cmdr.Execute(tokenCommand, out result);
    /* here can the error handling be done with the result string
    break;
    default:
    MessageBox.Show("Unsupported Case", "Error", MessageBoxButtons.OK);
    break;
    //A way to get the GroupWise client state with newest interface
    //C3POTypeLibrary.IGWClientState6 myCL = (C3POTypeLibrary.IGWClientState6)WIASSArchivButton.g_C3POManager.ClientState;
    //uncomment the code below to unblock the base command
    //IGWCommand baseCmd = (IGWCommand)WIASSArchivButton.g_C3POManager.CreateGWCommand(m_objBaseCmd);
    //baseCmd.Execute();
    catch (Exception e)
    MessageBox.Show("Error Executing GWCommand: " + m_PersistentID.ToString() + " Error: " + e.Message);
    return;
    7. Registering and caching the .DLL
    After that you need to open a cmd windows as administrator and cd to the RegAsm.exe directory and execute the following: regasm "<GroupWiseInstallPath>\<TheDllName>.dll". Then execute gacutil -i "<GroupWiseInstallPath>\<TheDllName>.dll".
    RegAsm will register the extension to the Windows registry and GACUtil will cache the .dll content to make it available to GroupWise.
    You need to re-cache the .dll everytime you compile in VS. So basically the workflow is Compile -> Copy dll to GroupWise directory -> re-cache with gacutil -i -> Start Groupwise
    8. Testing (please help me with a better way here)
    Is there a good way to hook every thing up together to jsut stay in VS , compile, files get copied, registered, cached and GW starts?
    Thanks for reading!
    I wrote this up to have a documentation for myself and others. please let em know if you need help or anything is missing or not clear. It's certainly not a total noob guide and I expect a bit of knowledge to be honest.
    Regards
    Sebastian

    Originally Posted by Username951
    Multiple email selection should be possible, but only those emails that are fitting some requirements should be stored finally in database.
    One requirement is for example that a keyword like "ISSUE" appears in the email subject
    (followed by a ":", a "space" and some characters that can be converted to an integer value),
    multiple, leading "Fwd: " and/or "Re: " should be handled well,
    subject should be handled case-in-sensitive.
    This sounds like you should implement some sort of SelectedMessagesValidator class just to keep it clean.
    Originally Posted by Username951
    So here are my find outs, remarks, etc.:
    1.) Visual Studio should be started under admin. rights.
    Then you can write a post-build event (batch) that copies, "regasm"s and "gacutil"s everything.
    As said this works fine for me.
    But note that unfortunately the paths to "regasm" and "gacutil" changed
    (compared to the time where you wrote your tutorial).
    Definitely. That way, as you mentioned, the post build scripts integrate very well.
    Originally Posted by Username951
    2.) The "Novell C3PO" wizard was downloaded and worked out as described in our tutorial.
    One important step was to use "GW.MESSAGE.MAIL" and not "...BROWSER..." or something else.
    I can not figure out, where you have the GW.BROWSER thing from, but in my examples I allways used GW.MESSAGES.MAIL
    Originally Posted by Username951
    The wizard created finally the basic C# (.NET framework 2.0) project.
    This project was loaded in Visual Studio 2013, automatically converted to "newest version"
    and finally was a ".sln" made.
    Yes. You can leave it at 2.0. I just have the 4.5 installed so i will target this version
    Originally Posted by Username951
    "oracle.dataaccess"
    -> Note that the "Copy Local" property must be set to "true"!
    (This property will be reset to "false" after a successful (re)build.
    So check this and change it to "true" for the first build!
    This must be made only once because after a successful build is this .dll known;
    keywords: GAC -> cached
    But note that "successful" means also that the post-build event ran flawless!)
    This is quite specific to your case since my example on exports a flat EML file to the hard drive
    Originally Posted by Username951
    2.) regasm.exe needs strong names.
    So a "cmd" with admin. right was opened,
    a
    "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\sn.exe" -k "C:\Users\<username>\Documents\Visual Studio 2013\Projects\GWSaveToDatabase\GWSaveToDatabase.sn k"
    fired
    and the created "GWSaveToDatabase.snk" file added to the solution.
    I don't want to be picky, but it's gacutil that needs the strong names. ragasm is not complaining
    Originally Posted by Username951
    (Development) Remarks
    1.) While I used the "C3PO" wizard first time I used "Add Menu" item - as you said in your tutorial! :-(
    And that is definitely wrong!
    See:
    The result was a C# project that does not show any new context menu entry.
    So I tried at the next wizard run "Add Menu Item".
    The wizard created again a C# project but still no new context menu entry in the GroupWise client.
    (And that after all needed steps
    like
    copy to GroupWise installation path,
    regasm and gacutil over all .dlls
    etc.
    were successful be made).
    It took a complete day to get the idea to "merge" the two wizard created projects!
    Why merging?
    Because the second project contained a "const" which were used in the switch statement of the "Execute()" method
    (with the same meaning like your "WIASSArchivButton.vWIASS" - see your code snippet above!)
    and the "CustomizeContextMenu(...)" method in "CommandFactory.cs" looked also different
    while the first project does not contained something similar.
    ( For example:
    The "CustomizeContextMenu(...)" method had more statements.
    And that made more sense to me compared to the first wizeard created C# project.
    Since I uploaded a better example this is obsolete.
    Originally Posted by Username951
    So I ASSUME that the second project would work but it does not because of regasm / gacutil behaviour.
    Means I believe it would work when all
    with regasm registered
    and
    with gacutil to the cache added "things"
    would be "un-registerd" and "un-cached".
    This is, as I assume, due to the Interop.C3POTypeLibrary.dll. This must me cached every time the project is build. maybe you could use gacutil -i Interop.C3POTypeLibrary.dll -f to force the recaching
    Originally Posted by Username951
    So, finally I took the second, wizard created C# project and copied the "const", adjusted the "Execute()"
    and "CustomizeContextMenu(...)" methods, etc.
    After that the context menu were shown in the GroupWise client!
    Thats is correct. But I never had to do this. The thing is, that the "Add Menu Item" is giving you the opputunity to specify a command, which the "Add Menu" doesn't.
    Originally Posted by Username951
    2.) The next issue was that the context menu was added as often as many emails were selected.
    Means: For example: Three selected emails ends up in three time added context menu.
    Solution:
    Checking
    var existsAlready = menuItems.Item("...");
    if (existsAlready != null)
    return;
    in "CustomizeContextMenu(...)" method and leaving the method under shown circumstances.
    I added a fix for this in the second post, but it isn't working in GW2012 anymore. I have a very ubly fix for that in my new code.
    Originally Posted by Username951
    3.) The by the wizard created registry path contained the version number "5.0".
    This may confuse but it is finally ok. No need to change here anything!
    On the other side:
    It will NOT work when the registry entry
    "SOFTWARE\\Novell\\GroupWise\\5.0\\C3PO\\DataTypes \\...."
    will be changed/"adjusted to that GroupWise client version you are currently using"!
    This is all part of the official documentation and wasn't touched by Novell since quite a long time.
    I think i will make a github repository in the futer as a proof of concept and kind of a accessable documentation for everyone.

  • Right click context menu is not working in flash player 10 and above

    In right click custom context menu i have create like "A" if i click "A" i have attached one movie clip in that movie clip right click, i have custom context menu like "Remove A" this is working fine in flash player 9 and below. But flash player 10 and above fisrt "A" is working fine but in that movieclip clip right click "Remove A" is not working Please guide me regarding this issue.
    Thanks in Advance
    Surendran S

    The problem is that Google has an onmousedown attribute added to the links that modify a link if you click or right-click a result link to make the link point to a safe browsing check on the Google server.<br />
    You can see that if you hover a link and you will notice that after you have (right) click a link the the URL changes to www.google.com/url?xxxxx.
    You can use this bookmarklet to remove the onmousedown attributes.
    <pre><nowiki>javascript:(function(){var e=document.querySelectorAll('*[id="search"] a[onmousedown]'),E,i;for(i=0;E=e[i];i++){E.removeAttribute('onmousedown')}})()</nowiki></pre>

  • Context menu

    I just want to add my own custom context menu item and remove
    or hide all the default menu items, how will it be possible. please
    give me entire code for this requirement as early as possible.
    waiting for ur reply.
    Thanks

    Is this still a problem? You don’t provide any detail. This is indeed an odd problem. I am thinking you swapped modifier keys. Do you have a two button mouse to help troubleshoot? Do you know how to Show Keyboard Viewer?

  • Context Menu syntax

    Hey guys, this should be a quick and easy one, I just can't figure it out.
    I have created a custom context menu that appears when the user right clicks.  The issue I am having is that I want one of the context menu items to be labeled as "Delete".  When I do this, the context item is gone, so i assume that "Delete" is a keyword here.  Any ideas of special characters I can add to the text or anything that will allow it to display like I would like it too? thanks!
    here is what I currently am doing:
    var ID2436Delete:ContextMenuItem = new ContextMenuItem("Delete");

    The following captions are not allowed, but the words may be used in conjunction with other words to form a custom caption (for example, although "Paste" is not allowed, "Paste tastes great" is allowed):
    Save
    Zoom In
    Zoom Out
    100%
    Show All
    Quality
    Play
    Loop
    Rewind
    Forward
    Back
    Movie not loaded
    About
    Print
    Show
    Redraw Regions
    Debugger
    Undo
    Cut
    Copy
    Paste
    Delete
    Select All
    Open
    Open in new window
    Copy link

  • Define F-Code for ALV Button & context menu for ALV table

    Hi,
    I have some Buttons in ALV Toolbar like for example 'copy row'. Is it in browser environment possible to assign f-code to the button? Like by pushing e.g. F4 the method for 'copy row' action is fired?
    Or additionaly, is it possible to define a custom context menu in alv table?
    Thanks in advance,
    Tan

    Hi Tan,
    This Functionality is working on..Pelase check this...
    Re: How to improve Web accessibility with Function keys
    Re: Hot key(Ctrl+F1) for More field help not working
    Re: GUI Status?
    For help..
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b951297a6d2d65e10000000a42189c/content.htm
    Cheers,
    Kris.
    Edited by: kissnas on Jun 21, 2011 11:46 AM

  • [CS4/5] [JS] Which paragraph style does the panel context menu action work on?

    Hi all,
    I am trying to write something similar as http://forums.adobe.com/message/2866720#2866720 for the paragraph style context menu. I also would like to find out which paragraph style has been selected when the context menu opens. In the thread there is a "dirty" solution for this, the Edit and Apply options of the context menu also mention the name of the paragraph style. This works as long as the paragraph style is unique.
    In my situation the paragraph style names are not always unique, the same name is used in different paragraph style groups. I thought of an even "dirtier" solution that might work for this. The basic idea behind this is to create a new text, asfaik Indesign will automatically apply the active paragraph style to this text and it is easy to grab this style. The code for this is below:
    var myDoc = app.activeDocument;
    var myTextFrame = myDoc.textFrames.add();
    myTextFrame.contents = "grab the paraStyle";
    var myParaStyle = myTextFrame.paragraphs[0].appliedParagraphStyle;
    myTextFrame.remove();
    In my situation this approach seems to work fine but I am wondering if there is something against creating a new textframe and removing it later? And will the new text always get the current selected paragraph style?
    Best Regards,
    Bill

    I finetuned the snippet above a bit further. In some cases the context menu will be activated (right mouseclick) from a style that is not currently selected. In thoses cases the example above doesn't give the correct information. In order to avoid this I am now applying the paragraph style of the current context menu to an intermediate textframe. The snippet below is placed inside the EventHandler of my custom context menu item.
    var myDoc = app.activeDocument;
    //store current selection
    var mySelection = myDoc.selection;
    //create intermediate textframe
    var myTextFrame = myDoc.textFrames.add();
    myTextFrame.contents = "grab the paraStyle";
    myTextFrame.select();
    //apply the para style of the context menu to the intermediate text
    var contextMenu = app.menus.item("Text Style List Context Menu"); //or "$ID/RtMenuStyleListItem"
    var applyMenuItem = contextMenu.menuItems.itemByID(8488).associatedMenuAction; //Apply "para style for context menu"
    applyMenuItem.invoke();
    //grab the para style of the context menu
    var myParaStyle = myTextFrame.paragraphs[0].appliedParagraphStyle;
    //restore original selection and remove intermediate textframe
    myDoc.selection = mySelection;
    myTextFrame.remove();
    Again this snippet seems to work fine. I realize this approach will only work for para styles in a Document object and not for default para styles defined in the Application (suggestions to solve this?). A further refinement could be to first check if a para style name is unique, if that is the case the solution of Jongware (see http://forums.adobe.com/message/2861568#2861568) can be used and an intermediate textframe is not required.  
    I know this is a dirty solution but are there any issues with this approach?

  • Disable default context menu on textfield

    By default the JavaFX TextField has a built in ContextMenu with 'undo', 'copy', 'cut' etc. options.
    I want to replace this ContextMenu with a custom context menu make by me. Could I can do it?

    > By default the JavaFX TextField has a built in ContextMenu with 'undo', 'copy', 'cut' etc. options.
    Really?  Are you sure?  I don't get such a menu in TextFields on a Mac with JavaFX 8.
    Maybe you mean input type text in a WebView?
    I think the answer you are looking for is => webview.setContextMenuDisabled(true);
    See also java - Modify context menu in JavaFX WebView - Stack Overflow.
    And this open feature request:
    RT-20306 Customizable Popup menu in WebView

  • Context menu for tree node cannot be accessed in IE 8 (Jdev 11.1.2)

    We use an af:tree with context menus for performing operations on each node. In IE 8 when you hover over a node before right clicking, "tooltip" text appears which basically just re-displays the text of the node. Even though the tooltip text is annoying, the context menu worked fine in 11.1.1.4, but now in 11.1.2 when you right-click on that tooltip text you get the "normal" browser context menu for text -- we no longer get our custom context menu.
    You can see this same problem on the tree in the rich faces demo: http://jdevadf.oracle.com/adf-richclient-demo/
    Sometimes, if you're quick enough, you can get the custom context menu to work, but it seems that once you've hovered long enough over one node to get the standard context menu, you're stuck and any node you click on will display the browser's normal context menu.
    This is a big problem for us because we rely on these context menus and most of our administrative users are on IE 8. Is there a workaround or can the tooltip text somehow be shut off? It doesn't appear in Firefox so Firefox works fine.
    Thanks.
    -Ed

    Hi,
    if this works on IE 7 you can force the app to run in IE7 compatibility mode
    See "Run ADF Faces applications with IE 9 in IE 8 compatibility mode" http://www.oracle.com/technetwork/developer-tools/adf/learnmore/april2011-otn-harvest-367335.pdf
    Works the same for IE8 to IE7. This then gives you a solution for until the issue is solved
    Btw.: If users click onto the folder icon (not the text, which brings up the tool tip) then the context menu work. I'll file a bug anyway
    Frank

  • How to activate programatically inserted standard menu items in zScale context menu?

    Hi,
    I want to have a different context menu for an intensity graph and its Z scale. This work fine if the standard menu is keept but problems appears as soon as the context menu is customized.
    If the context menu of an intensity graph is customized, this menu is taken also for its Z scale. I work around this feature, and programmatically modifiy the context menu when user click on Z scale. So far so good. BUT I introduce for this programmatically customized context menu some standard items such as APP_SC_ADD_MARKER, and when user select those standard items, nothing appends. I mean, that the item is readed, but in that example no marker is added on the Z scale from the run time engine. Where is my error?
    Please find the test VI enclosed.
    Thank you for tips!
    Attachments:
    Intensitaetsgraph.vi ‏46 KB

    Hi aleveque,
    once you modify the run-time menu, you have to handle the events in your program:
    From the LabVIEW Help:
    "After you customize a run-time shortcut menu statically or programmatically, you must configure an Event structure to handle each menu item in the custom menu."
     Regards,
    Andreas S
    Systems Engineer

  • Right-click (custom context) fails in Flash Player 10.1

    With the release of Flash player 10.1 the right-click (custom context menu) functionality in the software simulations my company builds no longer functions properly.  All files are published at Flash 8 in AS 2.0.  After completing a right-click step the browser crashes (IE 8, Chrome, FF, and Safari).  Anyone having similar problems?
    We had issues with our right-click files when flash player 9 was released and implemented a solution (attached the custom menu to a movieclip vs. a button instance) from Adobe to correct the error...now that isn't working any longer.

    Thanks for the quick response! here is the file list (all file versions are 10.1.53.64):
    C:\Windows\SysWOW64\Macromed\Flash:
    Flash10h.ocx
    FlashAuthor.cfg
    FlashInstall.log
    flashplayer.xpt
    FlashUtil10h_ActiveX.dll
    FlashUtil10h_ActiveX.exe
    install.log
    NPSWF32.dll
    NPSWF32_FlashUtil.exe
    uninstall_plugin.exe
    C:\Windows\SysWOW64\Macromed\Flash\FlashPlayerTrust:
    Adobe Search For Help.cfg
    AdobeFireworksCS5.cfg
    AdobeXMPFileInfo.cfg
    AdobeXMPFileInfoCS5.cfg
    kuler.cfg
    ServiceManager.cfg
    I also made sure all the addson are enabled. Still doesn't work.
    disabled hardware acceleration.Still doesn't work.
    the last resort is will try to update the GPU driver - as ʇɐb ɹəuəllıʍ said.
    I will keep you posted either way. thanks

Maybe you are looking for

  • Checkboxes in BI Publisher not showing up for all reports

    Hi everyone, I followed the instructions (uploading fonts, checking the checkbox font property e.t.c) for displaying checkboxes (without the diamond shape) in my BI Publisher reports. It worked for 1 report and still does. Unfortunately the new repor

  • Help Me Please! Administrator Password Help!!!! Pleaseeeeeee!!!

    +*I just got this MacBook laptop and when I tried to make a password to login, it asks me my old password (but I tried that several times it does not seem to work). Mac Help thing suggests to put the Install CD and reset it or something.... But, does

  • Problems with Apple Preview filled forms and compatibility with Windows?

    Anyone else having problems with Apple Preview filled out forms and compatibility with Microsoft Windows after Lion? I've had it happen recently with two different people, where the data I had entered on a fillable PDF form could not be seen by Micro

  • Cant install drivers for gtx 770 gaming edition

    ok so i went to the website and i click on the file link to install the drivers for my card and i get 404'd what is going on? my motherboard is a gigabyte z87x-ud3h.

  • Simultaneous Sound IO example coupure

    Bonjour, j'ai pu essayer le vi Simultaneous Sound IO example avec version  labview 8. Cela fonctionnait sauf qu'il  y avait des petites coupures. J'ai modifier le buffer mais cela ne change rien. Avez vous une idée par ou il faut chercher  pour résou