Fórum
How to use liferay-dynamic-select in liferay 7
mudduchetty Abhinav, modificado 7 Anos atrás.
How to use liferay-dynamic-select in liferay 7
New Member Postagens: 3 Data de Entrada: 25/02/16 Postagens Recentes
In order to use liferay-dynamic-select i had set this in 6.1
themedisplay.setIncludeServiceJs(true);
but now there is no setIncludeServiceJs method for theme display in liferay 7 so how do i use liferay-dynamic-select in liferay 7?
themedisplay.setIncludeServiceJs(true);
but now there is no setIncludeServiceJs method for theme display in liferay 7 so how do i use liferay-dynamic-select in liferay 7?
Srikanth Shanigaram, modificado 7 Anos atrás.
RE: How to use liferay-dynamic-select in liferay 7 (Resposta)
Junior Member Postagens: 55 Data de Entrada: 07/10/14 Postagens Recentes
Try with below code:
Regards,
Srikanth
<aui:select label="country" name="countrybox"></aui:select>
<aui:select label="region" name="regionbox"></aui:select>
<aui:script use="liferay-address,liferay-dynamic-select">
new Liferay.DynamicSelect(
[
{
select: '<portlet:namespace />countrybox',
selectData: Liferay.Address.getCountries,
selectDesc: 'nameCurrentValue',
selectId: 'countryId',
selectSort: '<%= true %>',
selectVal: '0'
},
{
select: '<portlet:namespace />regionbox',
selectData: Liferay.Address.getRegions,
selectDesc: 'name',
selectId: 'regionId',
selectVal: '0'
}
]
);
</aui:script>
Regards,
Srikanth
mudduchetty Abhinav, modificado 7 Anos atrás.
RE: How to use liferay-dynamic-select in liferay 7
New Member Postagens: 3 Data de Entrada: 25/02/16 Postagens Recentes
Thanks for the solution it is working