Alloy UI Forms

Converting Simple HTML form to AUI form In this section we will see how to convert simple HTML form we have just created to an AUI form and use the AUI elements. Insert the AUI taglib definition in init.jsp, <%@tagliburi=""prefix="aui"%>

Replace our HTML form with the AUI form,

<aui:formname="fm"method="POST"action="<%= updateBookURL.toString() %>"> <aui:inputname="bookTitle"label="Book Title"/> <aui:inputname="author"/> <aui:buttontype="submit"value="Save"/> </aui:form>

1. when you use AUI, you need not have to explicitly give <portlet:namespace/>

2. ensure that you have explicitly specified the method attribute for <aui:form> tag.

3. See we have specified the “label” attribute only for bookTitle and not for author. Why? Once our changes are deployed, you will see a more cleaner / better form,

0 Attachments
Average (1 Vote)
The average rating is 5.0 stars out of 5.