Foros de discusión
Populate Search Container Results from DropDown Using Alloy UI Ajax?
David Ilechukwu, modificado hace 11 años.
Populate Search Container Results from DropDown Using Alloy UI Ajax?
Regular Member Mensajes: 154 Fecha de incorporación: 7/06/10 Mensajes recientes
I have a dropdown (an <aui-select>) on my jsp page. I also use a search results container on the same page - whose results is dependent on the value selected in the dropdown like this:
Now the problem is that I need to make an AJAX call to a class with populates the List books variable - each time something new is selected in the Books dropdown.
The only example I've seen uses Liferay.DynamicSelect - which is only suitable for 2 dependent dropdowns - and not for a jsp variavle dependent on a dropdown.
Anybody has any ideas about this? Need to urgently get this off the way, ASAP.
Regards All
<%
List<book> books = (List)request.getAttribute("books");
%>
<aui:select name="Books">
<%
for (Book book : books) {
%>
<aui:option value="<%= book.getBookId() %>">
<%= book.getBookName() %>
</aui:option>
<%
}
%>
</aui:select>
<liferay-ui:search-container headernames="name,roles,null">
<liferay-ui:search-container-results results="<%= books %>" total="<%= books.size() %>" />
<liferay-ui:search-container-row classname="com.lis.project.model.Book" escapedmodel="<%= true %>" keyproperty="bookId" modelvar="book">
<liferay-ui:search-container-column-text name="book-name" property="bookName" />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="<%= false %>" />
</liferay-ui:search-container>
</book>
Now the problem is that I need to make an AJAX call to a class with populates the List books variable - each time something new is selected in the Books dropdown.
The only example I've seen uses Liferay.DynamicSelect - which is only suitable for 2 dependent dropdowns - and not for a jsp variavle dependent on a dropdown.
Anybody has any ideas about this? Need to urgently get this off the way, ASAP.
Regards All
Hitoshi Ozawa, modificado hace 11 años.
RE: Populate Search Container Results from DropDown Using Alloy UI Ajax?
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientesDavid Ilechukwu
I have a dropdown (an <aui-select>) on my jsp page. I also use a search results container on the same page - whose results is dependent on the value selected in the dropdown like this:
Any reason for posting this twice?
http://www.liferay.com/community/forums/-/message_boards/message/21880827
Please read the forum guideline before posting again.
http://www.liferay.com/community/forums/-/message_boards/message/572822