AUI FORM

AlloyUI is a UI framework built on top of YUI3 that provides a simple API for building high scalable applications.
Before writing the form on jsp we need to import the taglib 
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
the following example illustrate the above concept.
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>

<portlet:renderURL var="submitURL">
 <portlet:param name="jspPage" value="/submit.jsp" />
</portlet:renderURL>

<aui:form action="<%= submitURL %>" method="post">

 <aui:input label="First name" name="fname" type="text" value=""/>
 <aui:input label="Last name" name="lname" type="text" value=""/>
 <aui:input label="Password" name="pwd" type="password" value=""/>

 <b>Gender</b>
 <aui:input label="Male" name="gender" type="radio" value="Male"/>
 <aui:input label="Female" name="gender" type="radio" value="Female"/>

 <b>Language</b>
 <aui:input label="C" name="lang" type="checkbox" value="C"/>
 <aui:input label="Java" name="lang" type="checkbox" value="Java"/>
 <aui:input label="Perl" name="lang" type="checkbox" value="Perl"/>

 <aui:input name="hiddenValue" type="hidden" value="hide it"/>

 <aui:button type="submit" value="Submit Form"/>
 <aui:button type="reset" value="Reset Form"/>

</aui:form>

Search This Blog

All the rights are reserved to this blog is belongs to me only.. Powered by Blogger.