Hi all,
I'm using SWF for a registration process in the app. Now the hierarchy of the objects is
Now that is the object organization, along with the member variables. I'm using spring form tags for the page rendering. Now my commandName is 'registration' across all the pages that I use. I have two pages.Code:+--------------+ | Registration | +--------------+ | +-------+ +----------+ +---------+ +----------+ | Login | | Baseline | | Contact | | Products | +-------+ +----------+ +---------+ +----------+ \-username \-firstName \-address1 \-bla1 \-password \-lastName \-address2 \-bla2 \-email \-phone \-bla3 \etc \-zip
- baseline.jsp
- demographics.jsp
The baseline.jsp is a mix of login and baseline and the demographics.jsp is the mix of contact and products so the jsp looks like
Now this jsp when rendered to HTML gives and outputCode:<form:form commandName="registration"> <form:label path="login.login"> Username </form:label> <form:input path="login.login" /><br/> <form:label path="login.password"> Password </form:label> <form:input path="login.password" /><br/> <form:label path="baseline.firstName"> First Name</form:label> <form:input path="baseline.firstName" /><br/> <form:form>
Now for the bad news, the design team wants the id to be a simple one as a dot(.) notation in css is illegal!!Code:<form id="registration" action="bla bla bla"> <label for="login.login">Username</label> <input id="login.login" name="login.login" type="text" value=""/> <br/> <label for="login.password">Password</label> <input id="login.password" name="login.password" type="password" value=""/><br/> <label for="baseline.firstName">First Name</label> <input id="baseline.firstName" name="baseline.firstName" type="text" value=""/><br/> </form>![]()
Soln 1: I take the commandName and get it to one object, so I can call everything directly with the path and things will work.
Problem: I have multiple objects, too much of refactoring.
Soln 2: Manually assign the id's
Problem: I don't like it!! too much of code clutter, let the system take care.![]()
At the moment using Soln 2, does any one have a a better idea??![]()


Reply With Quote


