In our application we have a preference defined for the Results portlet which should be stored on the session. The declaration in wm-portlet.xml is the following:
currentTaskID
Current Task ID
session
false
String
I set the value of preference when I open a task from the Results list in order to see the Details page. When I come back from the Details page, the value of the preference is lost.
I want to use this preference in order to mark the task from the results table that was clicked on for opening the Details page.
I also have another preference with the same name for a different portlet. I have renamed that second preference but the value of the one from the Result portlet is still lost.
I’ve attached a sample that demonstrates this technique.
To use the sample please do the following:
Deploy the TestPreferencesApp.war
Login as Administrator and using the Task Engine Administration UI start a few of the Test Preference Tasks. Make sure to fill in the sample field in the Task Start UI
Browse to the Task List Management and assign all of those tasks to the Administrator user
Browse to the custom Test Preferences Inbox and notice the Sample Fields in the task column as well as the empty preference displayed for the current portlet
Click on one of the tasks. That will eventually invoke a method i wrote: setPreferenceFromCurrentTask()
In the details page of the task, confirm the preference that was set and click return
back in the inbox results portlet you should see the stored session based preference that was set in step #5