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 Frank Otto <ot...@delta-barth.de> on 2009/06/26 12:13:20 UTC

Jetspeed 2 ajax api: Layout Selection

Hi,

how can I change the layout (number of rows and columns, size of 
columns) on a page?

I can't find a description of an ajax action.


kind regards,

Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Jetspeed 2 ajax api: Layout Selection

Posted by David Sean Taylor <d....@onehippo.com>.

On Jul 2, 2009, at 4:12 AM, Frank Otto wrote:

> Thanks, thats works. Another questions to ajax api:
>
> Can I create a new page and delete a page with ajax api?
>
More examples:

Add a page named "David" into root folder:

http://localhost:8080/jetspeed/ajaxapi?action=updatepage&method=add&path=/David&name=David&defaultLayout=jetspeed-layouts%3A%3ASimpleLayout&title=David&short-title=Dave

Remove the current page:

http://localhost:8080/jetspeed/ajaxapi/David.psml?action=updatepage&method=remove


> How can I refresh the whole page (fragment) without browser reload?
>

While there is an api to retrieve the content of a portlet or any  
aggregating fragment, its not explained so simply. You would call the  
portlet pipeline for each fragment to be rendered. This is how the  
client side aggregator works in the Jetspeed Desktop: it tries to  
render, in parallel, each and every portlet on the page. If an action  
is executed, only the render methods of the portlets on the page are  
called; the entire page is not re-rendered. You would have to study  
the Jetspeed javascript (written with the DOJO library) to acquire the  
basic knowledge to write your own Portlet API compatible-client-side  
rendering engine (assuming that is what you are after). I have been  
prototyping just that, with another javascript library called Ext.  
While its interesting, the license for Ext is a bit confusing: I don't  
think we could use Ext at Apache.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Jetspeed 2 ajax api: Layout Selection

Posted by Frank Otto <ot...@delta-barth.de>.
Thanks, thats works. Another questions to ajax api:

Can I create a new page and delete a page with ajax api?

How can I refresh the whole page (fragment) without browser reload?


kind regards,

frank

David Sean Taylor schrieb:
> 
> On Jun 29, 2009, at 11:06 PM, Frank Otto wrote:
> 
>> Hi,
>>
>> thanks for the examples. How can I get the available layouts?
>>
> 
> use the "getthemes" api. Here are getting the page decorations list in 
> xml format:
> 
> http://localhost:8080/jetspeed/ajaxapi?action=getthemes&type=pageDecorations 
> 
> 
> or the same api with json:
> 
> http://localhost:8080/jetspeed/ajaxapi?action=getthemes&type=pageDecorations&format=json 
> 
> 
> other getthemes apis are available with type =
> 
> pageDecorations
> portletDecorations
> desktopPageDecorations
> desktopPortletDecorations
> layouts
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Jetspeed 2 ajax api: Layout Selection

Posted by David Sean Taylor <d....@onehippo.com>.
On Jun 29, 2009, at 11:06 PM, Frank Otto wrote:

> Hi,
>
> thanks for the examples. How can I get the available layouts?
>

use the "getthemes" api. Here are getting the page decorations list in  
xml format:

http://localhost:8080/jetspeed/ajaxapi?action=getthemes&type=pageDecorations

or the same api with json:

http://localhost:8080/jetspeed/ajaxapi?action=getthemes&type=pageDecorations&format=json

other getthemes apis are available with type =

pageDecorations
portletDecorations
desktopPageDecorations
desktopPortletDecorations
layouts

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Jetspeed 2 ajax api: Layout Selection

Posted by Frank Otto <ot...@delta-barth.de>.
Hi,

thanks for the examples. How can I get the available layouts?


kind regards,

Frank

David Sean Taylor schrieb:
> 
> On Jun 26, 2009, at 3:13 AM, Frank Otto wrote:
> 
>> Hi,
>>
>> how can I change the layout (number of rows and columns, size of 
>> columns) on a page?
>>
>> I can't find a description of an ajax action.
> 
> Example to change layout:
> 
> http://localhost:8080/jetspeed/ajaxapi/default-page.psml?action=updatepage&method=update-fragment&id=dp-1&layout=jetspeed-layouts%3A%3AVelocityThreeColumns 
> 
> 
> Example to change Decorator:
> 
> http://localhost:8080/jetspeed/ajaxapi/default-page.psml?action=updatepage&method=info&layout-decorator=blueocean 
> 
> 
> Example to change size of columns in a layout:
> 
> http://localhost:8080/jetspeed/ajaxapi/default-page.psml?action=updatepage&method=update-fragment&id=dp-1&layout=jetspeed-layouts%3A%3AVelocityTwoColumns&sizes=51%25%2C49%25 
> 
> 
> I apologize for not having the complete Jetspeed AJAX API documented. I 
> have added a task for the next release here:
> 
> https://issues.apache.org/jira/browse/JS2-1038
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Jetspeed 2 ajax api: Layout Selection

Posted by David Sean Taylor <d....@onehippo.com>.
On Jun 26, 2009, at 3:13 AM, Frank Otto wrote:

> Hi,
>
> how can I change the layout (number of rows and columns, size of  
> columns) on a page?
>
> I can't find a description of an ajax action.

Example to change layout:

http://localhost:8080/jetspeed/ajaxapi/default-page.psml?action=updatepage&method=update-fragment&id=dp-1&layout=jetspeed-layouts%3A%3AVelocityThreeColumns

Example to change Decorator:

http://localhost:8080/jetspeed/ajaxapi/default-page.psml?action=updatepage&method=info&layout-decorator=blueocean

Example to change size of columns in a layout:

http://localhost:8080/jetspeed/ajaxapi/default-page.psml?action=updatepage&method=update-fragment&id=dp-1&layout=jetspeed-layouts%3A%3AVelocityTwoColumns&sizes=51%25%2C49%25

I apologize for not having the complete Jetspeed AJAX API documented.  
I have added a task for the next release here:

https://issues.apache.org/jira/browse/JS2-1038


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org