logo

At last, an applet worth using

Regular visitors of this site may know already that I'm not a great advocate of using Java Applets in a web site. That is not to say that I don't occasionally relent and give in to one of the following factors:

  • An applet looks good, has a purpose and works
  • Technology requires that I use one
  • The boss or the customer insist
Also, every now and then, while crawling the net I come across something that makes me stop dead and say "wow!, how on earth have they done that!?". The latest thing I found just this morning and already I've started writing this article. Popup Menu Applet does exactly as it says on the box. Without further ado here is an example. Click on one of the options to see the menu pop up:



What do you think? Personally I think it's awesome. My impression of Applets has been much maligned by Iris's attempts. It takes innovations like this to restore my confidence. Thanks go out to Apycom Software who wrote the applet. The above example is only one of the many possible appearances that you can invent. I tried to make this one look like a replacement to CodeStore's navigation system. Let's have a look at another one that looks a little different:



Suitability for use with Domino:

The problem I find with most applets available for download is that they aren't really relevant to us as Domino developers. This one is an exception. Because of the way the applet builds its menus using simple parameters we can easily build dynamic lists of links from within the Domino Designer. Consider this form that has the applet embedded on it:

Image

Most of the essential parameters have already been added. The most important one that we have selected in the above image is called "menuItems". This is where you add your list of menu items and their intended links. In here I've used an @Implode on a list of links from a DBLookup to create a string in the required format. How you do this depends on what you want to link to and where the information is held. The possibilities are almost endless.

Having played around with it for an hour or two now I've not managed to find anything that got me saying "Argh, but it can't do this can it!". It can even call JavaScript functions and can span from one frame in to another - a major bug in most DHTML Popup menus.

Adding the applet to your form:

First thing to do is download the applet's .jar archive file. You can do that here. Once you've downloaded the Zip file and extracted it somewhere central, you can add it to your forms or upload it on to the server so you can use it in multiple databases. To add it to a form select "Java Applet" from the Create menu and browse to wherever you extracted the .jar file:

Image

Once on the form, making sure you have the applet selected, you need to start adding all the parameters. In particular you need to add the "Copyright" parameter without which it will not work.

Setting up the applet is described in more detail and a lot better than I ever could on the Apycom Website and in the documentation that comes with the download. You can also find numerous examples of all the different things you can achieve. Have fun....



Note: Have you noticed the little advert that pops up in the status bar when you hover over the applet yet. You can get rid of this by registering the applet. The cost is quite small when using on just one site. Full details of licensing are also on the website.

Feedback

  1. More details on importing the applet to Notes

    Could you please give some more details about how you imported the applet?

    Should I import the graphics along with the .jar file?

    What did you put in the "Base class name"?

    And maybe an example snippet of the @ that you put in the applet parameter that holds the menuitems?

    Thanks

    1. Re: More details on importing the applet to Notes

      Sorry - assumed too much of my users again....

      There are various ways of importing the applet. You can do it throught the create menu in a form and store the .jar file in the form. The Base class name should be "apPopupMenu.class".

      You can put the images wherever you like. The URL you use to point to them just needs to be relative.

      The way I did it for the article was to place ALL resources in [<a href="rsrc/apMenuJavaFiles">this document</a>]. I can reference them all from one place.

      You could use images from the Domino icon folder like this:

      "{Main, /icons/vwicn022.gif}"

      or if you are using Image Resources in the same database:

      "{Main, /" + DBPath +"/anImage.gif}"*

      *Assuming you have a field on the form called "DBPath" that equates to the file path.

      The formula I used in the example does a lookup to a view to get a list of all the categories available and then appends these to a view to create a list of URLs to open a categorised view: [<span class="formula">] DBPath := @ReplaceSubstring( @Subset ( @DBName; -1); "\\"; "/"); Areas := @DbLookup(""; ""; "luASK"; "General\\Area"; 2);

      "{Areas}" + @Implode("{|" + Areas + ",/" + DBPath + "/CatView?OpenView&RestictToCategory=" + Areas +",_self}) [</span>] Jake -CodeStore

      Show the rest of this thread

  2. ApyCom Not Home!

    I've been trying to contact this company since Aug 9th. Their emails keep bouncing and there's no phnone number. Even their sales emails bounce! If anybody knows them, they should let them know.

    1. Apycom is back!?

      I have just visited http://www.apycom.com/apmenu and found a new 2.73 release of menu applets. Great thing! Is apycom back?

      Show the rest of this thread

  3. SubMenu Background Colors?

    I've been trying to get in contact with ApyCom just to ask this one question: Can the submenu's background colors be changed? And, if so, how?

    If anybody has an answer to that I would very much appreciate the info.

    1. Re: SubMenu Background Colors?

      Hi Joel,

      Sorry to hear they are no longer in business. Guess that's the way it goes nowadays in this crazy business... no idea what has happened to them.

      You can't change the background colour of the submenus as they are produced at the system level. So they wil be the colour of the user's choice.

      Jake

      Show the rest of this thread

  4. Check out this DHTML menu

    http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm

    1. Re: Check out this DHTML menu

      I saw that a while ago. Did you manage to get it working?

      I've been able to build a view that fits to the needed javascript (go see the site for details because it would be too long to explain), but it's working if you only have one menu level. Couldn't build a view that would generate the needed javascript if you had multiple menu levels.

      That particular project has been put on hold for now, but I was considering an agent that would run every hour to rebuild the menu and store the javascript in a document. It is sad because we lose the Domino's dynamic part, but I couldn't think of something else. Let me kow if you'd like more details on the view I've built.

      If someone has done or thinks he can do something with this menu and Domino, please let me know. I would like to avoid having to download java applets because the application will be accessed by remote users (and I mean far form any big city) where high speed internet is a myth. As soon as my agent is finished, I'll get back here and post it.

      Up the Irons !

      Show the rest of this thread

  5. Apycom's Menu Applet

    yep this worked for me with two little hitches..

    1) by default Notes lookes for a .class and not the .jar file to use and...

    2) Took a minute or two to get the right image file parameter for image resources in the same Db I had to prepend the Db file name i.e. DatabaseFileName.nsf/ImageFileName.gif to use small icon images in the button menu applet.

    1. Re: Apycom's Menu Applet

      Sure it's worth using , but actually I am trying to build it dynamic but can't achieve it maybe you have an idea that might help :

      I am trying to use an embedded view on a page (HTML) to create the menuitemsfile but it seems it doesn't work.

      Well you can check what my current work at

      http://vecna.dynu.com/testmenu.nsf/test?OpenForm for the embedded applet like I want it to be

      but the menuitemsfile shall point to this : "/testmenu.nsf/menu.txt" but it's doesn't want to work and it's quite frustrating

      and the underlying view : http://vecna.dynu.com/testmenu.nsf/cat!OpenView and for the full one http://vecna.dynu.com/testmenu.nsf/all!OpenView

      ;)

      if you have any hint on what I could do to achieve such a "dynamic" way of computing the file thing :)

      Thanks for such a great site :) (2 years old and Rnext coming , happy birthday Codestore)

    • avatar
    • enta
    • Thu 10 Oct 2002

    how to open url in desired frame

    Dear Jake, I have integrated the appopmenu applet into my application,and also add the menuItems para like this: "{Shanghai} {|Contact, //shdomino/intranet/homepage1.nsf/cd_contact?openpage, right}"

    Everything is ok except th url link will open in a new window not the right frame.I have checked this several times,everthing is right.what should I do then?

    Thanks

      • avatar
      • Jake Howlett
      • Thu 10 Oct 2002

      Re: how to open url in desired frame

      Hi,

      Not sure what the problem is. First of all try checking the case of the "r" in "right". Maybe then try putting it in quotes. If all fails look at their example:

      http://www.apycom.com/apmenu/apopmenu/exframe.html

      Jake

  6. Javascript

    Could you give me some information about javascript.

    I have tried a simple function as :

    {|test,javascript:alert('hello'),_}

    and nothing appear

    I have had MAYSCRIPT in HTML/other parameter of lotus notes applet properties.

    • avatar
    • ncoded
    • Thu 12 Jun 2003

    Mouse Wheel Refresh Problems..

    initially i was very impressed with these applets..

    but there seems to be a problem which causes serve refresh problems to your site.. just move the wheel up and down quite quickly..

    any solutions?

    crz ncoded

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:



Navigate other articles in the category "Java"

« Previous Article Next Article »
Creating servlets inside the Domino Designer   Zip Up and Save Space

About This Article

Author: Jake Howlett
Category: Java
Keywords: Applet; Menu; Java;

Options

Feedback
Print Friendly

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »