I precise that i am a beginner developper with Liferay 7. I have created a select box where i recover my Organisations. But i want create a second select box that depend of the first. When i have select a organisation , i want saw my SubOrganisations of the organisation selected. I don't konw where i have to begin ;( I hope i have been clear :) .
My portlet :
`public class NetcofilmoPortlet extends MVCPortlet {
public List<Organization> getOrga() {
Long companyId = PortalUtil.getCompanyIds()[0];
Long parentOrgaId = OrganizationLocalServiceUtil.getOrganizationId(companyId, "Crédit Agricole");
List<Organization> Siege = OrganizationLocalServiceUtil.getOrganizations(companyId, parentOrgaId);
return Siege;
}
@Override
protected void doDispatch(RenderRequest request, RenderResponse response) throws IOException, PortletException {
request.setAttribute("listeOrganisations", getOrga());
super.doDispatch(request, response);
}
}`
<aui:select name="Siege" onChange="submit();" id="Siege">
<aui:option value="" selected="true">---Select---</aui:option>
<c:forEach var="organisation" items="${listeOrganisations}">
<aui:option value="${organisation.getOrganizationId()}">${organisation.getName()}</aui:option>
</c:forEach>