导入标签<%@ taglib uri="/struts-tags" prefix="s" %>

Form标签

<s:form name="addform" method="post" namespace="/empmanager"

action="doemp_doaddemp" theme="simple">

</s:form>

 

textfield标签

<s:textfield name="emp.empname" id="txtuid"></s:textfield>

 

select标签

<s:select name="emp.dep.depid" list="deplist" listKey="depid" listValue="depname" headerKey="0" headerValue="请选择"></s:select>

 

<s:select list="deplist" listKey="depid" listValue="depname" headerKey="%{#request.emp.dep.depid}" headerValue="%{#request.emp.dep.depname}" name="emp.dep.depid" value="emp.dep.depname"></s:select>

 

<s:select headerKey="" headerValue="-请选择--" name="customer.business" list="#{'旅游服务类':'旅游服务类','金融经商类':'金融经商类','房地产类':'房地产类','医药类':'医药类','制造类':'制造类','3G类':'3G类'}"/>

<select name="customer.business">

<option>--请选择--</option>

<option &lt;s:property value="'旅游服务类'.equals(#request.customer.business)?'selected':''"/>&gt;旅游服务类</option>

<option &lt;s:property value="'金融经商类'.equals(#request.customer.business)?'selected':''"/>&gt;金融经商类</option>

<option &lt;s:property value="'房地产类'.equals(#request.customer.business)?'selected':''"/>&gt;房地产类</option>

<option &lt;s:property value="'医药类'.equals(#request.customer.business)?'selected':''"/>&gt;医药类</option>

<option &lt;s:property value="'制造类'.equals(#request.customer.business)?'selected':''"/>&gt;制造类</option>

<option &lt;s:property value="'3G类'.equals(#request.customer.business)?'selected':''"/>&gt;3G类</option>

</select>

 

iterator标签,url标签,property标签,a标签

<s:iterator value="#request.list" var="d" status="status">

<tr>

<td height="25" bgcolor="#FFFFFF">

<s:property value="%{#status.index+1}"/>

</td>

<td height="25" bgcolor="#FFFFFF">

<s:property value="%{#d.depname}"/>

</td>

<td height="25" bgcolor="#FFFFFF">

<s:url id="ediurl" action="dodep_toupdate" namespace="/depmanager">

<s:param name="dep.depid" value="%{#d.depid}"></s:param>

</s:url>

<s:url id="delurl" action="dodep_dodel" namespace="/depmanager">

<s:param name="dep.depid" value="%{#d.depid}"></s:param>

</s:url>

<s:a href="%{#ediurl}">修改</s:a>

<s:a href="%{#delurl}" confirm('是否删除')">删除</s:a>

</td>

</tr>

</s:iterator>

<td><s:property value="#request.customer.customername"/></td>

If,else标签=

<s:if test="#request.pagenum.uppage>0"&gt;

<a target="mainFrame" href="customermanager/docustomer_tosearchinfo?page=1&customer.customername=&lt;%="" %>&customer.cityaddrees=<%="" %>"&gt;<img src="p_w_picpaths/star.JPG" border="0"/></a></td>

</s:if>

<s:else>

<img src="p_w_picpaths/star.JPG" border="0"/>

</s:else>

 

关于date日期处理标签

<table>

<s:textfield name="linkman.birthday" id="textbirthday" theme="simple" onfocus="new WdatePicker(this,null,false,'whyGreen')">

<s:param name="value" >

<s:date name="linkman.birthday" format="yyyy-MM-dd"/>

</s:param>

</s:textfield> <div class="STYLE1" id="mytextbirthday" style="display:inline;">格式:yyyy-mm-dd</div>

</table>

<td>

<s:textfield name="linkman.birthday" value="%{#request.linkman.birthday}" id="textbirthday" theme="simple" onfocus="new WdatePicker(this,null,false,'whyGreen')">

<s:param name="value" >

<s:date name="#request.linkman.birthday" format="yyyy-MM-dd"/>

</s:param>

</s:textfield>(yyyy-mm-dd)

</td>