2010-11-02 56 views

回答

0

Struts2的具有TabbedPanel標籤

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

這裏有一個例子如何使用它:

<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> 
1

在這裏你可以找到一個專門爲Struts Tabbed Layout頁。

對於Struts2,你可以檢查RoseIndia的tutorial on TabbedLayout

+0

感謝您的快速回復 – 2010-11-02 13:32:49

+0

如何設置它? – 2010-11-02 13:38:02

+0

結帳演示http://struts.improve-technologies.com/demonstration.html頁面並下載源代碼http://struts.improve-technologies.com/downloads/DemoServeurDeNews.war並分析它。 – 2010-11-02 13:40:33

0

我不知道你想要做什麼與標籤完全一樣,在我的情況下,我只想在不同的標籤中顯示信息,我不需要在每個標籤更改中觸發一個操作。

對於我的目的,我使用jquery:

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

+0

謝謝,但我想我會堅持使用struts選項卡式佈局 – 2010-11-02 14:18:41

相關問題