开发者

Multiple tabs on web page

How can I add multiple tabs to a jsp page ? I'm using struts, are there any jsp tag librarys I can use ?

开发者_如何学编程

Thanks,


Here you can find a page dedicated to Struts Tabbed Layout.

For Struts2 you can check RoseIndia's tutorial on TabbedLayout.


Struts2 has a TabbedPanel tag

http://struts.apache.org/2.0.11/struts2-core/apidocs/org/apache/struts2/components/TabbedPanel.html

here is an example how to use it:

 <s:tabbedPanel id="test" >
    <s:div id="one" label="one" theme="ajax" labelposition="top" >
        This is the first pane<br/>
        <s:form>
            <s:textfield name="tt" label="Test Text"/>  <br/>
            <s:textfield name="tt2" label="Test Text2"/>
        </s:form>
    </s:div>
    <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
        This is the remote tab
    </s:div>
 </s:tabbedPanel>


I don´t know what you want to do exactly with the tabs, In my case I only want to show information in different tabs, I don´t need an action is trigger in every tab change.

For my purpose, I use jquery:

http://docs.jquery.com/UI/Tabs#overview

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜