zoukankan      html  css  js  c++  java
  • springmvc 下拉框对应

    <option value="${titleinfo.shopname}"
    <c:if test="${titleinfo.shopname eq shop.shopname}"> selected = "selected"</c:if> 
    >${shop.shopname}</option>      //下拉框加判断才会对应起来

    @RequestMapping(value = { "/Update"}, method = RequestMethod.GET)
    public String updatePage(Model model, ServletRequest request) {
    List<BtyShop> list = btyShopService.ListAll();
    request.setAttribute("list", list);
    List<Region> reg = regionService.ListAll();
    request.setAttribute("reg", reg);             //请求过程中调用Service方法返回reg对象,将"reg"传回前台,前台使用items="${reg}"接收   var="shop" 并设置使用对象为shop

    String title = request.getParameter("title");
    Info titleinfo = infoService.selectBytitle(title);
    request.setAttribute("titleinfo", titleinfo);
    return "app/Info/Update";
    }

    }

    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>   // 导入标签库

    上传时间:<fmt:formatDate value='${info.time}' type='date' pattern='yyyy-MM-dd HH:mm:ss'/>   //jsp页面格式化时间

    当能力支撑不了野心时,就该静下心来学习!
  • 相关阅读:
    EcFinal游记
    简要介绍补码的原理
    【SCOI2007】降雨量
    【ecfinal2019热身赛】B题
    【HAOI2011】problem a
    20200301(ABC)题解 by李旭晨
    20200228(ABC)题解 by 马鸿儒
    20200220(C)题解 b刘存
    20200225(DEF)题解 by 马鸿儒
    20200224(ABC)题解 by 马鸿儒
  • 原文地址:https://www.cnblogs.com/1234cjq/p/5712139.html
Copyright © 2011-2022 走看看