2010-11-05 174 views
0

我試圖顯示一個選項卡式面板,但這些選項卡未顯示。這是什麼瀏覽器顯示 -Tabbedpanel無法正確顯示

 
Welcome To Struts 2! 
This is the first pane 
This is the remote tab 

我的代碼:

<%@ taglib prefix="s" uri="/struts-dojo-tags" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
<title>Basic Struts 2 Application - Welcome</title> 
</head> 
<body> 
<h1>Welcome To Struts 2!</h1> 

<s:tabbedpanel id="test" > 
    <s:div id="one" label="one" theme="ajax" labelposition="top" > 
     This is the first pane<br/> 
    </s:div> 
    <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > 
     This is the remote tab 
    </s:div> 
</s:tabbedpanel> 


</body> 
</html> 

感謝所有幫助

回答

0

這似乎是工作 - 不知道爲什麼:

<%@ taglib prefix="s" uri="/struts-tags" %> 

<html> 
    <head> 
    <s:head theme="ajax" debug="true"/> 
    </head> 
    <body> 
    <table border="1" width="50%"> 
    <tr> 
    <td width="100%"> 

    <s:tabbedPanel id="test" > 

     <s:div id="one" label="Tab 1" theme="ajax" labelposition="top" > 
     This is the first panel. 
     RoseIndia.nt<br> 
     JavaJazzUp.com<br> 
     NewsTrackIndia.com 
     </s:div> 

     <s:div id="two" label="Tab 2" theme="ajax"> 
     This is the second panel. 
     </s:div> 

     <s:div id="three" label="Tab 3" theme="ajax"> 
     This is the third panel.<br> 
     Java Tutorial<br> 
     PHP Tutorial<br> 
     Linux Tutorial 
     </s:div> 

     <s:div id="four" label="Tab 4" theme="ajax"> 
     This is the forth panel. 
     </s:div> 

    </s:tabbedPanel> 

    </td> 
    </tr> 
    </table> 
    </body> 
</html> 
+0

什麼這是這個代碼 - – 2010-11-05 12:15:13

0
<%@ taglib prefix="s" uri="/struts-dojo-tags" %> 

<html> 
    <head> 
    <s:head debug="true"/> 
    </head> 
    <body> 
    <center> 
    <table border="0" width="50%"> 
    <tr> 
    <td width="100%"> 

    <s:tabbedpanel id="test" > 

     <s:div id="one" label="Tab 1" theme="ajax" labelposition="top" > 
     This is the first panel. 
     RoseIndia.nt<br> 
     JavaJazzUp.com<br> 
     NewsTrackIndia.com 
     </s:div> 

     <s:div id="two" label="Tab 2" theme="ajax"> 
     This is the second panel. 
     </s:div> 

     <s:div id="three" label="Tab 3" theme="ajax"> 
     This is the third panel.<br> 
     Java Tutorial<br> 
     PHP Tutorial<br> 
     Linux Tutorial 
     </s:div> 

     <s:div id="four" label="Tab 4" theme="ajax"> 
     This is the forth panel. 
     </s:div> 

    </s:tabbedpanel> 

    </td> 
    </tr> 
    </table> 
    </center> 
    </body> 
</html> 
0

調試任何struts的最佳方法或其他jsp'ish框架是查看呈現的輸出。

在您的瀏覽器中看看HTML。

一個可能性是該位與仍在輸出,這意味着它不會被解析。 您的網頁是否具有正確的擴展名(* .JSP,而不是*。html的是typcial一個)

如果HTML是你希望它是那麼請確保您有正確的樣式表,你希望在應用

+0

它有jsp,無論如何 – 2010-11-05 14:21:26