2 回答

TA贡献1796条经验 获得超4个赞
Ajax Centric解决方案如下。我仍然希望运行一个以模板为中心的版本。
$.ajax({
url: url,
method: "GET",
success: function (res) {
$("#fbtresult").html(res);
},
fail: function (err) {
console.log(err);
}
});
通过以下控制器调整
@GetMapping(value = "/FBTChartfbtrequest")
public String FBTChartfbtrequest(@RequestParam("fbt") String fbt,
@RequestParam("asin") String asin, @RequestParam("collectdate") String collectdate, Model model) {
model.addAttribute("fbts", fbtService.findByASINInFBT1andDateRange(asin, convertUtilToSql(date), convertUtilToSql(date)));
return "fbtList";
}
和HTML修改
<div id="fbtresult">
<!-- Dynamic content using ajax -->
</div>
例如,这不像具有引用对象以创建新链接的能力那样理想。
Id 主要产品asin产品fbt1 asin产品fbt2 asin bsr
视图
我想我可以在包含那些链接的java应用程序中生成html。我想我更喜欢在模板视图中创建动态html。

TA贡献1827条经验 获得超8个赞
事实证明,为了使用分片逻辑,应将load函数调整为以下值
var url = "/FBTChartfbtrequest?"; $('#fbtresult').load(url, "fbt=1&asin=" + asin + "&collectdate=" + e.dataPoint.x);
添加回答
举报