Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Using Struts, how can I dynamically add columns to a Table using a list of beans nested in my table row data?

0
Posted

Using Struts, how can I dynamically add columns to a Table using a list of beans nested in my table row data?

0

This is the scenario. You are presenting a list of your data on a standard mymodelList.jsp form, using the Display tag library. Your data bean has an attribute that is a list of related data beans. In this scenario, you wish to display that related data in extra columns in your table. Here is one way to achieve this. The following code example assumes that your Action class has generated a list of parentBean objects and exposes that with a getParentBeans() method that returns a List. The ParentBean object includes an attribute that is a list of ChildBean objects.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123