On Jun 18, 2009, at 11:48 AM, Rob Bradley wrote:
Roberto Rossi-3 wrote:
I think that you can implement a similar functionality using the
first
approach suggested to Jan, but that I still haven't try it.
Use this url:
http://<host:port>/<jetspeed>/portlet/page.psml?
entity=<portletentityid>
where page.psml is your psml page (with your portlet) and entity is
your
portlet entity id, passing it your parameters (or no one if this is
the
default action of the portlet).
The http response should contain the new html generated markup, then
using a Javascript callback you can replace the portlet content using
this new html markup.
Maybe, in the next future, we should implement something similar.
I'll post my solution.
Thanks for the quick reply and your suggestion Roberto. I have to
admit I
did try that before replying to this thread as I read your earlier
response,
however I couldn't get it working (it just gave me the entire page
instead
of markup for an individual portlet).
However I could be misinterpreting what you mean by
<portletentityid>. I was
using the fragment ID from the PSML file, should this be something
different, if so how do I obtain <portletentityid>?
The window (entity id) is available for you in the portlet request
(2.0 spec):
http://www.bluesunrise.com/portlet-api/javax/portlet/PortletRequest.html#getWindowID()
Or, for a more complete solution, say if you need all window ids on a
page, you can retrieve the PSML for any page from a call like this one
for the default page (documentation for all Ajax API calls: http://portals.apache.org/jetspeed-2/devguide/guide-ajax-api.html)
:
http://localhost:8080/jetspeed/ajaxapi
or for another page:
http://localhost:8080/jetspeed/ajaxapi/rss.psml
Your Javascript can then parse for the required entity (or window id).
Or if you know the window id beforehand, you don't need to make this
initial call.
The entity id (or window id) is available from this call:
Once you have the window id, call:
http://localhost:8080/jetspeed/portlet/?entity=dp-12
Jetspeed will use the usual security constraints to protect the
portlet, including page, portlet and portlet-window security checks
automatically for you
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscr...@portals.apache.org
For additional commands, e-mail: jetspeed-user-h...@portals.apache.org