0 Replies Latest reply on Mar 12, 2008 8:32 PM by Raj Tiwari

    Weird tab rendering behaviour in TabPanel

    Raj Tiwari Newbie

      I am having the hardest time understanding this part:
      I have a tab panel with multiple tabs. One of these tabs does some ajax calls to retrieve a user profile. The profile data is displayed on the tab and can be manipulated ajaxically.

      After struggling with rich faces for a bit, I reverted to Seam remoting + jQuery to do the above. I have one method: renderProfile() that downloads the profile info for the first time and populates the DOM of the tab. I execute this method on page load:

      jQuery(document).ready(function()
       {
       renderProfile();
       });
      


      Now, I have tried setting up the tab panel for AJAX and client switching. The above method does not seem to have any effect. The tab with user profile is rendered blank.

      Next I tried ontabenter event, and linking that to my renderProfile() method. No avail.

      The only thing that works is firing and onclick() on the tab itself. This is how I know that my profile rendering actually works:

      ...
      <rich:tab label="My Profile" id="myProfile">
      ...
      </rich:tab>
      
      <rich:jQuery selector="#myProfile" query="click(jQuery(document).renderProfile)"/>
      


      This is really ugly. I am hoping one of the experts on this forum can give me a better solution.

      Thanks.
      -Raj