This content has been marked as final.
Show 3 replies
-
1. Re: how to get LayoutService in a external webapp (not portl
theute Jul 13, 2007 6:15 AM (in response to cpage)I'm curous, why do you need to access the LayoutService in your layout webapp ?
It's supposed to manage your layouts, but your layout shouldn't need to access it. -
2. Re: how to get LayoutService in a external webapp (not portl
cpage Jul 13, 2007 6:37 AM (in response to cpage)i have one generic jsp for all of my layouts. (to make easiest the maintenability)
so, instead of something like that in many jsp<p:region regionName='left' regionID='regionA'/> <p:region regionName='center' regionID='regionB'/> ....
i have a custom tag who generate the good tags p:region :
<cp:myownregionTag>
public class MyOwnRegionTagHandler extends RegionTagHandler{
...
for each regions ....
{
setRegionID(layoutName + "-" + region.getId());
setRegionName(region.getId());
super.doTag();
}
i get the list of the regions from the pageResult
but page.getRegions don't get the empty regionsPageContext app = (PageContext) getJspContext(); HttpServletRequest request = (HttpServletRequest) app.getRequest(); PageResult page = (PageResult) request.getAttribute(LayoutConstants.ATTR_PAGE); String layoutName = page.getProperty("layout.id");
most of the times, this works well because i don't have empty regions.
but in the dashboard, users could move portlets and make empty regions and when they reconnect, they can't move back there portlets because region is no longer in the page layout. -
3. Re: how to get LayoutService in a external webapp (not portl
cpage Jul 13, 2007 9:50 AM (in response to cpage)ok, temporarelly, i register the layoutservice with jndi to get the service outside portal or portlet context.
I will look at a better way later ...
regards