<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%><%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="SysNavLink 添加实体类数据表单，path: 请情: www.juuluu.net " />

<title>SysNavLink列表</title>
<link href="<bean:write name="SystemConfigApp" property="appContext"/>/com/goosaa/templete/default.css" type="text/css" rel="stylesheet">
<!--
 * @author http://www.juuluu.org
* tel:020-28983330 mobile:15975485229
 * email:wujavei@126.com  QQ:274390981
 * @see /entryJsp/SysNavLinkFromAdd.jsp
 -->

<title> SysNavLink </title>

<link href="<bean:write name="SystemConfigApp" property="appContext"/>/com/goosaa/templete/default.css" type="text/css" rel="stylesheet">
<%--  时间控件 --%>

<script type="text/javascript"  src="<bean:write name="SystemConfigApp" property ="appContext"/>/DateTimeCalendar/DateTimeCalendar.js" language="javascript">
</script> 
<script src="<bean:write name="SystemConfigApp" property ="appContext"/>/JuuluuApp/javascript/juuluu.js" type="text/javascript" language="javascript" charset="UTF-8" ></script>

</head>
<body>
<html:errors/>

<div class="title_box"><h1>添加网站导航</h1></div>

<script type="text/javascript" src="/juuluu.org/javascript/form.js" language="javascript"></script>
<html:form   action="/gcms.hibernate.action/SysNavLinkAddAction?leixing=tj" method="post"   >
<div id="content">

<p>
<span class="formElementLable">链接名称:</span><html:text property="navName" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.navName" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">链接网址:</span><html:text property="navLinkUrl" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.navLinkUrl" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">是否一级导航:</span><Input type="checkbox" name="broot" checked="checked"  value="true"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.broot" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">父级链接ＩＤ:</span><html:text property="parentId" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.parentId" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">父级链接:</span><html:text property="parentName" size="30"  maxlength="45"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.parentName" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>

<p>
<span class="formElementLable">是否包含子链接:</span><Input type="checkbox" name="bhasChildNode" checked="checked"  value="true"/>
</p>

<br/>
	<html:messages id="zhouWuXingShi" property="BiaoDanChuoWuXingShi.bhasChildNode" message="false">
	<span style="color:red;font-size:16px;">
	<bean:write name="zhouWuXingShi"/>
	</span>
	</html:messages>
<p>
<input id="SysNavLinkFormSubmit" type="button" onClick="return formsubmit()"  value="提交"/> <input type="reset"  value="重设"/>
</p>

</div></html:form>
	<script type="text/javascript" language="javascript" >
	//重设表单
	function resetForm(){
		var formPage=document.forms["SysNavLinkForm"];	 formPage.reset();
	 return false;
	}
	
	//提交表单，成功后提交表单
	function formsubmit(){
		var form=document.forms["SysNavLinkForm"];
		if(form==null){
			alert("无法获取表单！");
			 	return false;
		}
		if(form!=null){
		//表单验证
		 var formchekcReturn=formcheck();
	 	if(formchekcReturn !=null && formchekcReturn==true){
		form.submit();
	 //将提交按钮设置为失效，防止重复提交
		var formSubmit=document.getElementById("SysNavLinkFormSubmit");
	 	formSubmit.disabled= true;
	 	return true;
			 }else{
	 	return false;
		}
	 }//end if
	
	}//end fun
	//表单验证
	function formcheck(){
		var formPage=document.forms["SysNavLinkForm"];		if(formPage==null){
			alert("未发现表单！");
			isreturn =false;
			return false;
			
		}
		var isreturn =true;
		
		//表单中文验证
		
		//表单字符长度验证
		
		//表单密码强度验证
		
		//表单是否包含字符验证
		
		//表单过长验证
		
		//判断是否提交表单
		//alert("return :"+isreturn);
		
		if(isreturn ==false){
		
		//	alert("return :"+isreturn);
		return false;
		
		}else{
		isreturn=true;
		//alert("return :"+isreturn);
		return isreturn;
		}
	}
	
	</script>

</body>
</html>

