voyent
Dynamically use of the <ice:dataTable> tag  XML
Forum Index -> Components
Author Message
Markus

Joined: 01/Jun/2006 00:00:00
Messages: 7
Offline


I am using the data table for raw data.

Is there a possibility to add each element of an array (in my case attributesHeader) dynamically into a <ice:dataTable> tag.(i thought about a "for" loop that is executed on <ice:column> tag)?
Now every element appears one below the other, but i want to have them side by side in the table.

here a cutout of my used coding (embedded into a .jsp page):
<ice:dataTable id="displayAttributeHeader"
value="#{navigation.attributesHeader}"
var="objects"
styleClass="listTableData"
>
<ice:column>
<ice:outputText styleClass="listText" value="#{objects.attrtitle}" />
</ice:column>
</ice:dataTable>

Thanks in advance for your feedback.

Markus


Message was edited by: Markus


Message was edited by: Markus
adnan.durrani


Joined: 19/Jan/2006 00:00:00
Messages: 437
Offline


Hi Markus,

The dataTable action element generates the markup for the table, which will not let you accomplish this task. You can achieve your desired result using ice : panelSeries component.

Thanks,
Adnan

-- Adnan Durrani --
[Email]
Markus

Joined: 01/Jun/2006 00:00:00
Messages: 7
Offline


hi adnan,

thank you for your prompt answer. with using the ice: panelSeries component the elements of my array are now generated side by side. one more question : i tried to combine the ice : dataTable and the ice : panelSeries components but that doesn`t work. is that possible? i want to generate a table with following structure ( - always stands for a new cell) :
1) first row
header 1 (static) - header 2 (dynamic : one element of an array) - header 3 (dynamic : another element of an array) - .... [header 2 - x i can now handle with the ice : panelSeries component]

2) second row - x row
listobject 1 (title of an object) - listobject 1 attribute 1 (first dynamic attribute of the object 1 ) - listobject 1 attribute 2 (second dynamic attribute of the object)

wouldn`t it be possible to get all the elements of listobject 1 for example with another ice : panelSeries component?
my question : how can i get this all to a correct rendered table or does ice : panelSeries this job?

thanks a lot for your help!
markus
adnan.durrani


Joined: 19/Jan/2006 00:00:00
Messages: 437
Offline


Hi Markus,

If I understand correctly the layout you want to generate, then yes you can get it done with another ice : panelSeries. I have attached a test page please have a look on it. If there is any other question please do not hesitate to ask.

Thanks,
Adnan
 Filename test.jspx [Disk] Download
 Description No description given
 Filesize 1 Kbytes
 Downloaded:  363 time(s)


-- Adnan Durrani --
[Email]
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team