• 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页面格式化时间

    当能力支撑不了野心时,就该静下心来学习!
  • 相关阅读:
    方法重写
    百度地图(5)-添加标注
    百度地图(3)-添加地图控件
    百度地图(2)-初始化地图
    GIS系统开发流程
    百度地图(1)- JavaScript API V3.0 对比 JavaScript GL API 1.0
    通过QGIS下载OSM数据
    深入理解 Spring 之源码剖析IOC
    FastDFS安装教程
    FastDFS简介
  • 原文地址:https://www.cnblogs.com/1234cjq/p/5712139.html
Copyright © 2020-2023  润新知