Hi
I have a
struts 1.2 Action Form class, currently with 27 attributes .... mapped to 27 fields in my
JSP.
With its getters and setters it is now very big class (1250 LOC) and growing.
So I remodelled my JSP, into logical parts and constructed it using multiple <jsp:include>'s
Also for better reusability and maintenance, I also want to refactor the action form class, into coarser elements, than the current fine structure.
But I see an issue;
In the main JSP, I have a <html:form action="/orderEntry"> element ... mapped to the Action Form and so in the JSP I can easily write
<html:text property="firstName" .../>
<html:text property="lastName" .../>
<html:text property="orderNumber" .../>
<logic:iterate id="oItemID" property="orderItems" .... > etc as those are the attributes of the Form class
If I were to refactor my Action Form, into coarser elements; like
MyActionForm
{
PersonelDetail personelDetail;
OrderDetails orderDetail;
...
}
Accordingly my JSP is now ....
<html:text property="personelDetail.firstName" .../>
<html:text property="personelDetail.lastName" .../>
<html:text property="orderDetail.orderNumber" .../>
<logic:iterate id="oItemID" property="orderDetail.orderItems" .... >
This seems okay for populating the JSP, but when I submit it; will the screen elements be submitted correctly into the finer attributes via the coarser attributes?
Would my Action class be able to access the data on screen; via the coarse attribute?
Does struts 1.2 support this?
~g1