cancel
Showing results for 
Search instead for 
Did you mean: 

Hyperlink iView

Former Member
0 Kudos

Hi

Does anyone know how to make an iView that contains just a link (either external or a link to another iView)?

I know I could make an html document and make a km document iView but doing this causes a sizing issue (where the iviews touching each other will have too much space between them)

I want a page full of these iViews to appear to look like a list of links

Any suggestions?

Thanks

Greg

Accepted Solutions (1)

Accepted Solutions (1)

sathish_perumal
Active Participant
0 Kudos

Hi Greg,

You can try the following code. This is doProcessBeforeOutput method of my component.

Form myForm = this.getForm(); // get the form from DynPage

request = (IPortalComponentRequest) getRequest();

profile = request.getComponentContext().getProfile();

Link guiLink = new Link("guiLink",profile.getProperty("GuiName"));

guiLink.setTarget("EPCM.doNavigate('" + profile.getProperty("GuiPath") + "',1,'height= 730,width=1350,resizable,scrollbars','')");

guiLink.setOnClientClick("javascript:" + "EPCM.doNavigate('" + profile.getProperty("GuiPath") + "',1,'height= 730,width=1350,resizable,scrollbars','')");

myForm.addComponent(guiLink);

Here GuiPath is a PCD loaction of the iview which you want to show as link in your iview. The Link will have name "GuiName" in your iview. Both are profile parameters(iview properties) in my case.

Hope this solves your issue.

Thanks

Sathish

alexander_gtz
Participant
0 Kudos

Hi,

perhaps I misunderstand your question, but why don´t you just use the Link iView (pcd:portal_content/com.sap.pct/every_user/com.sap.pct.cosy.controlcenteruser/com.sap.pct.cosy.iviews/com.sap.pct.cosy.links) or any other KM Navigation iView with LayoutSet LinkListExplorer to display a list of links?

Do you have special requirements or why can´t you take this standard one?

Regards

Alex

Former Member
0 Kudos

Sathish-

Thanks for the reply. I wrote the code and deployed, but the iView shows a blank screen and the property editor for the iView shows no field for me to input a link. How do I customize what link is shown?

Thanks

Greg

sathish_perumal
Active Participant
0 Kudos

Greg,

Hope you defined the properties in the portalapp.xml.

<property name="GuiName" value="">

<property name="plainDescription" value="Gui Name"/>

</property>

<property name="GuiPath" value="">

<property name="plainDescription" value="Gui Path"/>

</property>

In the iview you create should have these properties, so you can input the link in this property.

For example

GuiName - "My Hyperlink"

GuiPath - "pcd:portal_content/com.sap.pct/my_hyperlink"

Thanks

Sathish

alexander_gtz
Participant
0 Kudos

only for my information why can´t you use LinkListExplorer? I really don´t understand why you want to code the same functionality which is there in standard. If you create a link in KM there is also a htmlb link created in background where you can set internal or external link targets. I am also coding very much when i am missing functionality that i want but in this case, if you don´t have special requirements, I don´t see any sense.

And it is much more flexible, because in the coding you can only set as much links as you defined in portalapp.xml.

Its also a performance issue, because a site with many many iviews in it, renders much slower than one simple KM Navigation iview with many links. Also if you use web page composer there is simple possibility to create a link list, with many options....

Perhaps you can tell me why you want to code

Regards

Alex

Former Member
0 Kudos

The reason I want this is because we have a link pointing to each of our available reports. We want users to be able to select and customize which reports show up on their page. Because of this, each link must be it's own iView so it can be added/removed individually.

Thanks

Answers (0)