Ratings in subTable get messed up

UI Components for JSF
Post Reply
anil
Posts: 38
Joined: 10 Jan 2010, 06:08

09 Sep 2011, 23:32

In 3.0 RC1 when adding ratings to a subTable column, they seem to all bunch up together, not sure how else to describe it.

To reproduce, just modify one of the subtable columns in datatableSubTable.xhtml to add a hard coded rating such as:

Code: Select all

		<h:form>
			<p:dataTable var="player" value="#{tableBean.players}">

				<f:facet name="header">
    		        FCB Statistics
	        	</f:facet>

				<p:columnGroup type="header">
					<p:row>
						<p:column rowspan="2" headerText="Player" sortBy="#{player.name}" />
						<p:column colspan="2" headerText="Stats" />
					</p:row>

					<p:row>
						<p:column headerText="Goals" />
						<p:column headerText="Assists" />
					</p:row>
				</p:columnGroup>

				<p:subTable var="stats" value="#{player.stats}">
					<f:facet name="header">
		              #{player.name} 
		            </f:facet>

					<p:column>
		                #{stats.season}
		            </p:column>

					<p:column>
		                #{stats.goals}
		            </p:column>

					<p:column>
						<p:rating value="5" stars="5" />
					</p:column>

					<p:columnGroup type="footer">
						<p:row>
							<p:column footerText="Totals: " style="text-align:right" />
							<p:column footerText="#{player.allGoals}" />
							<p:column footerText="#{player.allAssists}" />
						</p:row>
					</p:columnGroup>
				</p:subTable>
			</p:dataTable>
		</h:form>
The rendered image looks like this:
[img]
http://imageshack.us/photo/my-images/215/image044.png/
[/img]

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

10 Sep 2011, 08:52

Due to a mojarra bug I don't think you can use input stuff inside subTable as mojarra messes up ids. Try with myfaces to see if it makes a diff.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests