I am creating a dynamic questionnaire on Xpages. The number of questions in it may vary depending on who is setting the questions. After the questionnaire has been completed, I need to collate a report with all of the answers. For this I need to display them in Xpages such that it can dynamically pull the questionnaire answers and each answer must have its own column. How do I create a table that automatically changes its columns depending on how many answers there are?
Asked
Active
Viewed 50 times
0
-
What have you tried so far? Hint: use xp:repeat to generate the columns in the table or use a Java class to do the same. – Per Henrik Lausten Aug 22 '20 at 07:13
-
1Thanks. I went into the source code and wrapped the xp:td control in a repeat instead of wrapping the whole table in the repeat and I got it to work. – Muhammed Ismail Carrim Aug 23 '20 at 11:38
-
Great to hear. I added my comment as an answer that you can accept – Per Henrik Lausten Aug 23 '20 at 12:11
1 Answers
0
You use an xp:repeat control to generate the columns in the table. You can also use a Java class to generate the complete table and then call the Java method in a computed text field (xp:text).

Per Henrik Lausten
- 21,331
- 3
- 29
- 76