Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Abhishak Kumar Mishra
Create new jsp/vm for each instance
March 24, 2012 1:02 AM
Answer

Abhishak Kumar Mishra

Rank: Junior Member

Posts: 29

Join Date: February 28, 2012

Recent Posts

Is it possible to create a jsp/vm for each instance of portlet. Actually, My requirment is to use same portlet's multiple instance with different set of data. Data for instance can be static text or dynamic record.

If there will be other solution, That will be appreciated.

Thanks in advance..
Abhishak
Hitoshi Ozawa
RE: Create new jsp/vm for each instance
March 24, 2012 4:11 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Something like setting <instanceable>true</instanceable> in liferay-portlet.xml
Abhishak Kumar Mishra
RE: Create new jsp/vm for each instance
March 24, 2012 4:52 AM
Answer

Abhishak Kumar Mishra

Rank: Junior Member

Posts: 29

Join Date: February 28, 2012

Recent Posts

Hitoshi,

Thanks for reply.
But my problem is:
I have created instanceable portlet, and for each instance I want to render on different view. Rendered view will be dynamic. I mean view_instanceId.jsp will be generated if not exist.
Is there any way, we can achieve same. Or any similar approach that can fullfill the requirment.
Jelmer Kuperus
RE: Create new jsp/vm for each instance
March 24, 2012 8:52 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

Just make your portlet configurable and let people select the view they want to use in a dropdown. Store the view in a portlet preference and render the correct view based on the preference for the instance. The asset publisher portlet does the same thing when it lets you define a display style