前后台 传值问题 一

来源:互联网 发布:淘宝企业店 编辑:程序博客网 时间:2024/06/11 06:12
 

页面:

 <div align="left">
    <html:select property="productLine" styleClass="productNode" styleId="productLine">
    <html:option value=""></html:option>
    <html:options collection="product_lineList" property="ITEM_ID" labelProperty="ITEM_NAME" />
    </html:select>
   </div>

<div align="left">
    <html:select property="productFamily" styleClass="productNode" styleId="productFamily">
    <html:option value=""></html:option>
    <html:options collection="product_familyList" property="ITEM_ID" labelProperty="ITEM_NAME" />
    </html:select></div>

<div align="left">
    <html:select property="product" styleClass="productNode" styleId="product">
    <html:option value=""></html:option>
    <html:options collection="productList" property="ITEM_ID" labelProperty="ITEM_NAME" />
   </html:select></div>

<input name="checker"id="checker" type="text" value="${checker}" class="id_ldap"   size="100" />

 Action从SESSION中取值问题:

         String lineId = request.getParameter("productLine");
         String familyId = request.getParameter("productFamily");
         String productId = request.getParameter("product");
         String checker = request.getParameter("checker");

    

   if (null == checker  || "".equals(checker) || "null".equalsIgnoreCase(checker.trim())){
             checker = "";
         }
        
         if (null == lineId  || "".equals(lineId) || "null".equalsIgnoreCase(lineId.trim())){
             lineId = "";
         }
         if (null == familyId || "".equals(familyId) || "null".equalsIgnoreCase(familyId.trim())){
             familyId = "";
         }
         if (null == productId  || "".equals(productId) || "null".equalsIgnoreCase(productId.trim())){
             productId = "";
         }

原创粉丝点击