Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Anonymous
Add Portlet to Layout
November 5, 2007 3:56 PM
Answer

Anonymous

I would like to run a stand-alone java program to add Layouts and Portlets into Layouts programmatically.

I did the following to successfully add the Layouts

// HttpPrincipal httpPrincipal = new HttpPrincipal("http://localhost:8080", "liferay.com.1", "test");
// LayoutServiceHttp.addLayout(httpPrincipal,,,,,,,,,);

There is a thread here mentioned function "addPortletId". I tried this function the same way as "addLayout", however, it didn't work. I got "BeanLocatorIsNull" Exception.

It seems easy to call addPortlet function in view.jsp, but I would like to run a stand-alone java program rather than triggering the function on webpage. I am not an expert on web development. I am looking forward to getting some advices here. Thanks in advance.
Liqiao Ying
RE: Add Portlet to Layout
November 6, 2007 2:59 PM
Answer

Liqiao Ying

Rank: New Member

Posts: 7

Join Date: November 5, 2007

Recent Posts

anyone know?
Liqiao Ying
RE: Add Portlet to Layout
November 7, 2007 10:34 PM
Answer

Liqiao Ying

Rank: New Member

Posts: 7

Join Date: November 5, 2007

Recent Posts

upup
Roman Hoyenko
RE: Add Portlet to Layout
November 8, 2007 10:51 AM
Answer

Roman Hoyenko

Community Moderator

Rank: Liferay Master

Posts: 868

Join Date: October 8, 2007

Recent Posts

I think this page might help you:
http://wiki.liferay.com/index.php/Service_Builder


You need to get a service first before using it.
Liqiao Ying
RE: Add Portlet to Layout
November 9, 2007 8:19 AM
Answer

Liqiao Ying

Rank: New Member

Posts: 7

Join Date: November 5, 2007

Recent Posts

thank you so much.