Fórum

Populate Search Container Results from DropDown Using Alloy UI Ajax?

David Ilechukwu, modificado 11 Anos atrás.

Populate Search Container Results from DropDown Using Alloy UI Ajax?

Regular Member Postagens: 154 Data de Entrada: 07/06/10 Postagens Recentes
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:


&lt;%
    List<book> books = (List)request.getAttribute("books");
%&gt;  

    <aui:select name="Books">
              
&lt;%
    for (Book book : books) {
%&gt;
            <aui:option value="<%= book.getBookId() %>">
                &lt;%= book.getBookName() %&gt;
            </aui:option>
&lt;%
    }
%&gt;                     
    </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
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Populate Search Container Results from DropDown Using Alloy UI Ajax?

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
David 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