0

I am having a dilly of a pickle here. I am using struts2-jquery's tabbedpanel. I have multiple tabs, and each returns html content via ajax.

My problem is that the html I am returning seems to be breaking the layout of the tabs in the tabbed panel. The tab ends and the html returned overflows outside of and below the tab's end (visually).

I checked the ajax call that my tabs are making and the html being returned is valid. You might expect this kind of behavior if there was an extra opening element or an extra closing element, but the html looks perfect. Here is an example of the jsp page that loads the tabbed panel.
I had this project working using struts2 dojo plugin, but found the animation etc on the struts2-jquery plugin's tabbedpanel to be neater. Returning the the html like this using the struts-dojo tabbedpanel works just fine. Any ideas on what would cause this?

      <sj:tabbedpanel id="remotetabs" selectedTab="1" show="true" hide="'fade'" collapsible="true" sortable="true" cache="true">

        <s:url var="remoteUrlFourDay" action="fourdayforecast.action">
            <s:param name="name"><s:property value="name"/></s:param>
            <s:param name="zipcode"><s:property value="zipcode"/></s:param>
        </s:url>
        <sj:tab id="fourday" href="%{remoteUrlFourDay}" label="4 Day Forecast" errorText=" "/>

        <s:url var="remoteUrl24Hour" action="hourlyforecast.action">
            <s:param name="name"><s:property value="name"/></s:param>
            <s:param name="zipcode"><s:property value="zipcode"/></s:param>
        </s:url>
        <sj:tab id="two" href="%{remoteUrl24Hour}" dataType="html" label="24 Hour Forecast" errorText=" "/>

        <s:url var="remoteUrlTenDay" action="tendayforecast.action">
            <s:param name="name"><s:property value="name"/></s:param>
            <s:param name="zipcode"><s:property value="zipcode"/></s:param>
        </s:url>
        <sj:tab id="tenday" href="%{remoteUrlTenDay}" label="Ten Day Forecast"   errorText=" "/>

        <s:url var="remoteUrlTest" action="webcams.action">
            <s:param name="name"><s:property value="name"/></s:param>
            <s:param name="zipcode"><s:property value="zipcode"/></s:param>
        </s:url>
        <sj:tab id="test" href="%{remoteUrlTest}" label="Test" errorText=" "/>
    </sj:tabbedpanel>

As per the request of Alexandr, here is the html. I tried putting it in a code block but it was formatting it all funny so I just hosted the returned html on my web server. Fully generated Html from the page in question Just look at the source of the page to see the html. Here are the 2 css styles being used in the html for the returned ajax

.block {
width: 200px;
height: 160px;
margin: 5px 10px 10px 5px;
padding: 5px;
border: 5px solid #94BEFF;
float: left; }

#wrap {
background-color: white;
margin: 0 auto;
} 

layout problem with my project

David Pugh
  • 758
  • 3
  • 12
  • 33
  • It seems to me the content is not `overflowed` but detached from the container. Could it be related to the styles of the content? – Quincy Apr 11 '13 at 06:09
  • Could you post rendered HTML. – Aleksandr M Apr 11 '13 at 17:26
  • Aleksandr M, I edited my page and added a link to the html. The formatting got screwed up so I just put the html from the page on my webserver. http://binarybeing.com/files/code/various/weatherhtml.html – David Pugh Apr 11 '13 at 20:43
  • See http://stackoverflow.com/questions/2035462/multiple-htmlbody-html-body-in-same-file. – Aleksandr M Apr 12 '13 at 16:42
  • Thanks for the reply Aleksandr. The HTML I am returning in the tabs does not have any opening or closing tags (or tags, etc), so I don't think that is the problem. – David Pugh Apr 12 '13 at 18:53

0 Answers0