Fórumok
Populate Search Container Results from DropDown Using Alloy UI Ajax?
David Ilechukwu, módosítva 11 év-val korábban
Populate Search Container Results from DropDown Using Alloy UI Ajax?
Regular Member Bejegyzések: 154 Csatlakozás dátuma: 2010.06.07. Legújabb bejegyzések
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, módosítva 11 év-val korábban
RE: Populate Search Container Results from DropDown Using Alloy UI Ajax?
Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzésekDavid 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