cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement a help feature in iView Tray

Former Member

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

gregorw
Active Contributor
0 Kudos

Hello Simon,

I've had the same problem two day's ago. I've consulted OSS and the answer was:

1. The "Help Link URL" property is deprecated in Netweaver.

2. Although such property existed in the past,it was never used to

present help for iView (in EP6.).

The only way to utilize iView's Help option is to implement doHelp()

within iView code (like doContent() ).

What I'm trying now is to implement a test DynPage with this code:

public void doHelp(
			IPortalComponentRequest request,
			IPortalComponentResponse response) {
			response.write("This is my help");
		}

I've also enabled the "Show 'Help' Option" in the iView. But it still tells me that "Sorry, no help available.".

Regards

Gregor

Former Member
0 Kudos

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);
        }
    }

Former Member
0 Kudos

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'.

Former Member
0 Kudos

I need to add this function to pages instead but i can't find the "'Edit property Attributes". This part is only located at the iview page.

What am i missing?

Kind regards

John

Former Member
0 Kudos

Hi,

Did anyone find out how to do this? I'm using EP6 SP9 here.

Russell says to open the iView in 'Edit Mode', I right click on the iView and get the usual options, to open the object, permissions, drag & rel....; so I open the object as usual. There is a button that says 'Edit Mode' there, but it is disabled. I have super user access.

I can't find 'URL to Help Topic' anywhere.

Can anyone help with this?

Thanks,

Patrick.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.