开发者

Tabbedpanel not displaying correctly

I'm attempting to display a tabbed panel but the t开发者_如何转开发abs are not displaying. This is whats being displayed by the browser -

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

My Code:

<%@ 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>

Thanks for any help


the best way to debug any struts or other jsp'ish framework is to look at the rendered output.

In your browser look at the HTML.

A possibility is that the bit with is still in the output, this means it does not get parsed. Does your page has the correct extension (*.jsp and not *.html is a typcial one )

If the HTMl is what you expect it to be then make sure you have the correct stylesheets your application expects


This seems to work - not sure why:

<%@ 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>


<%@ 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜