Customizing Tabs by Implementing Custom TabController
Ajax requests are sent to the TabController in order to have the information persisted into the database. This can be customized by extending or creating a new controller with a request mapping that would be similar to the following example code:
@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…}
這是否有幫助?