cancel
Showing results for 
Search instead for 
Did you mean: 

hbj:link without onClientClick ?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

%>

Answers (2)

Answers (2)

Former Member
0 Kudos

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?

detlev_beutner
Active Contributor
0 Kudos

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

detlev_beutner
Active Contributor
0 Kudos

Hi Milton,

Patch level? Hotfix level?

Thanks

Detlev

Former Member
0 Kudos

Hi Milton, Detlev,

check out this thread:

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