You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mi...@ubsw.com on 2003/04/04 10:07:59 UTC
Questions, and answers to/from DTO
I am using XDoclet to generate DTO's from my EJB's and I am trying to solve a problem while leveraging these DTO's.
I have a Health Form, or may just break it into multiple Form's for ease of use.
I am also using DynaForm's to declare my forms.
With the nature of my form data, it will change often and each locale will have different names for things as well. I also have around 100 questions currently. Most are checkboxes, but about 10% are form fields.
So, I am considering creating 3 EJB's; HealthHistoryBean, QuestionsBean, and AnswersBean.
The HealthHistoryBean will have a getHeathHistoryDto():HeathHistoryDto, getQuestionsDto():Collection, and getAnswersDTO():Collection methods on it.
So on my JSP, I can just loop through each questionDto in the questions Collection, and then loop through each of the AnswerDto's in the Answers Collection to see if there is a value for that question.
Obviously there is heaps of looping going on here. I would like to know if this is the correct general approach, or if there is a better design to have dynamic questions on a JSP, and Answers to those questions.
-------------------------
Thank You
Mick Knutson
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
-------------------------
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org