Foros de discusión
Is it possible to populate Country list on liferay-ui:custom-attribute
Viththal Joshi, modificado hace 6 años.
Is it possible to populate Country list on liferay-ui:custom-attribute
New Member Mensajes: 6 Fecha de incorporación: 28/08/13 Mensajes recientes
I want to add Country dropdown in the registration form and that has to populate the values from country table. Can I achieve this with custom field? if yes, any help would be appreciated
Thanks
Thanks
Andrew Jardine, modificado hace 6 años.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
Hi Viththal,
First question would be which version of Liferay are you using? That will likely affect the best solution to your problem.
First question would be which version of Liferay are you using? That will likely affect the best solution to your problem.
Viththal Joshi, modificado hace 6 años.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
New Member Mensajes: 6 Fecha de incorporación: 28/08/13 Mensajes recientes
Thanks for the response Andrew Jardine, I am using Liferay 6.1.2 CE
Andrew Jardine, modificado hace 6 años.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
Hi Viththal,
From my perspective, using the custom attributes tag here feels a bit like shoving a square peg into a round hole. I think I would opt for a JSP hook that uses the CountryLocalService to get the values you need and then in a JSTL foreach loop add your <aui:option/> values inside an <aui:select/>.
Alternatively, I suppose you could define your own taglib, but if you did that I would probably try to do something more generic where yo ucan pass in a Map with the data the you want bound to the list. In fact, I'll bet such a taglib already exists out there that you can use. The quickest solution though I think would be the one I outlines above.
From my perspective, using the custom attributes tag here feels a bit like shoving a square peg into a round hole. I think I would opt for a JSP hook that uses the CountryLocalService to get the values you need and then in a JSTL foreach loop add your <aui:option/> values inside an <aui:select/>.
Alternatively, I suppose you could define your own taglib, but if you did that I would probably try to do something more generic where yo ucan pass in a Map with the data the you want bound to the list. In fact, I'll bet such a taglib already exists out there that you can use. The quickest solution though I think would be the one I outlines above.
Viththal Joshi, modificado hace 6 años.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
New Member Mensajes: 6 Fecha de incorporación: 28/08/13 Mensajes recientes
Yes, You are right Andrew.
Thanks
Thanks