Message Boards

Add Portlet to Layout

Anonymous, modified 16 Years ago.

Add Portlet to Layout

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, modified 16 Years ago.

RE: Add Portlet to Layout

New Member Posts: 7 Join Date: 11/6/07 Recent Posts
anyone know?
Liqiao Ying, modified 16 Years ago.

RE: Add Portlet to Layout

New Member Posts: 7 Join Date: 11/6/07 Recent Posts
upup
thumbnail
Roman Hoyenko, modified 16 Years ago.

RE: Add Portlet to Layout

Liferay Master Posts: 878 Join Date: 10/8/07 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, modified 16 Years ago.

RE: Add Portlet to Layout

New Member Posts: 7 Join Date: 11/6/07 Recent Posts
thank you so much.