display returned data in a jquery tab

display returned data in a jquery tab

hi,

i have 2 jsp's: tabs.jsp
  1. $(document).ready(function() {
  2.     $('.tabs .tab-links a').on('click', function(e)  {
  3.        var currentAttrValue = $(this).attr('href');
  4.  
  5.        // Show/Hide Tabs
  6.        jQuery('.tabs ' + currentAttrValue).fadeIn(400).siblings().hide();
  7.  
  8.        // Change/remove current tab to active
  9.        $(this).parent('li').addClass('active').siblings().removeClass('active');
  10.  
  11.        e.preventDefault();
  12.    });
  13. //     $("div#instances").load("instanzSearch");
  14. $("div#instances").load("instanzSearch");

  15.     $( "#tabs" ).tabs({
  16.          beforeLoad: function( event, ui ) {
  17.            ui.jqXHR.error(function() {
  18.              ui.panel.html(
  19.                "Couldn't load this tab. We'll try to fix this as soon as possible. " +
  20.                "If this wouldn't be a demo." );
  21.            });
  22.          }
  23.        });


  24. });
  25. </script>
  26. <div class="tabs" id="tabs">
  27. <ul>
  28. <li><a href="#instances">Instances</a></li>
  29.     <li><a href="ajax/content1.html">Systems</a></li>
  30.     <li><a href="ajax/content2.html">VHosts</a></li>
  31.     <li><a href="ajax/content3-slow.php">Types</a></li>
  32.     <li><a href="ajax/content4-broken.php">Accounting</a></li>
  33.     <li><a href="ajax/content3-slow.php">Customers</a></li>
  34.     <li><a href="ajax/content4-broken.php">Materials</a></li>
  35. </ul> 
  36.  
  37.     <div class="tab-content">
  38.         <div id="instances" class="tab active">
  39.         </div>
  40.  
insertInstanz.jsp:
  1. <c:forEach items="${instanzen}" var="instanz">
  2. <tr>
  3. <td id="instanz0"> <c:out value="${instanz[0]}"/> </td>
  4. <td id="instanz1"> <c:out value="${instanz[1]}"/> </td>
  5. <td id="instanz2"> <c:out value="${instanz[2]}"/> </td>
  6. <td id="instanz3"> <c:out value="${instanz[3]}"/> </td>
controller.java
  1. @RequestMapping(value ="/instanzSearch", method= RequestMethod.POST)
  2. public ModelAndView getDaten(@ModelAttribute("instanz") VUiQueryAccounting instanz, ModelAndView tt) 
  3. {
  4. ModelAndView instanzen = new ModelAndView("instanzSearch");
  5. // Typen nochmal ins Model h�ngen, da ansonsten die Select-Box leer ist
  6. instanzen.addObject("typen", typen);
  7. instanzen.addObject("instanzen", liste);
  8. return instanzen;
  9. }
In the instanzSearch.jsp enters the users attributes for a DatabaseSearch. Then returns the controller the data back to the view. That works perfectly. But NOT when the instanzSearch.jsp is loaded inside the tabs.jsp. Then there are no data are shown. It seems, that the tabs.jsp loads always a fresh copy of the instanzSearch.jsp . How can i make sure that the datas are shown inside the tab too?
I already tried  http://jqueryui.com/tabs/#ajax but that doesnt show the data too.