通过实现自定义 TabController 自定义选项卡
系统将向 TabController 发送 Ajax 请求,以便将信息保存到数据库中。这可通过扩展或创建带有请求映射 (类似于以下示例代码) 的新控制器进行自定义:
@Controller
@RequestMapping(value = "/tab/**")
public class MyTabController {
/**
* Creates, Updates, or deletes the tab by calling the @link
{JSONTabServiceAdapter}.
*
* @param data - String version of the JSON object
* @param action - will be set to one of the following values:
[create, update, delete]
* @param request
* @param response
* @throws IOException
*/
@RequestMapping(method = { RequestMethod.POST, RequestMethod.PUT })
protected void createAndUpdateTab(@RequestParam("data") final String data,
@RequestParam("action") final String action,
HttpServletRequest request,
HttpServletResponse response) throws IOException {…code here…}