Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Combining two different Module Type as one Module - Liferay DXP?
We have a requirement to display Google Captcha in Login screen in Liferay DXP.
Usually, we will customize the jsp and Login event / struts action in a same hook war in earlier versions ( 6.x ).
we will follow below approach in Liferay DXP.
1. Create Module for (login.web )JSP fragmentation / Dynamic include...etc, .
2. Create the Module for customizing "/login/login" MVCCommand ( Action / Resource ) to validate that captcha request.
But my question is here, can we merge both customization ( JSP Fragment and MVCCommand) at one module? [ Hope OSGI modularity architecture wont allow this scenario, but need to find alternate solution ].
Reason behind this is, I need to add "portlet.properties" inside the module to read some keys.
In this case, i have to add the same keys in both modules of "portlet.properties". Though we have a alternate solutions to add keys in "portal-ext.properties / portlet preference", but need to find out the way for the above approach.
Any idea guys?
Usually, we will customize the jsp and Login event / struts action in a same hook war in earlier versions ( 6.x ).
we will follow below approach in Liferay DXP.
1. Create Module for (login.web )JSP fragmentation / Dynamic include...etc, .
2. Create the Module for customizing "/login/login" MVCCommand ( Action / Resource ) to validate that captcha request.
But my question is here, can we merge both customization ( JSP Fragment and MVCCommand) at one module? [ Hope OSGI modularity architecture wont allow this scenario, but need to find alternate solution ].
Reason behind this is, I need to add "portlet.properties" inside the module to read some keys.
In this case, i have to add the same keys in both modules of "portlet.properties". Though we have a alternate solutions to add keys in "portal-ext.properties / portlet preference", but need to find out the way for the above approach.
Any idea guys?
Fragment bundles have no "executable" state to them, they can only provide resources to the host bundle.
So in this case, no, you can't put them together because the MVC command overrides need to go into a real bundle. Now if you had a model listener, a service wrapper, some MVC commands for another portlet, etc? All of those can be merged into a single bundle (although I wouldn't recommend that at all).
There's no problem having a large number of cleanly organized bundles, the system has no problem with lots of bundles...
So in this case, no, you can't put them together because the MVC command overrides need to go into a real bundle. Now if you had a model listener, a service wrapper, some MVC commands for another portlet, etc? All of those can be merged into a single bundle (although I wouldn't recommend that at all).
There's no problem having a large number of cleanly organized bundles, the system has no problem with lots of bundles...
Got it David. Thanks for the clarification.