cancel
Showing results for 
Search instead for 
Did you mean: 

URL or Link in a Page

Former Member
0 Kudos

what is the best practice in putting a link or url in a page?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi Amini,

It depends on condition. If you need to create a static link only then specify in Jsp page

If the link is dynamic and also depends on some numbers It is always recommended to put the Link Or Url in the jsp dyn page or some java classess instead of jsp page.

below is the code you can use for that.

IPortalComponentRequest request =
			(IPortalComponentRequest) rendererContext.getRequest();
		IPortalComponentURI solnDetailsUriObj =
			request.createPortalComponentURI();
		solnDetailsUriObj.setContextName("specify the link or url")
		String solnDetailsUri = solnDetailsUriObj.toString();
		Link solutionLink = new Link("solutionLink");

Now you can use the link assigned dynamically to any thing.

Hope this will help

Regards

Narendra