Linking to a Portal page via an image? - Websphere

This is a discussion on Linking to a Portal page via an image? - Websphere ; Hi, I am trying to build a portal "Home" page that will contain three images "HR Applications", "Jobs Applications" and "Insurance Applications". The "Home" page is displayed when users log in. When the user clicks on one of the image ...

+ Reply to Thread
Results 1 to 19 of 19

Thread: Linking to a Portal page via an image?

  1. Linking to a Portal page via an image?

    Hi,

    I am trying to build a portal "Home" page that will contain three images "HR Applications", "Jobs Applications" and "Insurance Applications". The "Home" page is displayed when users log in. When the user clicks on one of the image links they are taken to the appropriate link in the Portal navigation tree (nav displayed on the left hand side of the page, with the appropriate portlet displayed in the main window).

    If anybody can advise me on how to achieve this I would appreciate it.

    Thanks

  2. Re: Linking to a Portal page via an image?

    I am unclear what the goal is here exactly. But just basically you can replace the text in the navigation loops with images instead



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: Linking to a Portal page via an image?

    Hi Jim,

    Thanks for the response. Sorry if I wasn't very clear. What I am looking to do is display a home page to users when they log into Portal that will contain three horizontal images: "HR Applications", "Jobs Applications" and "Insurance Applications". Clicking on an image will take the users to the respective Portal page. i.e. clicking "HR Applications" will display the HR Applications and highlight the link as selected on the portal navigation side bar.

    I was contemplating using for this, but not sure what would go in the contentNode. Would it be be the unique url that I assign when I create each page?

    Thanks.

  4. Re: Linking to a Portal page via an image?

    no content node is the uniquename you create for the page.

    So you can do it through the page properties or through the uniquename and give each page its own uniquename



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  5. Re: Linking to a Portal page via an image?

    Thanks. I will give that a go. Looking at the page properties there is also Friendly URL name. Is it possible to link through this also, or is the recommended practice to use the unique name?

  6. Re: Linking to a Portal page via an image?

    well at this point it is a choice you have to make, friendly urls do not save state, using the content-node with url generation will save the state of the portal



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  7. Re: Linking to a Portal page via an image?

    Ok, that makes sense. If you don't mind, is this along the right lines? I tried to create the following within the jsp of my portlet, but it came out with all sorts of errors. It is supposed to be a simple link that is displayed on the home page portlet when users log in:

    Welcome to the Portal!

    {code}

    a href=" HR Applications

    {code}

    Thanks Jim.

  8. Re: Linking to a Portal page via an image?

    Left out a close tag. Still has the same errors though.

    {code}

    a href=" HR Applications

    {code}

  9. Re: Linking to a Portal page via an image?

    if you specify a portletwindowstate you have to specify a portlet window.
    Portlet windows can only be named via xmlaccess



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  10. Re: Linking to a Portal page via an image?

    I modified the code as follows:

    {code}

    a href=" HR Applications

    {code}

    I don't see any errors now, however, the link does not appear in the portlet at all. It is blank.

    I am using a JSR 168 portlet.

    Thanks.

  11. Re: Linking to a Portal page via an image?

    well a few things, Using that code within a portlet is not supported. You can use the SPI or the helper classes that exist.

    That being said is there any errors in the logs? does the href actually populate into the html? is this anonymous or while logged in?



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  12. Re: Linking to a Portal page via an image?

    No errors. Testing within RAD 7.5, so logged in as wpsadmin. It just does not appear on the page.

    If the code is not supported, what is the alternative? You mention the SPI and helper classes, but I can't find anything that provides examples of incorporating the uniquename to link to a page. Should I be using the navigational SPI?

    Thanks.

  13. Re: Linking to a Portal page via an image?

    Here are the helper classes
    http://www-01.ibm.com/support/docvie...=utf-8&lang=en

    and here is the article on the underlying SPI
    http://www.ibm.com/developerworks/we...0612_behl.html




    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  14. Re: Linking to a Portal page via an image?

    Thanks Jim. Your help is much appreciated. The article is very helpful. I deployed the JAR file and came up with the following code to try to create a simple link. A link is now being displayed, however, it contains mostly gibberish and does not link to the page. Here is a part of what is being displayed:

    "document.DNDB.pART("");var DFwp_dt50..."

    Here is my code:

    {code}
    private static final String JNDI_NAME = "portletservice/com.ibm.portal.portlet.service.url.PortalURLGenera tionService";
    public PortalURLGenerationService pshPortalURLGenerationService;

    public void init() throws PortletException{
    super.init();
    try {
    final javax.naming.Context ctx = new javax.naming.InitialContext();
    final PortletServiceHome psh = (PortletServiceHome) ctx.lookup(JNDI_NAME);
    pshPortalURLGenerationService = (PortalURLGenerationService)
    psh.getPortletService(PortalURLGenerationService.c lass);
    } catch (NamingException e) {
    throw new PortletException(e);
    }
    }

    /**
    * Serve up the view mode.
    */
    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    // Set the MIME type for the render response
    response.setContentType(request.getResponseContent Type());


    final PrintWriter writer = response.getWriter();
    final PortalURLWriter portalUrlWriter = ((PortalURLGenerationService)pshPortalURLGeneratio nService).getPortalURLWriter(request, response);

    writer.print(" ");
    writer.print("HR Applications");
    writer.print("");

    // Invoke the JSP to render
    PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(getJspFil ePath(request, VIEW_JSP));
    rd.include(request,response);
    }

    {code}

    Not quite sure if the params going into writePortletRenderURL are correct. The page uniquename that I am trying to link to is "hrapplications".

    Thanks again.

  15. Re: Linking to a Portal page via an image?

    Jim,

    I modified that code to use the PortletURLHelper instead:

    {code}
    doView...

    writer.print(" ");
    writer.print("HR Applications");
    writer.print("");
    {code}

    The link displays correctly, however, clicking on it refreshes the same page as does not go to the "hrapplications" page.

    Any ideas?

    Thanks.

  16. Re: Linking to a Portal page via an image?

    pass in null as the second value



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  17. Re: Linking to a Portal page via an image?

    Strange...I am getting an "exceptions.MissingUniqueNameException - The given unique name is null.".

    I checked and the page definitely has the same unique name - "hrapplications"

    Also, for params I am not passing anything in. Do I need to if it is a simple link to the page?

    Thanks.

  18. Re: Linking to a Portal page via an image?

    pass in null as params as well



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  19. Re: Linking to a Portal page via an image?

    Tried that. Still getting the same error message. Hmm.

+ Reply to Thread