Skip to content Skip to sidebar Skip to footer

How Can I Position Multiple Struts Textfields Into 4 Seperate Blocks In One Form?

I am creating a web app using Struts 2. I have several forms which have multiple textfields. I would like to position the textfields into four blocks but am having some difficulty

Solution 1:

If you're using the default "xhtml" theme then the form tags will also emit table markup. Without knowing more about your configuration, I'd say that's your current problem. All you'd need to do is add dividing table rows.

If you're using the "simple" theme then you can move things around however you want, but you'll lose some functionality, like automatic error message placement.

Using the "css_xhtml" theme may be a more appropriate solution, but there are a couple of "gotchas", the most notable being a need to make the <br/> tag element not actually break when inside your form, but that's trivial CSS.

If you have to do this throughout your site you'd likely want to consider rolling your own theme.

Post a Comment for "How Can I Position Multiple Struts Textfields Into 4 Seperate Blocks In One Form?"