Q:
Hi!
I'm developing customized installation of Liferay with using ext-environment. We have several portlets and several service.xml in it. For one entity I'm using Date field and I need to enter only Date (without time) in liferay-ui:input-field tag.
So, I edited my ext-model-hists.xml and added <hint name="show-time"> false</hint> there.
But, problem is - every time, I run ServiceBuilder for all services in project (we have it in our build file to refresh DB & SQL scripts) - that hints file regenereated - and my changes lost.
Are there any way to set hints in service.xml (for example), so every time I generate service with ServiceBuilder - they will go into model-hints file?
Thank you for any advice!
I'm developing customized installation of Liferay with using ext-environment. We have several portlets and several service.xml in it. For one entity I'm using Date field and I need to enter only Date (without time) in liferay-ui:input-field tag.
So, I edited my ext-model-hists.xml and added <hint name="show-time"> false</hint> there.
But, problem is - every time, I run ServiceBuilder for all services in project (we have it in our build file to refresh DB & SQL scripts) - that hints file regenereated - and my changes lost.
Are there any way to set hints in service.xml (for example), so every time I generate service with ServiceBuilder - they will go into model-hints file?
Thank you for any advice!
A:
I believe you can override your
ext-model-hints.xml file with your own by adding this to your portal-ext.properties:
##
## Model Hints
##
#
# Input a list of comma delimited model hints configurations.
#
model.hints.configs=\
META-INF/portal-model-hints.xml,\
META-INF/ext-model-hints.xml,\
META-INF/portlet-model-hints.xml,\
META-INF/your-custom-model-hints.xml
## Model Hints
##
#
# Input a list of comma delimited model hints configurations.
#
model.hints.configs=\
META-INF/portal-model-hints.xml,\
META-INF/ext-model-hints.xml,\
META-INF/portlet-model-hints.xml,\
META-INF/your-custom-model-hints.xml
and in the file, copy and paste the <model> section you want to override and then make your modifications there.
(I haven't actually tried that myself, but it should work ...)
No comments:
Post a Comment