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

hbj:link without onClientClick ?

Hi,

I'm writing jsp iviews under EP6 SP2. The documentation says that the element hbj:link can contain the attribute 'onClientClick'.

But I get the following error when iview is executed:

Attribute 'onClientClick' not found in tag library 'HTMLB' for the tag link.

Any ideas?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2004 at 09:24 AM

    HI I cam accross the same issue

    but you can do it in the JSP code

    <hbj:link

    id="PatientAdministrationLink"

    text="<%=imgPatientSearchLink.getText() %>"

    reference="<%=imgPatientSearchLink.getReference() %>"

    target="<%=imgPatientSearchLink.getTarget() %>"

    tooltip="<%=imgPatientSearchLink.getTooltip() %>"

    linkDesign="<%=imgPatientSearchLink.getLinkDesign().toString() %>">

    <%--- Set only onClick if the value is "LinkClick" --%>

    <%

    if (imgPatientSearchLink.getLinkClick().equals("LinkClick"))

    {

    PatientAdministrationLink.setOnClick(

    imgPatientSearchLink.getLinkClick());

    PatientAdministrationLink.setOnClientClick(

    "doNavigatePatientSearch()");

    }

    PatientAdministrationLink.setFontSize(

    imgPatientSearchLink.getFontSize());

    %>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 16, 2004 at 05:32 PM

    Hi Milton,

    Patch level? Hotfix level?

    Thanks

    Detlev

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Milton, Detlev,

      check out this thread: EPCM Error

      Stefano has encountered this problem already, too.

      Interestingly enoughy, on my installation everything works as expected. Eclipse happily complises Dynpages that use "setOnClientClick()" for Link objects and they get rendered correctly. Plus, this method is noted in the HTMLB-API's javadoc.

      Smells like "programming error, will be fixed in the next hotfix" ...

      Dominik

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2004 at 08:39 AM

    Thanks for the answers.

    I'm using EP 6.0.2.2.0.Enterprise_Portal_Service_Pack_2. All my libraries were downloaded from portal, so I hope, this is the correct version.

    I don't use directly die class Link: in jsp the tag <hbj:link> is translated to

    com.sapportals.htmlb.taglib.LinkTag and this class doesn't have a method like setOnClientClick().

    Am i doing something wrong?

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Milton,

      > I'm using EP 6.0.2.2.0

      Even if it will not change the problem described, for many reasons, an update to 6.0.2.4.7 is recommended.

      > EP 6.0.2.2.0.Enterprise_Portal_Service_Pack_2

      "EP 6.0.2.x.y" just means Enterprise Portal 6.0 Service Pack 2 Patch x Hotfix y.

      > All my libraries were downloaded from portal.

      When you say "downloaded", am I right that you have downloaded the lib's from PDK? "Even if it will not change the problem described", I recommend using the "live" lib's from the portal installation, this is the only way to be sure to work on the actual API.

      > I don't use directly die class Link: in jsp the tag

      > <hbj:link> is translated to

      > com.sapportals.htmlb.taglib.LinkTag

      Yes, that seems to be the problem. Please open an OSS message. It's definitely a bug.

      Workarounds:

      a) Within the JSP, use "setOnClientClick" within a scriptlet adressing your defined link.

      b) Change the LinkTag class as well as htmlb.tld and add the method setOnClientClick / the attribute onClientClick by hand.

      Hope it helps

      Detlev

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.