tags:

views:

25

answers:

1

I am using Struts 1 on a form and need to mark some inputs as required. The thing is that the red star ('*') showing the required fields when marking them with isRequired="true" is by default shown right after the textbox:

alt text

Is there a way to change the star position to the left, right before "Input"?

If needed, the code of this is now:

<layout:text property="input" key="form.input" styleClass="FormInput" mode="E,E,I" isRequired="true" />
A: 

You will likely have to write your own custom tag that basically extends the layout:text tag but overrides the output (i.e. where the star is generated if the field has an error).

Start here: http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html You could probably skip ahead to the "Examples" page, but the other stuff is good to know too

Tim Drisdelle
Would you be kind enough to tell me how to do this, or point me to the right tutorials/examples?
Imhotep