Foren

add new field type in web form portlet

Kaouther Ajala, geändert vor 8 Jahren.

add new field type in web form portlet

New Member Beiträge: 24 Beitrittsdatum: 10.02.15 Neueste Beiträge
hi,

i'm using liferay 6.2 ga4, i want to add new field type in liferay portet which is multiple selection list in which i will put

member site .

so i have two questions:

1:haw add this type to the portlet ,so when i create a new field i choose selection list as type.

2:how i will put list of site members in this list

please can any body help me and give which files i should modify?

thanks
thumbnail
Eric COQUELIN, geändert vor 8 Jahren.

RE: add new field type in web form portlet

Expert Beiträge: 254 Beitrittsdatum: 03.11.13 Neueste Beiträge
Bonjour Kaouther,

I don't understand exactly what you want to acheive but will try to answer each of your question.

1:haw add this type to the portlet ,so when i create a new field i choose selection list as type.

If you are talking about an select input, then you just have to create a JSP page and add a select input. When using Eclipse IDE and create a portlet using the wizzard, it generates usually a view.jsp page. Just add your select input. I would recommend you use "aui" taglibs.

<aui:form>
<aui:select name="mylist">
<aui:option name="item 1" value="1" />
<aui:option name="item 2" value="2" />
</aui:select>
</aui:form>


2: how i will put list of site members in this list


List of members of a site I assume. Then, populate the list above (aui:option) with the result of list of User. You can get list of users using the UserLocalServiceUtil class. There are multiple ways of getting list of users, you "just" need to know which list you want.

PS: si vous préférez échanger en français, ouvrez un fil dans le forum français
Kaouther Ajala, geändert vor 8 Jahren.

RE: add new field type in web form portlet

New Member Beiträge: 24 Beitrittsdatum: 10.02.15 Neueste Beiträge
merci bcp de m'avoir répondre
voilà ma question posé en français sur ce lien:https://www.liferay.com/fr/community/forums/-/message_boards/message/60722632