2 Replies Latest reply on May 9, 2008 11:56 AM by nickerson

    Implementing portlet-specific help

    nickerson

      I'm running JBoss Portal 2.6.4 on Windows XP.

      The current model for supplying portlet-specific help is essentially to enable the portlet for HELP mode and write a help JSP to render help information in the portlet window itself.

      That is, with HELP mode enabled, the help ('?') icon appears as a new decoration in the portlet title bar and, when it's clicked, the portlet is put into HELP mode and its doHelp() method is executed. doHelp() dispatches the help JSP which renders the help content.

      The problem with this is that the help information covers up what it's explaining. The other thing that happens is that the help icon is replaced by a "cancel" icon, which, when clicked, returns the portlet to VIEW mode. Now we see what was being explained, but the explanation is gone.

      I would like to bypass the rendering of the help in the portlet window and open another window containing the help information. I can get the help JSP to open a separate window with help text, but I can't seem to defeat the portlet's HELP mode, which, if nothing is rendered in its window as help text, just shows a truncated window with nothing in it. Clicking "cancel" restores the portlet window to its pre-help state and doesn't make the open help window disappear, but it seems a round-about way to see the portlet and its associated help information at the same time. Kind of a bad usability model, really.

      Is there a way to prevent HELP mode from rendering the portlet window content? I've tried over-riding doDispatch() and intercepting HELP mode, but by then it's too late.

      Failing any way to get the portlet back to VIEW mode from doHelp or doDispatch, is there a way to put my own icon on the portlet title bar and create a custom mode that enables me to pop a help window without disturbing the Portlet window content? The objective is to see the help information and what it's explaining at the same time.

      Thanks for any suggestions.

        • 1. Re: Implementing portlet-specific help

          How about having your doHelp() method call your doView() method with an extra attribute, then have the doView() pop a help window or overlay? Or forget the help mode and just embed a help icon in your view mode.

          • 2. Re: Implementing portlet-specific help
            nickerson

            Thanks for the suggestion. We had already tried this and it !sort of! works, but not quite. It does pop the help window and the portlet content remains intact but it also replaces the help icon in the title bar with a "CANCEL" icon (and, incidentally, scrambles the title bar a bit, which I think is another bug altogether because we've seen it when we use the normal JBoss portlet help mechanism, no subterfuge required.) The solution we've implemented is to create a "help" portlet and install instances of it on each of the pages where we need more comprehensive explanation. When a user clicks the help button the help window appears (via a processAction call) and no other portlets on the page are disturbed. The help portlet determines the page where its button was clicked and generates the right help content URL.

            Steve Bulick