on 09-16-2004 10:06 AM
Hi,
i have the following error:
EPCM not defined.
I create link in HTML page using the EPCM.doNavigate API and run this page in EP 6.0.
Someone can help me?
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karsten,
I have this problem: create a link from custom iView to a page insert in the Second Level Navigation.
I have write the following code:
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
IPageContext myContext = PageContextFactory.createPageContext(request, response);
if (myContext == null) {
System.out.println("htmlb service did not start up as expected.");
}
Form myForm = myContext.createFormDocument("First Experiment");
String url ="ROLES://path to my page";
Link link = new Link("myLink");
link.setTarget("_TOP");
String navigation = "EPCM.doNavigate('" + url + "',2)";
link.setOnClick(navigation);
myForm.addComponent(link);
myContext.render(myForm);
}
When i click the link this Internet Explorer error occurred:
Object Not Found.
Can you tell, step by step, how can create the link to a page on the second level navigation?
Thanks in advance.
Hi Stefano,
change line
"link.<b>setOnClick</b>(navigation);"
to
"link.<b>setOnClientClick</b>(navigation);"
<i>(probably include a "javascript:"-prefix, too)</i>
"link.setOnClientClick<b>("javascript:"</b> + navigation);"
This should resolve the issue.
SetOnClick is executed on the server (i.e. the portal), whereas SetOnClientClick is executed on the client.
As you want to perform a JavaScript call, this needs to be done on the client side.
Good luck,
Dominik
Hi Stefano,
this is strange. I just checked in the javadoc that comes with the PDK business package and it shows the following method:
<b>setOnClientClick</b>
<i>public void setOnClientClick(java.lang.String onClientClick)</i>
set a Javascript fragment that is executed when the user clicks on this button
<i>Parameters:</i>
onClientClick - the Javascript
The complete classpath for "my" Link class is "com.sapportals.htmlb.Link", so we should be talking about the same...
My Eclipse also says, the method is there (with its "intellisense" box).
Could you please double-check this on your PC?
Regards,
Dominik
Hi Stefano,
this is strange... are you sure, you are using the EP6 HTMLB libraries?
Anyway, for testing and learning purposes, you can try the same with an htmbl button as well as with a link. Just create a button object, give a meaningful text and set the setOnClientClick() to the value above.
If this codes compiles without problems, try if it works. If you should have trouble at that time, please do not forget to provide the following here in SDN
- the relevant part of your source code
- the relevant part of the generated iView HTML code (the lines around the button in the html source)
Good luck,
Dominik
Hi, Dominik
I check again and I discovered that I use the EP5 HTMLB libraries so I get the correct libraries and now I can use the setOnClientClick() method with LINK.
But....
...when I click on the link, the page is load while the Top level Navigation not changed. Why?
Can help me????
Thank in advance.
Hi Stefano,
great to hear this. So I understand correctly, that your original problem was caused by having used the wrong version of the library?
I suggest, that you then mark your question as answered - any maybe think of using that yellow star icon for saying "thanks" the SDN way
Bye,
Dominik
Hi Stefano,
a) Is it possible that your content lives in it's own iFrame? In this case, just use EPCMproxy (see pages 20-22 in https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/enter... portal client.pdf ).
b) EPCF is activated? (See pages 5 & 22/23 in the document given above.)
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.