Fórum

Portlet for Control Panel and Portal

Jatinderpal Singh, modificado 8 Anos atrás.

Portlet for Control Panel and Portal

Junior Member Postagens: 49 Data de Entrada: 14/08/15 Postagens Recentes
Hi !
I want to create plugin for my students. It should have 2 parts : - one from Control Panel and second is front end.
From control panel, teacher should be able to add/edit/view the marks of the students. This part I have completed.
Now I am pending with second part in which I have to display the scores entered in control panel should be displayed on portal.

My question is whether I should create another plugin which will access the tables created by "control panel plugin"
or
is there any way to create view for front end within the same plugin project.?
thumbnail
Sandeep Nair, modificado 8 Anos atrás.

RE: Portlet for Control Panel and Portal

Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
You can package multiple portlets in same plugin project.

http://www.opensource-techblog.com/2012/12/how-to-create-multiple-portlets-in.html

Regards,
Sandeep
thumbnail
Chirag M Gurav, modificado 8 Anos atrás.

RE: Portlet for Control Panel and Portal

Junior Member Postagens: 34 Data de Entrada: 04/01/13 Postagens Recentes
in your case your can do two thing

1 ) create new plugin portlet inside the control panel portlet. so your new student portlet able to access all the services which you have created in the control panel portlet

2 ) you can also create new separate student portlet and liferay-plugin-package.properties add the required-deployment-contexts=name of control panel portlet
so using this way you can able to access the services of one portlet to another portlet

Let me know if you have any doubts or further query.
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Portlet for Control Panel and Portal

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Chirag M Gurav:
i2 ) you can also create new separate student portlet and liferay-plugin-package.properties add the required-deployment-contexts=name of control panel portlet so using this way you can able to access the services of one portlet to another portlet.


Wrong wrong wrong.

The required deployment context value will not do anything with a relation to some portlet that is in the control panel.

Required deployment context is used to ensure the portal will start the required plugin context before the current one. The only time you do this is when the other plugin is a service-providing portlet (ala Service Builder) and you want to ensure it is up and running before the portal starts the current plugin.

But otherwise it has no impact on other miscellaneous portlets outside of forcing a start order that isn't necessary.
thumbnail
Chirag M Gurav, modificado 8 Anos atrás.

RE: Portlet for Control Panel and Portal

Junior Member Postagens: 34 Data de Entrada: 04/01/13 Postagens Recentes
Thanks Devid, for correcting me !
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Portlet for Control Panel and Portal (Resposta)

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Jatinderpal Singh:
My question is whether I should create another plugin which will access the tables created by "control panel plugin" or is there any way to create view for front end within the same plugin project.?


You can go either way.

You can create them as two separate plugin projects or as Sandeep suggests you can do them in one plugin.

Typically I recommend merging related plugins into a single project (less server side resource consumption because you're deploying fewer war files), but there are cases where a split is better (i.e. two different developers are each working on a separate plugin in the project, in a revision control system you'd have to deal with the collision resolution).

"Related" is also a matter of interpretation. You can argue that 50 portlets created for a single business are related (they all apply to the business), but a project of that size can be difficult to work with. You can also argue that separating the plugins by department in the business or silos of business concepts (sales, assets, finance, etc) should mark where you draw the lines.

If you're getting the idea that the choice is subjective, well it is. The choice is yours and it will work whichever way you go, so make the choice that works best for your organization, your team, and your development style.
Jatinderpal Singh, modificado 8 Anos atrás.

RE: Portlet for Control Panel and Portal

Junior Member Postagens: 49 Data de Entrada: 14/08/15 Postagens Recentes
Thank you so much guys for early response.

Special thanks to David H Nebinger for helping.

I decided to merge the portlets. It is easy to maintain different related portlets for me.emoticon