user321068
user321068

Reputation:

Portlet 2.0: No properties set on ResourceURL

I'm creating a ResourceURL, so I can serve a file through a portlet.

final ResourceURL resourceUrl = 
    facesHelper.getRenderResponse().createResourceURL();
resourceUrl.setProperty("download", Boolean.TRUE.toString());
resourceUrl.setProperty("format", "csv");

Unfortunately the URL looks this:

/portal/portal/default/noRoles/MyPortletNoSecurityWindow?action=b&cacheability=PAGE

I can see no properties.

When I'm in the serveResource method of my portlet, the getProperty() on download returns null.

Upvotes: 1

Views: 273

Answers (1)

user321068
user321068

Reputation:

Thou shall use setParameter instead of setProperty.

Upvotes: 2

Related Questions