0

Does AlloyUI has combobox? How can I locate one in my JSP file in Liferay? and how can I fill it from database?

4

1 回答 1

3

jsp:

<aui:form action="<%=actionUrl%>" method="post">
    <aui:select name="city" label="What city do you prefer?" id="selectedCity">
        <aui:option value="Moskau" label="Moskau" selected="${lastSelectedCity=='Moskau'}"/>
        <aui:option value="New Your" label="New York" selected="${lastSelectedCity=='New York'}"/>
        <aui:option value="London" label="London" selected="${lastSelectedCity=='London'}"/>
        <aui:option value="Berlin" label="Berlin" selected="${lastSelectedCity=='Berlin'}"/>
    </aui:select>
</aui:form>

爪哇动作:

@Override
    public String render(PortletConfig portletConfig, RenderRequest request, RenderResponse renderResponse)
            throws Exception {

        request.setAttribute("lastSelectedCity", lastSelectedCity);

        return "/html/next.jsp";
    }
于 2012-04-15T18:15:28.393 回答