開啟頁面
<form action="${ctx}/ims/addInvoiceInfo.action" method="post" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
onsubmit="return validateCallback(this, dialogAjaxDone);"彈出
onsubmit="return validateCallback(this, navTabAjaxDone);"標籤開啟
分頁
<form id="pagerForm" rel="invoice_invalid_div" method="post" action="${ctx}/ims/invoice/findInvoiceInfoList.action">
<tangs:pagesHead pageNum="1" numPerPage="${pager.numPerPage}" orderField="${pager.orderField}" orderValue="${pager.orderValue}"/>
rel="invoice_invalid_div" 重新整理DIV
<tangs:pagesBoot targetType="navDiv" numPerPage="${pager.numPerPage}" totalCount="${pager.totalCount}" pageNumShown="90" currentPage="${pager.currentPage}"/>
targetType="navDiv" 重新整理DIV
targetType="navTab" 重新整理頁面
頁面取資料
<s:iterator value="exchangeInfo.excDetailInfo" id="excDetail" status="status">
序號
<s:property value='#status.index'/>
取資料
${excDetail.gunNo}或<s:property value='#excDetail.gunNo'/>
取參數
HttpServletRequest request = ServletActionContext.getRequest();
String rid=request.getParameter("roleid");
<input type="hidden" id="roleid" name="roleid" value="${param.roleid}"/>
頁面取數組資料
<s:iterator value="groupselect" status="status">
<tr target="groupid" rel="<s:property value="groupselect[#status.index][0]" />" >
<td><input type="checkbox" group="id" class="checkboxCtrl" checked="checked"></td>
<td ><s:property value="groupselect[#status.index][1]" /></td>
<td ><s:property value="groupselect[#status.index][2]" /></td>
</tr>
</s:iterator>
list資料轉換取值
actionlist =actionService.find("select m.resourceid,a.actionname from ActionInfo a ,MenuResourcesInfo m where a.actionid=m.actionid and a.status=0 and m.status=0 and m.menuid="+menuid+"");//查詢功能菜單
Iterator iter=actionlist.iterator();
for(;iter.hasNext();)
{
Object[] ob=(Object[])iter.next();
String name=ob[1].toString();
String id=ob[0].toString();
}
//取兩表中的一個ID
List<MenusInfo> menlist=menusInfoService.find("select m.menuid from MenusInfo m,RightsForRolesInfo r where m.menuid=r.rightid and m.status=0 and r.status=0 and r.righttype=0 and r.roleid="+RoleId+"");
int len=menlist.size();
String[] arr = (String[])menlist.toArray( new String[menlist.size()]);
for(int i=0;i<len;i++)
{
String getid=arr[i].toString();
menumap.put(getid,getid);
}
//直接取資料
for(MenusInfo m:milist)
{
String name=m.getCname();//取資料
}