组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Vijay Peddareddy
Is Dynamic data source switching possible in Liferay ?
2012年4月9日 下午1:23
答复

Vijay Peddareddy

等级: New Member

帖子: 10

加入日期: 2012年3月14日

最近的帖子

Hello,

I've a Portlet deployed on 3 different pages on 3 different Organizations as shown below:

Cust1 Org > Page 1 > GetMyNamePortlet
Cust2 Org > Page 1 > GetMyNamePortlet
Cust3 Org > Page 1 > GetMyNamePortlet

On click of "Get My Name" button available in the portlet, it should dynamically connect to the Schema it is mapped to and retrieve the name from that Schema. I'm trying to achieve this using Dynamic Data source routing concept.

Environment is: Liferay 6.1 + Tomcat 7 Bundle

Please help me out if any one already did this or please share any information whether it is possible or not.

Thanks a lot in advance.

Regards
Vijay Peddareddy.
Vijay Peddareddy
RE: Is Dynamic data source switching possible in Liferay ?
2012年4月10日 上午9:38
答复

Vijay Peddareddy

等级: New Member

帖子: 10

加入日期: 2012年3月14日

最近的帖子

Hello,

Could someone please help me whether this is possible in Liferay ? If it is, please share your thoughts.

Thanks a lot in advance.

Regards
Vijay Peddareddy.
Vijay Peddareddy
RE: Is Dynamic data source switching possible in Liferay ?
2012年4月24日 上午8:35
答复

Vijay Peddareddy

等级: New Member

帖子: 10

加入日期: 2012年3月14日

最近的帖子

Hello,

Could someone please help me whether dynamic data source switching is possible in Liferay ? If it is, please share your thoughts.

Thanks a lot in advance.

Regards
Vijay Peddareddy.
David H Nebinger
RE: Is Dynamic data source switching possible in Liferay ?
2012年4月24日 上午9:27
答复

David H Nebinger

等级: Liferay Legend

帖子: 7215

加入日期: 2006年9月1日

最近的帖子

'dynamic datasource routing' is not necessary for this implementation.

Add an organization id column to whatever table you're defining in service builder.

Portlet would pass the org id for the current user/page/whatever to the SB call and you return the appropriate data.
Vijay Peddareddy
RE: Is Dynamic data source switching possible in Liferay ?
2012年5月21日 下午1:53
答复

Vijay Peddareddy

等级: New Member

帖子: 10

加入日期: 2012年3月14日

最近的帖子

David H Nebinger:
'dynamic datasource routing' is not necessary for this implementation.

Add an organization id column to whatever table you're defining in service builder.

Portlet would pass the org id for the current user/page/whatever to the SB call and you return the appropriate data.



Thanks for your reply David.

As per the requirement I'm not supposed to add "organization" id column.

Finally, I'm able to achieve this functionality using Service Builder. I'll post the solution asap.

Regards
Vijay Peddareddy.
Hitoshi Ozawa
RE: Is Dynamic data source switching possible in Liferay ?
2012年5月21日 下午8:40
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 7954

加入日期: 2010年3月23日

最近的帖子

Just create a method in your impl to dynamically choose where to get the data based on organizationId send from the portlet.