Fórum
Is it possible to populate Country list on liferay-ui:custom-attribute
Viththal Joshi, modificado 6 Anos atrás.
Is it possible to populate Country list on liferay-ui:custom-attribute
New Member Postagens: 6 Data de Entrada: 28/08/13 Postagens Recentes
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 6 Anos atrás.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
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 6 Anos atrás.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
New Member Postagens: 6 Data de Entrada: 28/08/13 Postagens Recentes
Thanks for the response Andrew Jardine, I am using Liferay 6.1.2 CE
Andrew Jardine, modificado 6 Anos atrás.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
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 6 Anos atrás.
RE: Is it possible to populate Country list on liferay-ui:custom-attribute
New Member Postagens: 6 Data de Entrada: 28/08/13 Postagens Recentes
Yes, You are right Andrew.
Thanks
Thanks