In this post I am going to show the use of nested tag in Struts. This tag is useful when we have to iterate deep inside the beans.
In this example we have a list of transactions send to the view as list of InboxTransmission bean. InboxTransmission bean itself is composed of Transaction bean, User bean and List of Resource bean. Each bean has its own
properties.
properties.
Our objective is to get this bean in view and display the transaction information. Simple logic:iterate would have worked but this bean itself contain list of other bean, Resource. In this scenario nested tag came to handy.
Without showing much detail of code I hope following code from JSP page will help to understand the logic.
No comments:
Post a Comment