Dynamically loading context menu

Hi,
I am dynamically loading context menu as per XML.
As I am doing it dynamically, only one callback function is
used.
Problem arises here.
One callback function is not able to identify which menuitem
is clicked.
If I am able to identify which menuitem is clicked, so I can
do different things for every menu in single function.
function generateRef()
trace("inside generate reference:generating references for
individual screen");
for(var i=0;i<resObj.firstChild.childNodes.length;i++)
var str = datObj.getCurrent().attributes["path"];
var string:Array = str.split(">");
if(string[0] == resObj.firstChild.childNodes
.attributes["name"])
for(var j=0;
j<=resObj.firstChild.childNodes.childNodes.length-1; j++)
if(datObj.getCurrent().attributes["id"] ==
resObj.firstChild.childNodes
.childNodes[j].attributes["id"])
var PD = new ContextMenuItem("PD", dummy, true, false, true);
scrRef.customItems.push(PD);
for(var a=0;
a<resObj.firstChild.childNodes.childNodes[j].attributes["PDLink"];
a++)
var z=a+1;
PDLArr[a]=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["PDL"+z];
PDNArr[a]=_root.resObj.firstChild.childNodes.childNodes[j].attributes["PDN"+z];
var str = PDNArr[a];
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
var MK = new ContextMenuItem("MK", dummy, true, false, true);
scrRef.customItems.push(MK);
for(var b=0; b<resObj.firstChild.childNodes
.childNodes[j].attributes["MKLink"]; b++)
var z=b+1;
MKLArr
=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["MKL"+z];
MKNArr
=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["MKN"+z];
var str = MKNArr
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
var EW = new ContextMenuItem("EW", dummy, true, false, true);
scrRef.customItems.push(EW);
for(var c=0; c<resObj.firstChild.childNodes
.childNodes[j].attributes["EWLink"]; c++)
var z=c+1;
EWLArr[c]=_root.resObj.firstChild.childNodes.childNodes[j].attributes["EWL"+z];
EWNArr[c]=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["EWN"+z];
var str = EWNArr[c];
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
var WP = new ContextMenuItem("WP", dummy, true, false, true);
scrRef.customItems.push(WP);
for(var d=0;
d<resObj.firstChild.childNodes.childNodes[j].attributes["WPLink"];
d++)
var z=d+1;
WPLArr[d]=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["WPL"+z];
WPNArr[d]=_root.resObj.firstChild.childNodes.childNodes[j].attributes["WPN"+z];
var str = WPNArr[d];
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
}//end of if id
}//for
}//if
}//for
In for loop I am inserting context menu, but callback
function is same, which is 'CALLING'. I want to detect for which
menu item CALLING function is called.
Please help ASAP.
Thanks in advanced.

Hi,
I am dynamically loading context menu as per XML.
As I am doing it dynamically, only one callback function is
used.
Problem arises here.
One callback function is not able to identify which menuitem
is clicked.
If I am able to identify which menuitem is clicked, so I can
do different things for every menu in single function.
function generateRef()
trace("inside generate reference:generating references for
individual screen");
for(var i=0;i<resObj.firstChild.childNodes.length;i++)
var str = datObj.getCurrent().attributes["path"];
var string:Array = str.split(">");
if(string[0] == resObj.firstChild.childNodes
.attributes["name"])
for(var j=0;
j<=resObj.firstChild.childNodes.childNodes.length-1; j++)
if(datObj.getCurrent().attributes["id"] ==
resObj.firstChild.childNodes
.childNodes[j].attributes["id"])
var PD = new ContextMenuItem("PD", dummy, true, false, true);
scrRef.customItems.push(PD);
for(var a=0;
a<resObj.firstChild.childNodes.childNodes[j].attributes["PDLink"];
a++)
var z=a+1;
PDLArr[a]=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["PDL"+z];
PDNArr[a]=_root.resObj.firstChild.childNodes.childNodes[j].attributes["PDN"+z];
var str = PDNArr[a];
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
var MK = new ContextMenuItem("MK", dummy, true, false, true);
scrRef.customItems.push(MK);
for(var b=0; b<resObj.firstChild.childNodes
.childNodes[j].attributes["MKLink"]; b++)
var z=b+1;
MKLArr
=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["MKL"+z];
MKNArr
=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["MKN"+z];
var str = MKNArr
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
var EW = new ContextMenuItem("EW", dummy, true, false, true);
scrRef.customItems.push(EW);
for(var c=0; c<resObj.firstChild.childNodes
.childNodes[j].attributes["EWLink"]; c++)
var z=c+1;
EWLArr[c]=_root.resObj.firstChild.childNodes.childNodes[j].attributes["EWL"+z];
EWNArr[c]=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["EWN"+z];
var str = EWNArr[c];
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
var WP = new ContextMenuItem("WP", dummy, true, false, true);
scrRef.customItems.push(WP);
for(var d=0;
d<resObj.firstChild.childNodes.childNodes[j].attributes["WPLink"];
d++)
var z=d+1;
WPLArr[d]=_root.resObj.firstChild.childNodes
.childNodes[j].attributes["WPL"+z];
WPNArr[d]=_root.resObj.firstChild.childNodes.childNodes[j].attributes["WPN"+z];
var str = WPNArr[d];
var curRef = new ContextMenuItem(str, clicking, false, true,
true);
scrRef.customItems.push(curRef);
}//end of if id
}//for
}//if
}//for
In for loop I am inserting context menu, but callback
function is same, which is 'CALLING'. I want to detect for which
menu item CALLING function is called.
Please help ASAP.
Thanks in advanced.

Similar Messages

  • Dynamically create context menu

    I'm trying to create a context menu based on a certain af:commandImageLink.
    I have an af:popup with an af:menu in my page. I bound the af:menu to my bean so I can change the content. I didn't put any children in the menu to start because I want to add the children based on the image that's click.
    I added an af:showPopupBehavior to show my popup on click. The idea was that I wanted to use the actionListener of the af:commandImageLink to dynamically create the menu that I need. But it seems that the actionListener fires after the showPopupBehavior most times. On the first click, it looks like the actionListener fires first then the showPopupBehavior. After that, it seems the actionListener always fires after.
    So it looks like this is not really supposed to work.
    Does anyone have any suggestions on how this should be made to work?

    Thanks a lot Timo,
    This does allow me to control when the popup shows up.
    I modified the code you gave slightly to include code to align the popup:
        public static void showPopup(String popupId, String alignId) {
            FacesContext context = FacesContext.getCurrentInstance();
            StringBuilder script = new StringBuilder();
            script.append("var popup = AdfPage.PAGE.findComponent('").append(popupId).append("'); ").append("if (!popup.isPopupVisible()) { ")
                .append("var hints = {}; ").append("hints[AdfRichPopup.HINT_ALIGN_ID] = '").append(alignId).append("'; ")
                .append("hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_END; ").append("popup.show(hints);}");
            ExtendedRenderKitService erks = Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
            erks.addScript(context, script.toString());
        }I still have some problems though. I need to give some more context on this.
    So I have an af:iterator that shows a list of images. I'm trying to popup a context menu when they click the image. The menu needs to be aligned relative to the image that was clicked.
    However, when I tried to get the ID from the ActionEvent, I get the design time ID which should not be the same as the run time ID because the iterator would have created multiple instances of the image, each with a unique ID. I'm assuming that's why the alignment is not working.
    Am I missing something here?
    Also, I seem to be having problems with modifying the menu. Here's my bean code:
        private RichMenu baseMenu;
        public void imageActionListener(ActionEvent actionEvent) {
            Object o = actionEvent.getComponent();
            RichCommandImageLink image = (RichCommandImageLink)o;
            DCIteratorBinding iteLoc = ADFUtils.findIterator("OpItemLocationsVO2Iterator");
            for(Row row : iteLoc.getAllRowsInRange()) {
                OpItemLocationsVORowImpl r = (OpItemLocationsVORowImpl)row;
                RichCommandMenuItem a = new RichCommandMenuItem();
                Number n = r.getItelocId().getSequenceNumber();
                a.setId("i" + r.getItelocId().getSequenceNumber().toString());
                a.setText(r.getItelocId().getSequenceNumber().toString());
                baseMenu.getChildren().add(a);
            AdfFacesContext.getCurrentInstance().addPartialTarget(baseMenu);
            showPopup("vmenu", image.getId());
        }So in my popup, I added a menu and I bound that menu to this bean. The idea was that whenever an image was clicked, I would remove all the children from the menu, then add the new ones. There would be a master-detail relationship between the image's iterator and the menu that's supposed to show up.
    The other problems that I'm getting with this is that the menu is not changing when I click on a different image. When I debug, I'll see the correct values being added, but nothing changes on the screen. It's always showing the first popup that was ever created. Also, I don't know how to remove the previous children. There doesn't seem to be an API to remove the children.
    Thoughts?

  • Dynamic Bea Portal: Drag&Drop, Ajax,  Context Menu, etc...

    Hi all,
    Here's a buzzy discussion for all enterprise portal geeks:
    I am currently implementing a portal on WLP.
    On the other hand, I'm also building a proprietary framework to host several applications for a large institution.
    For the latter, we are using Ajax and solid Javascript development to create a desktop-like visual environment (with reusable components, drag and drop between applications, context menus, dynamic windows, reusable views: list, detail, etc).
    Given the functional contrast (between the portal and the rich application), I am becoming terribly frustrated by the inflexibility of the portal/portlet paradigm, and the innability to incorporate most of these concepts without hacking the specification... it's evident to me that the jsr168, as implemented now, has sacrificed too much in favor of too little (WSRP and portability) and carries with limitations imposed by arguably "obsolete" problems such as client statelessness or the innability to refresh the browser on a per portlet basis.
    One might argue that the latter comes from a commitment to the "no javascript" development philosophy. But, doesn't Weblogic console, Portal admin and even the sample portal use javascript for non-trivial tasks??
    OK, so we can use javascript... :-)
    mmh, in that case, here are some obvious enhancements that come to my mind which still could be applied without violating the specification:
    - Drag and drop of portlets within a page
    - Lifecycle and State management occuring asynchronously over the wire, for each portlet independently
    - Dynamic invocation of a given portlet with a javascript Api (on demand)
    - Context menu (or similar) used to invoke a relevant portlet (by allowing registration, just like in a shell)
    I am being <b>very</b> conservative here... and yet these features alone would create a dramatically more dynamic user experience without pushing the spec. Plus, we would be able to create lighter portal applications (smaller activation tree and the whole page reload overhead).
    Of course portlet state and inter-portlet communication should (or could) then be passed to the visual interface. But, hey, isn't that where it should be? If you think about it, no portlet should allow potentially insecure operations to occurr unchecked, and for this matter, the consumer server environment is as dangerous as the user client environment (if you hold true to the producer-consumer-user paradigm).
    Now, talking about interoperable portlets... how standarized is inter portlet communication anyway?
    And what about mobile and js-disabled souls!!? well, I believe fallback is the word for them.
    Anyway, all this issues should be resolved by the portal container, that's what we are paying for ;)!
    how?... easy: clever, solid javascript and a smart fallback strategy.
    If you feel I'm talking on air here, here's some pretty solid air:
    http://projects.backbase.com/RUI/portal.html
    http://www.google.com/ig
    I am currently experimenting on this issues, but I'm already having conceptual problems with the personalization service and others... (of course, it's all thought for something else).
    Any ideas more than welcome.
    BEA, what do you have in mind?
    Regards,
    Aldo

    Hello Armin,
    Do we have this feature available in Java Webdynpro now?
    Best Regards,
    Roby..

  • I have an "Untitled" test service that no longer exists in Library/Services/ but still loads in the context menu and finder services menu.  How do I get rid of it?

    I created an "Untitled" test service, then deleted it.  It no longer exists in Library/Services/ but still loads in the context menu and finder services menu.  Reboots do not change the behavior.  How do I get rid of it?

    ... and mysteriously, it's gone again.  Multiple reboots across the day between then and now, plus a few hibernations as I moved about.  It's as if Finder cached the [deleted!] workflow file and continued to operate off of the cache for an indeterminate time....

  • Problem with APEX tree in 4.1.1.00.23-while adding context menu

    Hi,
    Version : Apex 4.1.1.00.23 and Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    i wanted to add context menu to my tree region.i followed Jason's blog
    http://jastraub.blogspot.com/2010/09/adding-context-menu-to-tree-region.html
    But after i add the javascript code he mentioned,nothing seems to have changed.The context menu appears the same way it was before.
    Is there anyone facing similar problem?
    Appreciate your comments,

    Also using Apex 4.1 and I successfully adapted the steps to my application and it worked well ... the context menu and the tool tips come up well and are functional. The only issue I am still having is that the drop-down arrows no longer work ... I had to use a dynamic action to keep the trees all expanded when the page loads. However, I cannot collapse them as I used to (if needed). I am looking forward to a fix to this issue too.
    Gerald

  • Spry Tabbed panels + Progressive Enhancement and Dynamic Loading of Content With Spry

    Is there any way to combine tabbed panels together with "Progressive Enhancement and Dynamic Loading of Content With Spry"?
    Visit: http://labs.adobe.com/technologies/spry/articles/best_practices/progressive_enhancement.ht ml#updatecontent
    And click on the "Using Spry.Utils.updateContent()"
    The 3rd example shows how to use a fade transition whenever the content changes.
    I already have tabbed panels. My menu contains buttons (on tabs) and my Content div contains the panels.
    Tabs code;
    <ul class="TabbedPanelsTabGroup">
              <li class="TabbedPanelsTab">
                   <table class="Button"  >
                        <tr>
                        <td style="padding-right:0px" title ="Home">
                        <a href="javascript:TabbedPanels1.showPanel(1);" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
                        </td>
                        </tr>
                   </table>
              </li>
    etc
    etc
    etc
    and the panel code:
    <div class="TabbedPanelsContent" id="Home">
         CONTENT
    </div>
    I hoped i can use the example code from the link into my tabbed panels.
    I thought this code:
    onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;"
    could be added to the tab code like this:
    <a href="javascript:TabbedPanels1.showPanel(1);" onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
    But the content doesnt fade...
    I know i need to change the header etc.
    The following is from the link:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Aquo Events</title>
    <script src="../../../includes/SpryEffects.js" type="text/javascript"></script>
    <script src="../../../includes/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function FadeAndUpdateContent(ele, url)
    try {
         Spry.Effect.DoFade(ele,{ duration: 500, from: 100, to: 0, finish: function() {
              Spry.Utils.updateContent(ele, url, function() {
                        Spry.Effect.DoFade(ele,{ duration: 500, from: 0, to: 100 });
    }catch(e){ alert(e); }
    -->
    </script>
    <style type="text/css">
    /* IE HACK to prevent bad rendering when fading. */
    #event { background-color: white; }
    </style>
    </head>
    So i changed my header etc, put the SpryEffects.js and SpryData.js into position and nothing changed...
    Is there a way to keep my tabbed panel (or change as less as possible) and let
    A. The fade work
    B. The loading work.
    The problem now is that it loads all pages instead of only the home. Therefore i wanted this Progressive Enhancement.
    And the fading part is just because its nice...

    It doesnt show in the post but off course i changed this link;
    "data/AquoThonFrag.html"
    into;
    "javascript:TabbedPanels1.showPanel(1);"
    I must say i dont know if this even works...

  • How do I fix the right-click context menu; it has blank entries and shows no selectable options?

    recently I have noticed that my right-click context menu looks like it has no entries. It shows up on a right-click, but the whole menu is blank. On further investigation there are scroll buttons on the top and bottom of the menu and if I hover over the up buttom eventually the normal context commands scroll down from above. I noticed this first a few days ago, shortly after the download of 3.6.13. Today I also noticed that some of my menu bars were showing a similar issue with blank entries in the menus. In one case the menu also didn't register where the mouse was, highlighting a command several steps further up.
    Is this something to do with the new Mozilla or something else? I only run a couple of addons, Ad Block Plus and Tab Mix Plus. Can try to capture a screen shot of the issue, but difficult since the menu dissapears when I try to do a screen grab!
    All help is much appreciated.

    Hi, thanks for the quick response!
    While trying to find info on how to fix this I looked up some context menu addons for FF and tried one. It didn't work so I uninstalled it and after that everything was back to normal. Odd, but there you have it. I still don't know what went wrong in the first place but for the moment it appears to have cleared up.
    Next time though I will try loading into Safe Mode if I find any issues (I forgot there was one!).
    Thanks for getting back to me again.
    GC

  • How to dynamically load jar files - limiting scope to that thread

    Dynamically loading jar files has been discussed a lot. I have read a quite a few posts, articles, and demo code for doing just that. However, I have yet to find a solution to my problem. Most people modify their system class loader and are happy. I have done that and was happy for a time. Occasionally, you will see reference to an application server or tomcat or some other large project that have successfully been able to load and unload jar files, allow for dynamic deployment of code, etc. However, I have not been able to achieve similar success; And my problem is much less complicated.
    I have an application that executes a thread to send a given file/message to a standard JMS Server Queue. Depending on the parameters selected by the user, this thread may need to communicate with one of a number of JMS Servers, ie. JBoss, WebLogic, EAServer, Glassfish, etc. All of which can be done with the same code, but each needs to load their own flavor of JMS Client Jar files. In this instance, spawning a separate JVM for each communication would work from a classloader perspective. However, I need to keep it in the family and run under the same JVM, albeit each JMS Server Connection will be created and maintained in separate Threads.
    I am close, I am doing the following...
    1. Creating a new URLClassLoader in the run() method of each thread.
    2. Set this threads contextClassLoader to the new URLClassLoader.
    3. Load the javax.jms.JMSException class with the URLClassLoader.loadClass() method.
    4. Create an initialContext object within this thread.
    Note: I read that the initialContext and subsequent conext lookup calls would use the Thread�s
    contextClassLoader for finding/loading classes.
    5. Perform context.lookup calls for a connectionFactory and Queue name.
    6. Create JMS Connection, etc. Send Message.
    Most of this seems to work. However, I am still getting a NoClassDefFoundError exception for the javax.jms.JMSException class ( Note step #3 - tried to cure unsuccessfully).
    If I include one of the JMS Client jar files ( ie wljmsclient.jar for weblogic ) in the classpath then it works for all the different JMS Servers, but I do not have confidence that each of the providers implemented these classes that now resolve the same way. It may work for now, but, I believe I am just lucky.
    Can anyone shine some light on this for me and all the others who have wanted to dynamically load classes/jar files on a per Thread basis?

    Thanks to everyone - I got it working!
    First, BenSchulz' s dumpClassLoader() method helped me to visualize the classLoader hierarchy. I am still not completely sure I understand why my initial class was always found by the systemClassLoader, but knowning that - was the step I needed to find the solution.
    Second, kdgregory suggested that I use a "glue class". I thought that I already was using a "glue class" because I did not have any JMSClient specific classes exposed to the rest of the application. They were all handled by my QueueAdmin class. However...
    The real problem turned out to be that my two isolating classes (the parent "MessageSender", and the child "QueueAdmin") were contained within the same jar file that was included in the classpath. This meant that no matter what I did the classes were loaded by the systemClassLoader. Isolating them in classes was just the first step. I had to remove them from my jar file and create another jar file just for those JMSClient specific classes. Then this jar file was only included int custom classLoader that I created when I wanted to instantiate a JMSClient session.
    I had to create an interface in the primary jar file that could be loaded by the systemClassLoader to provide the stubs for the individual methods that I needed to call in the MessageSender/QueueAdmin Classes. These JMSClient specific classes had to implement the interface so as to provide a relationship between the systemClassLoader classes and the custom classLoader classes.
    Finally, when I loaded and instantiated the JMSClient specific classes with the custom classLoader I had to cast them to the interface class in order to make the method calls necessary to send the messages to the individual JMS Servers.
    psuedu code/concept ....
    Primary Jar File   -  Included in ClassPath                                                      
    Class<?> cls = ClassLoader.loadClass( "JMSClient.MessageSender" )
    JMSClientInterface jmsClient = (JMSClientInterface) cls.newInstance()                            
    jmsClient.sendMessage()                                                                      
    JMSClient Jar File  -  Loaded by Custom ClassLoader Only
    MessageSender impliments Primary.JMSClientInterface{
        sendMessage() {
            Class<?> cls=ClassLoader.loadClass( "JMSClient.QueueAdmin" )
            QueueAdmin queueAdmin=(QueueAdmin) cls.newInstance()
            queueAdmin.JMSClientSpecificMethod()
        }

  • [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.

  • Context menu not showing up in EP ( OPEN Object,Permissions ..etc.)

    Dear Portal Gurus,
    We did some changes to the Top Level Nav. PAR file and deployed it into EP.We did it couple of times with every new change and it worked OK.Then once there was this problem with in the Code due some oversight from the developer.We deployed it ...then we were getting an error in EP the Mast Head + Top Level Nav. (all Tabs) part was missing ...was replaced by an error.
    The developer did a Remove Iview from page.
    I deployed a new PAR which was a copy of the original (untouched version of Top Level Nav. PAR) and created a new Iview based on that and used it in the framework page.....The problem was still existing it.
    So I transported the framwork page from my other EP system onto to this EP system which had problems....
    After the transport,all looked OK...no errors..things worked good.
    But after 2 days I got a scripting error wherein the page would load but there would be an error in the status bar.
    Now we were not able to expand any TREE or open any context menu ( for e.g. OPEN OBJECT,Permissions etc).
    The problem with the TREE expansion has been fixed but the context menu still has problems...
    EP 6.0,SP12.
    Any help appreciated.
    Thanks.
    Josh

    close the browser, delete the cache and retry it
    i've seen some problems with the context menu in EP, but its usually due to the browser cache

  • Problem displaying dynamically loaded text in Flash CS3

    I created a Flash CS3 application that does not display
    dynamically loaded text (from internal AS3 scripts) on 3/6 of my
    client's computers. All computers run IE 6 and Flash Player 9. I
    cannot replicate the problem on any computer in my department. The
    problem seems to be related to Flash Player 9 or a browser
    setting/IT restriction. Has anyone encountered this? If so, have
    you found a solution?
    If I cannot find a solution, then I will need to almost
    completely redo the application.
    One slightly insane idea I have considered is to, if
    possible, convert dynamically loaded text to an image real-time. Is
    that possible?
    Btw, I have created a font in my library. Should I try
    manually embedding the font from the Properties menu and selecting
    all characters?
    Thanks in advance.

    yes, even though you may be using a font from the library,
    you still have to specify that each text field that uses that font
    embeds the font, and you'll need to select all characters(well not
    all, unless you require all the different scripts of the world -
    upper-case, lower-case, numerals and punctuation usual suffices).
    I bet if you checked, the computers where the font did not
    appear did not have the font on their system.
    Good luck
    Craig

  • 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

  • Changing the context menu?

    When I right-click on an icon and get the context menu, it's got some very lengthy names next to some of the programs (looks like build numbers or something). Sometimes it goes for 50 characters!
    Question:
    Where is this data stored (that is, the data that is actually appearing on that context menu) and how can I change it? I would love context menus that are slim and short, with just a one-word program file name...
    Thanks!

    I'm no expert on this, but...
    The list that shows in the Open With section is generated either dynamically, or on startup and stored in the launchservices database. Which application will open which file is determined by the settings in each application's info.plist file. Launchservices scans each info.plist to determine the relevant file types for each app and then displays them as options when you go to Open With.
    If you want to change the name of the app as it is displayed in that list, you'll need to figure a way to change the name as it appears in info.plist
    You can access the info.plist files by Ctrl-clicking the app and choosing 'Show Package Contents'. If you are going to try editing it, it's a lot easier if you install the Property List Editor included as part of the Developer Tools on your Mac OS X DVD.

  • BI Administration Cockpit - Context menu in portal

    Hi,
    I have turned on the technical content, I can see all the necessary process chains etc and have set the necessary cubes for collecting in RSDDSTAT.
    When I execute the process chains for data loading, I get errors because of invalid characters in the data which I'm dealing with. But I thought that once you can see the admin cockpit in the portal that you could right click on stats to further drill down to see more information. When I right click on cube name for example, I can see it is a hyperlink and should give me context menu but it doesn't.
    Any ideas?
    Regards
    Sue

    Hi,
    I have the same problem. Can anybody help please?
    The context menu is working fine via executing in the Query Designer. Via the Web Application Designer (3x) it doesn't work. Same for the portal.
    Should the context menu work anyway in the BI Cockpit?
    Regards,
    Patrick

  • 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

Maybe you are looking for

  • Sales order qty

    Dear all   i maintained lumf for the material ,  requirement is sales order will be valid for 6 months , for that iam trying to  create quantity contract in va41 system is showing error message  "No item category available (Table T184 ZKP2 LUMF  ) ""

  • Browser back javscript restriction is not supported in Safari 5.1.2

    We have downloaded window supported safari 5.1.2 browser. we have written code to block browser back button using bellow javascript window.history.forward(1); which is working fine in all the browsers like chrome,mozilla,IE, safari 5.1.1 but in safar

  • Unable to donwload Oracle SQL Developer 2.1 Patch 1 - getting a 404

    Hi, I'm trying to download Oracle SQL Developer 2.1 Patch 1, but I'm getting a 404. Here is the page I'm downloading from: http://www.oracle.com/technology/software/products/sql/index.html Here is the link to the zip file: http://download.oracle.com/

  • Cannot search for "@" symbol when using search function

    I am trying to create a calculated column which extracts the domain part of an email address. My problem is that no type of search formula (SEARCH or FIND) seems to be able to recognise the "@" symbol so I get an error stating that "The search TEXT p

  • Triggering ESS leave request

    Hi all This might be a rookie question, but then again it should be fairly easy for you guys to answer: W want to use the leave request workflow from the ESS, but my queston is whether I have to put an event on my copy of the workflow e.g. WS20000081