[
https://issues.jboss.org/browse/GTNPORTAL-1987?page=com.atlassian.jira.pl...
]
Minh Hoang TO commented on GTNPORTAL-1987:
------------------------------------------
{code:title=org.gatein.pc.portlet.impl.jsr168.api.PortletPreferencesImpl.java}
public void store() throws IOException, ValidatorException
{
// Check we are in the right mode
if (mode != ACTION)
{
throw new IllegalStateException("Store must be called within the scope of an
action request");
}
{code}
GateIn PC enforces that PortletPreferences.store() is callable only within the scope of an
action request
As scanning PLT.17-Portlet Preferences, i did not see any paragraph mentioning the cases
where PortletPreferences.store() is callable.
PortletPreferences.store() has no effect in a serveResource
-----------------------------------------------------------
Key: GTNPORTAL-1987
URL:
https://issues.jboss.org/browse/GTNPORTAL-1987
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: PC integration
Affects Versions: 3.1.0-GA, 3.2.0-M01
Environment: tomcat6 & tomcat7
windows 7
Reporter: donino doninos
Assignee: Minh Hoang TO
Labels: portal-s64
Portlet method "serveResource" method is fired when ajax requests a resource.
A code as below works in "processAction" method, but in serveResource
PortletPreferences.store() statement doesnt seem has any effect: preferences are not
stored in database.
String mypreference= request.getParameter("mypreference");
PortletPreferences portletPreference = request.getPreferences();
portletPreference.setValue("mypreference", mypreference);
portletPreference.store();
Specifications 286 authorize update preferences in serveResource method (PLT.13.1):
"For serveResource calls only state changes to non-shared state, like the portlet
session scope or portlet preferences, should be performed"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira