Passing preference value in URL

I have a Custom Task Inbox which list all the task for the user. When the user selects a particular task & clicks open then he navigates to task view portlet. I have a return button on a task view portlet that should take user back to inbox. How can I pass the URL of Inbox portlet to the task view portlet??

I did try below option

  1. Created a returnURL preference in task view portlet
  2. Added a Extended Portlet URL link to Inbox portlet. Set its base URL to task view portlet & added extended portlet parameter (name=returnURL)(value= none) and Portal URL (URL Parameter = Extended Portlet URL).

I assume that the returnURL value will be set to Inbox url & appended to query string
3) In the task view portlet the return button has a extended portlet url with base url as returnURL

When I click the link in Inbox I can navigate to task view portlet (I can also see the returnURL set to Inbox url in query string) but the returnURL preference in task view portlet is still null.

Any suggestion on how to set the returnURL?

Several notes:

  1. I think by default generated task view portlet has “cancelUrl” and “finishUrl” preferences. Default custom inbox generates a link to pass these values when opening a task. I’m not sure why you need to implement it yourself because everything should be already done for you in the boilerplate code (the only difference is that default custom inbox implementation uses a command link to open task details and composes portlet url programmatically)

  2. When constructing portlet url (extended) you need to do it like this:

portlet url (baseUrl = )
child portlet url (portlet = )
parameter (name=, value= or <another portlet url)

Alex

Hi,

Even I have same kind of requirement where I have my own custom link in search result which take him to a page where the inbox detail portlet is their, I manage to pass cancel & finish URL, but problem is when I redirect back to inbox page all the search criteria is lost.

Any inputs is appreciated,

Thanks,
Gohil

Hi,

I found one way to retain the search criteria in Inbox, I am not sure weather its correct way or not but its working,

Go to your task view default view java file, search for cancelView() function (this function is invoke on click of return button),
if you see the code its getting the finishUrl parameter which return a string

append below code at the end of the url string

url += “&sh.wmp_ks=true”;

Cheers,
Gohil