on 07-10-2009 6:01 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.