Liferay常用标签的使用
一、AUI标签:
????<aui:form action="<%=testURL%>" method="post" cssid="fm" name="fm" inlineLabel="true">
??????? <aui:layout>
????????????? <aui:column columnWidth="50">
?????????????????? <aui:fieldset column="false" label="fieldset">
??????????????????????? <aui:field-wrapper label="field wrapper" required="true" />
????????????????????????<aui:a href="http://www.baidu.com" label="BaiDu" target="_blank" title="baidu" />
?????????????????? </aui:fieldset>
?
?????????????????? <aui:select id="sel" name="sel" showEmptyOption="true" inlineLabel="left" helpMessage="help message">
??????????????????????? <aui:option label="YuWen" value="yw"></aui:option>
??????????????????????? <aui:option label="YingYu" value="yy" selected="true"></aui:option>
???????????????????</aui:select>
????????????? </aui:column>
??
????????????? <aui:column columnWidth="50">
??????????????????? <aui:input id="username1" name="username1" type="text" label="uid1" />
???
???????????????????? <!-- type: text, hidden, password, checkbox, assetCategories, assetTags, timeZone, empty -->
???????????????????? <aui:input id="username2" name="username2" type="text" label="lbl-uid2"
?????????????????????????? helpMessage="this is username2" inlineLabel="true"
???????????????????????????suffix="right tip message"/>
????
???????????????????? <aui:input type="textarea" name="comments" />
???
???????????????????? <aui:field-wrapper inlineField="true" required="true">
??????????????????????????? <aui:input name="gender" type="radio" label="male" value="1" inlineLabel="right"></aui:input>
??????????????????????????? <aui:input name="gender" type="radio" label="female" value="2" inlineLabel="right" checked="true"></aui:input>
????????????????????? </aui:field-wrapper>
??????????????? </aui:column>
???????? </aui:layout>
?
???????? <aui:button-row>
???????????????? <aui:button cssinputCssname="btn1" type="submit" value="submit" />
???????????????? <aui:button name="btn2" type="button" value="button" />
????????? </aui:button-row>
</aui:form>?
?
?
二、Portlet标签:
??? 1、renderURL标签:创建一个当前RenderURL
??????? <portlet:renderURL portletMode="view" windowState="maximized">
??????????? <portlet:param name="jspPage" value="/edit.jsp"/>
??????????? <portlet:param name="number" value="1"/>
??????????? <portlet:param name="page" value="2"/>
??????? </portlet:renderURL>
?
???2、defineObjects标签:将很多liferay的变量放到pageContext中。
??????? JSR 168 (Portlet 1.0) 可访问的参数:renderRequest、renderResponse、portletConfig
??????? JSR 268 (Portlet 2.0) 可访问的参数:renderRequest、renderResponse、resourceRequest、??????? resourceResponse、actionRequest、actionResponse、eventRequest、eventResponse、portletConfig、portletSession、portletSessionScope、portletPreferences、portletPreferencesValues
?
??? 3、namespace标签:为目前的Portlet产生一个唯一的Value,防止与其他Portlet或者Portal上面的Value冲突。
??????? <portlet:namespace />
?
??? 4、resourceURL标签:ResourceURL主要用作返回Portlet资源,比如js、css、swf文件,图片等。
?
??? 5、actionURL标签:创建一个当前ActionURL
??????? <portlet:actionURL windowState="normal" PortletMode="edit">?
??????????? <portlet:param name="action" value="login"/>
??????? </portlet:actionURL>
?