Thursday, September 27, 2012

Retrieve a Page/Action With Ajax Request - Portlet Factory

This is specially needed when you want to open a popup window or want to show some data on triggered event without refreshing entire portal page.

You can have method builder with following code which return generated URL in string format :
JSPSupport.getActionURL(webAppAccess, webAppAccess.getBackchannelURLMapper(false), 
"keep_page:yourPageHere")
 
You can use this generated url with any link/href attribute.
 
Note :  
keep_page- last parameter is very important in portal context. 
keep_page specifies that portlet state wouldn't get change after the request is triggered.
 

No comments:

Post a Comment