Skip to Content
author's profile photo Former Member
Former Member

How to implement a help feature in iView Tray

How to implement a help feature in an iView Tray?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 09, 2004 at 02:07 AM

    If you're developing with EP6, you'll need to implement doHelp in your portal component to handle this.

    Look at the com.sapportals.portal.prt.component.AbstractPortalComponent javadocs and find doHelp.

    The declaration will look something like this:

    protected void doHelp(IPortalComponentRequest request, IPortalComponentResponse response) {

    // your code here

    }

    I believe there is also a property on iView container that controls whether the help dropdown on the tray is displayed.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2004 at 05:06 AM

    To change the location of the Help option for an iViewÂ…

    1. Open the iView in Edit mode from Content Administration -> Portal content

    2. Select the link 'Edit property Attributes'.

    3. In the pop-up box, select 'URL to help topic' and change the end user personalization to 'Read/Write'. Use 'Apply'. Use 'Save'.

    4. In the Property category, select 'Show All'.

    5. There should now be a field 'URL to Help Topic', where you can enter the URL to be used when Help is selected

    6. Use 'Save' - remember to select 'Show Help Option' to Yes.

    7. You need to use 'Edit property attributes' and set the 'URL to help topic' to 'Hidden', or else the end user can change the help URL. Remember to 'Apply' and 'Save'.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      OK, so I now realise that the "Edit Mode" button is disabled because I am already in "Edit Mode". It's there to be used when you enter an object in read only mode because someone has a lock on it already.

      So now it's the part where Russell says to select "Edit property Attributes" that has me stuck. Even if somehow we don't have to select this option then I still don't have access to the "URL to Help Topic" attribute.

      So if anyone knows how to do this.....

      Patrick.

  • Posted on Dec 07, 2004 at 03:05 AM

    Is this available in EP6 on WAS 6.40 too? I cannot seem to find where to make the Help Url property visible...???

    Any help would be appriciated.

    BRgds,

    Simon

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Gregor Wolf

      Hi Gregor,

      Could the answer be connected to the class com.sapportals.portal.prt.component.SystemModes ?

      I can't really see how this class is called, but it gives the error message you are talking about

      The method doHelp for SP2 Patch3 is provided below

      public void doHelp(IPortalComponentRequest aRequest, IPortalComponentResponse aResponse)
          {
              IPortalComponentContext context = aRequest.getComponentContext(IPOMConstants.DEFAULT_MODE);
              IPortalComponentProfile profile = context.getProfile();
              String helpName = profile.getProperty("com.sap.portal.iview.HelpName");
              if(helpName == null)
                  helpName = profile.getProperty("HelpName");
              String helpURL = profile.getProperty("com.sap.portal.iview.HelpURL");
              String isolationMode = profile.getProperty("com.sap.portal.reserved.iview.IsolationMode");
              if(context != null)
                  if(helpName != null)
                  {
                      String componentName = context.getComponentName();
                      Locale locale = aRequest.getLocale();
                      String language = locale.getLanguage();
                      String helpPath = "help/" + language + "/" + helpName;
                      IResource resource = aRequest.getResource(componentName, "page", helpPath);
                      if(resource.isAvailable())
                          aResponse.addResource(resource);
                      else
                          aResponse.write("<b>Sorry, no help available.</b>");
                  } else
                  if(helpURL != null && helpURL.length() > 0)
                  {
                      if(helpURL.startsWith("http://"))
                      {
                          if(isolationMode != null && isolationMode.equals("URL"))
                          {
                              HtmlIFrame frame = new HtmlIFrame();
                              frame.setStyle("width:100%; height: 100%;");
                              frame.setSrc(helpURL);
                              aResponse.write(frame.toString());
                          }
                      } else
                      {
                          String componentName = null;
                          if(helpURL.charAt(0) != '/')
                          {
                              componentName = context.getComponentName();
                          } else
                          {
                              int componentNameIndexEnd = helpURL.indexOf('/', 1);
                              componentName = helpURL.substring(1, componentNameIndexEnd);
                              helpURL = helpURL.substring(componentNameIndexEnd);
                          }
                          IResource resource = aRequest.getResource(componentName, "page", helpURL);
                          if(resource.isAvailable())
                              aResponse.addResource(resource);
                          else
                              aResponse.write("<b>Sorry, no help available.</b>");
                      }
                  } else
                  {
                      aResponse.write("<b>Sorry, no help available.</b>");
                  }
          }
      

      The doOnNodeReady method is also rather interesting. Perhaps another way to solve it?

      protected void doOnNodeReady(IPortalComponentRequest request, IEvent event)
          {
              NodeMode nodeMode = request.getNode().getNodeMode();
              if(nodeMode == NodeMode.HELP_MODE)
              {
                  IPortalComponentContext context = request.getComponentContext(IPOMConstants.DEFAULT_MODE);
                  IPortalComponentProfile profile = context.getProfile();
                  String helpName = profile.getProperty("com.sap.portal.iview.HelpName");
                  if(helpName == null)
                      helpName = profile.getProperty("HelpName");
                  String helpURL = profile.getProperty("com.sap.portal.iview.HelpURL");
                  String isolationMode = profile.getProperty("com.sap.portal.reserved.iview.IsolationMode");
                  if(context != null && helpName == null && helpURL != null && helpURL.length() > 0 && (isolationMode != null && !isolationMode.equals("URL") || isolationMode == null) && helpURL.startsWith("http://"))
                      request.redirect(helpURL);
              }
          }
      

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.