Need to have two non-related tables in single jsp page, populate the fields with default values and one submit button

StackOverflow https://stackoverflow.com/questions/12005759

Pergunta

I have a Jsp page, In which if a checkbox is selected div tag will be shown. Jsp page has a form with modelattribute and div tag has another form with a different modelattribute. I need to populate the fields of Div tag form with default values which comes from table 2. Jsp page is populated with table 1.

My jsp page is fine and working good. Problem is with my Div tag form. I whenever I use <form:input path="something"....> jsp page is not displaying. I should have only one submit button. on submit form 1(jsp page) and form 2(div tag) should save their values into their respective tables.

What is the best way to do it? how to use a subflow in this case?

Foi útil?

Solução

what about creating a Pair class containing the 2 objects? or using a list or a map?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top