I have hit upon a problem when combining a repeat control with a table where I just want to repeat the table row in XPages
When you move the repeat control inside the table everything works as expected and the table row is repeated however in the web browser the html is rendered with a
inside of the table tags before the first tag. This is NOT valid html and you can work around this by removing the ID for the repeat control and the DIV is not rendered to the web browser.
However this causes a problem because if you want to put a pager control on the Xpage and link it to the repeat then the repeat must contain and ID.
While the DIV does not cause problems in Firefox or IE6/7 it does cause the table to render incorrectly in IE8.
is there a work around for this issue?
Subject: I’m not seeing this…
Hi Declan,I’m not seeing this though I am using an id for a repeat which is required if you want to use a pager on a repeat.
Here’s my source:
<xp:this.data>
<xp:dominoView var="view1" viewName="SiteList"></xp:dominoView>
</xp:this.data>
<xp:pager layout="Previous Group Next" id="pager1" for="repeat1">
</xp:pager>
<xp:table>
<xp:tr>
<xp:td>
<xp:label value="Type:" id="label1" style="font-weight:bold"></xp:label>
</xp:td>
<xp:td>
<xp:label value="Site:" id="label2" style="font-weight:bold"></xp:label>
</xp:td>
<xp:td>
<xp:label value="Phone Number:" id="label3" style="font-weight:bold"></xp:label>
</xp:td>
</xp:tr>
<xp:repeat id="repeat1" rows="4" value="#{view1}" var="coll01">
<xp:tr>
<xp:td>
<xp:text escape="true" id="computedField1" value="#{coll01.Type}">
</xp:text>
</xp:td>
<xp:td>
<xp:text escape="true" id="computedField2" value="#{coll01.Site}">
</xp:text>
</xp:td>
<xp:td>
<xp:text escape="true" id="computedField3" value="#{coll01.Phone}">
</xp:text>
</xp:td>
</xp:tr>
</xp:repeat>
</xp:table>
And this is what I’m seeing in IE8 and the pager seems to be working fine.
However, you’re probably using a different scenario. Have you more detail?
Regards,
Paul.
Subject: What IE 8 build are you testing on
As IE8 is still in beta/release candidate maybe the issue I’m seeing is related to the build I’m using.
I’m on build 8.0.7000.0 which is the one included in the current Windows 7 beta.
My table with repeat looks exactly the same as your XPage source however the rendering on screen in my build of IE8 looks broken, the first column of the data table appears under the second column of the header row of the table. If I switch IE8 into IE7 Compatibility mode it renders correctly.
Subject: I’m using 8.0.6001.18372 on XP
Downloaded it directly today.
Here’s the rendered HTML I get for the table
Type: |
Site: |
Phone Number: |
Office |
Boca Raton |
954-996-5438 |
Spa |
Brighton Club |
617-555-1212 |
Cafe |
Boston Dining |
617-227-133 |
Retail |
Court |
617-220-123 |
Subject: You also have the div
You also have a
inside the … you can see it is ending just before
with a