You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Tarun Mangal <ta...@gmail.com> on 2006/04/06 12:26:44 UTC
Getting portlet data using AJAX
Hi,
I'm using the following url to get the rendered content of the portlet.
http://localhost:8080/jetspeed/portlet?entity=po-12352352&portlet=simplest::SecondSimplest
The data that i get is the plane html data of the portlet and not the data
with the Decorator portion added to it. That is to say i'm getting
<H2>WebStation 2.0 US Team</H2>
<Table>
<tr>
<td>
<b>S. No.</b>
</td>
<td>
<b>First Name</b>
</td>
<td>
<b>Second Name</b>
</td>
</tr>
<tr>
<td>1</td>
<td>Craig</td>
<td>Nies</td>
</tr>
<tr>
<td>2</td>
<td>Terry</td>
<td>Partridge</td>
</tr>
<tr>
<td>3</td>
<td>Ji-Long</td>
<td>Rao</td>
</tr>
</Table>
Whereas I'm expecting something like this
<tbody><tr>
<td class="PTitleLeft" style="font-size: 1pt;" nowrap="true"> </td>
<td class="PTitle" align="left" valign="middle">
Second Simple Title
</td>
<td class="PTitle" align="right" valign="middle">
<table border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td class="PTitle" align="right" valign="middle">
<div class="PActionBar">
<a href="http://localhost:8080/jetspeed/portal/_ns:YVAtMTBhNmU3ODFhMWQtMTAwMDB8ZDI_/boom.psml"
title="minimized" class="action portlet-action"><img
src="decorations/portlet/fico/images/minimized.gif" alt="minimized"
border="0"></a>
<a href="http://localhost:8080/jetspeed/portal/_ns:YVAtMTBhNmU3ODFhMWQtMTAwMDB8ZDE_/boom.psml"
title="maximized" class="action portlet-action"><img
src="decorations/portlet/fico/images/maximized.gif" alt="maximized"
border="0"></a>
<img src="decorations/portlet/fico/images/pop.JPG"
alt="Pop-up" onclick="winPopUp('http://localhost:8080/jetspeed/portal/popup/two.psml')"
border="0">
<img src="decorations/portlet/fico/images/dock.JPG" alt="Dock"
onclick="handleDockRequest('http://localhost:8080/jetspeed/ajax/add_dock.ajax?ajax_service=createDock.getNewDock&ajax_param_0_str=admin&ajax_param_0_str=simplest-1P-10a6e781a1d-10000')"
border="0">
</div>
</td><td>
</td></tr>
</tbody></table>
</td>
<td class="PTitleRight" style="font-size: 1pt;" nowrap="true"> </td>
</tr>
<tr>
<td class="PContentLeft" nowrap="nowrap"> </td>
<td class="PContent" colspan="2">
<h2>WebStation 2.0 US Team</h2>
<table>
<tbody><tr>
<td>
<b>S. No.</b>
</td>
<td>
<b>First Name</b>
</td>
<td>
<b>Second Name</b>
</td>
</tr>
<tr>
<td>1</td>
<td>Craig</td>
<td>Nies</td>
</tr>
<tr>
<td>2</td>
<td>Terry</td>
<td>Partridge</td>
</tr>
<tr>
<td>3</td>
<td>Ji-Long</td>
<td>Rao</td>
</tr>
</tbody></table>
</td>
<td class="PContentRight"><div class="PContentRight"> </div></td>
</tr>
<tr>
<td class="PBottomLeft" style="font-size: 1pt;" nowrap="true"> </td>
<td class="PBottom" style="font-size: 1pt;" nowrap="true"> </td>
<td class="PBottom" style="font-size: 1pt;" nowrap="true"> </td>
<td class="PBottomRight" style="font-size: 1pt;" nowrap="true"> </td>
</tr>
</tbody>
I checked out the code where an object of ContentFragmentImpl is created.
Here the value of the decorator is not set hence it remails null.
Can you please tell me as how i can get the rendered content of the portlet
along with the decorator?
Thanks in advance,
Tarun
Re: Getting portlet data using AJAX
Posted by David Sean Taylor <da...@bluesunrise.com>.
Tarun Mangal wrote:
> Hi All,
> I've badly stuck at this point. Kindly help.
The "portlet" pipeline only returns portlet content, NOT the decorator.
Its designed this way so that other portals can easily retrieve the
content of a portlet in their rendering engine. See the jetspeed desktop
for an example or jetspeed 1.6 "fusion".
You might want to look into adding a parameter &decorate=true and trying
to implement it that way. I won't have time to look into this right now
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Getting portlet data using AJAX
Posted by Tarun Mangal <ta...@gmail.com>.
Hi All,
I've badly stuck at this point. Kindly help.
Thanks,
Tarun
---------- Forwarded message ----------
From: Tarun Mangal <ta...@gmail.com>
Date: Apr 6, 2006 3:56 PM
Subject: Getting portlet data using AJAX
To: Jetspeed Users List <je...@portals.apache.org>
Hi,
I'm using the following url to get the rendered content of the portlet.
http://localhost:8080/jetspeed/portlet?entity=po-12352352&portlet=simplest::SecondSimplest
The data that i get is the plane html data of the portlet and not the data
with the Decorator portion added to it. That is to say i'm getting
<H2>WebStation
2.0 US Team</H2>
<Table>
<tr>
<td>
<
b>S. No.</b>
</td>
<td>
<b>First Name</
b>
</td>
<td>
<b>Second Name</b>
</td>
</tr>
<tr>
<td>1</td>
<td>Craig</td>
<td>Nies</td>
</
tr>
<tr>
<td>2</td>
<td>Terry</
td>
<td>Partridge</td>
</tr>
<tr>
<
td>3</td>
<td>Ji-Long</td>
<td>Rao</
td>
</tr>
</Table>
Whereas I'm expecting something like this
<
tbody><tr>
<td class="PTitleLeft"
style="font-size: 1pt;" nowrap="true"> </
td>
<td class="PTitle" align
="left" valign="middle">
Second Simple Title
</
td>
<td class="PTitle" align=
"right" valign="middle">
<table border=
"0" cellpadding="0" cellspacing=
"0">
<tbody><tr>
<td class=
"PTitle" align="right" valign="middle"
>
<div class="PActionBar">
<a
href="http://localhost:8080/jetspeed/portal/_ns:YVAtMTBhNmU3ODFhMWQtMTAwMDB8ZDI_/boom.psml
" title="minimized" class="action portlet-action"
><img src="decorations/portlet/fico/images/minimized.gif" alt
="minimized" border="0"></a>
<
a href="http://localhost:8080/jetspeed/portal/_ns:YVAtMTBhNmU3ODFhMWQtMTAwMDB8ZDE_/boom.psml
" title="maximized" class="action portlet-action"
><img src="decorations/portlet/fico/images/maximized.gif" alt
="maximized" border="0"></a>
<
img src="decorations/portlet/fico/images/pop.JPG" alt="Pop-up"
onclick="winPopUp('http://localhost:8080/jetspeed/portal/popup/two.psml'
<http://localhost:8080/jetspeed/portal/popup/two.psml%27>)"
border="0">
<img src=
"decorations/portlet/fico/images/dock.JPG" alt="Dock" onclick=
"handleDockRequest('http://localhost:8080/jetspeed/ajax/add_dock.ajax?ajax_service=createDock.getNewDock&ajax_param_0_str=admin&ajax_param_0_str=simplest-1P-10a6e781a1d-10000'
<http://localhost:8080/jetspeed/ajax/add_dock.ajax?ajax_service=createDock.getNewDock&ajax_param_0_str=admin&ajax_param_0_str=simplest-1P-10a6e781a1d-10000%27>)"
border="0">
</div>
</td><
td>
</td></tr>
</tbody></table>
</
td>
<td class="PTitleRight" style=
"font-size: 1pt;" nowrap="true"> </td>
</
tr>
<tr>
<td class="PContentLeft"
nowrap="nowrap"> </td>
<
td class="PContent" colspan="2">
<
h2>WebStation 2.0 US Team</h2>
<table>
<tbody><
tr>
<td>
<b>S. No.</b>
</td>
<
td>
<b>First Name</b>
</td>
<td>
<
b>Second Name</b>
</td>
</tr>
<tr>
<
td>1</td>
<td>Craig</td>
<td>Nies</
td>
</tr>
<tr>
<td>2</td>
<
td>Terry</td>
<td>Partridge</td>
</tr>
<
tr>
<td>3</td>
<td>Ji-Long</td>
<
td>Rao</td>
</tr>
</tbody></table>
</
td>
<td class="PContentRight"><div
class="PContentRight"> </div></td>
</
tr>
<tr>
<td class="PBottomLeft"
style="font-size: 1pt;" nowrap="true"> </
td>
<td class="PBottom" style
="font-size: 1pt;" nowrap="true"> </
td>
<td class="PBottom" style=
"font-size: 1pt;" nowrap="true"> </td>
<td class="PBottomRight" style="font-size: 1pt;"
nowrap="true"> </td>
</tr
>
</tbody>
I checked out the code where an object of ContentFragmentImpl is created.
Here the value of the decorator is not set hence it remails null.
Can you please tell me as how i can get the rendered content of the portlet
along with the decorator?
Thanks in advance,
Tarun
--
Tarun