Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dataTable with dynamic number of rows and columns

 
Tejram Meena
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create a dataTable with variable number of columns, and it would also have variable number of rows.

-----------------------------------
| Yields |
-----------------------------------
TrancID | 14 | 15 | 16 | 17 | 18 |
-----------------------------------
T1 | P1 | P2 | P3 | P4 | P5 |
-----------------------------------
T2 | p1 | p2 | p3 | p4 | p5 |
-----------------------------------

I have TrancID in a list and i iterate it using the datatable iterator. I iterate yields using seam:repeat iterator.

dataTable code in xhtml file:
<rich:dataTable id="TranchvsYield" var="deal" value="#{pricingResultTab1.tranches}">
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<hutputText value="Tranche"></hutputText>
<ui:repeat value="#{pricingResultTab1.yields}" var="fan">
<rich:column style="text-align:center">
<hutputText value="#{fan}" />
</rich:column>
</ui:repeat>
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:columnGroup>
<rich:column >
<hutputText value="#{deal}" id="trancheId1"></hutputText>
<ui:repeat value="#{pricingResultTab1.prices}" var="task">
<rich:column style="text-align:center">
<hutputText value="#{task}" />
</rich:column>
</ui:repeat>
</rich:column>
</rich:columnGroup>
</rich:dataTable>

Here PricingResultTab1 is the bcking entity beans. tranches and yields are lists having T1, T2... and 14, 15, 16... respectively.
The number of rows and columns works fine , but i don't know who to get the prices right, ..p1, p2, p3..

As from the code prices in each row would be same as in first row..

Help needed..

Thanks in advance.
 
Tejram Meena
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone help me..

Thanks
 
Earnest Dyke
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tejram,

Did you find a way to do this? I have a way that might work for you.

Earnie!
 
Paterne Gaye-Guingnido
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Earnest ,
I have the same problem and what I'm doing now is to use the html TABLE and a4j repeat



What about your solution?

Thanks for your help.

 
Paterne Gaye-Guingnido
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this problem

With open office 2.4

when i store a generate odt file with this command
i have this bug :

com.sun.star.task.ErrorCodeIOException:
at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:275)
at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:141)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:377)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:346)
at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:106)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:860)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:809)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:159)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:141)
at $Proxy116.storeAsURL(Unknown Source)


Some one can help me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic