0

i am using jquery ui tabs, and the tab content consists of some jsf code, and i want to make the tabs lazy loaded so i thought of making the tab div as panel group with default rendered=false and set render=true on click of tab link as follows:

<div class="tabs">
        <h:form prependId="false">
        <ul>
            <li><a id="tab1_link" href="#tab1">tab1</a></li>
            <li><a id="tab2_link" href="#tab2">tab2</a></li>
            <li>
               <h:commandLink id="tab3_link" action="#insight" value="tab3">
                 <f:ajax></f:ajax> // here will be listener 
                                   //to set the tab panel rendered to true
               </h:commandLink>
            </li>
        </ul>
        </h:form>

        <div id="tab1">
            some dynamic code here
        </div>

        <div id="tab2">
            some dynamic code here
        </div>

        <h:panelGroup id="tab3">
            some dynamic code here
        </h:panelGroup >

</div>

when i added h:commandLink inside the li when clicking on the command link, i can see that the whole page is loaded inside the tab, any ideas why ?

please advise, thanks.

4

1 回答 1

0

我改用以下示例来制作加载 ajax 的选项卡:http: //jqueryui.com/tabs/#ajax

于 2013-10-18T16:22:30.240 回答