Posts Tagged ‘spring’

Date fields in forms using Spring and AppFuse

I had some problems getting date fields to work (and return a friendly error message) so here comes a little documentation for future reference. This was in an AppFuse based Spring Framework project. The model contains a java.util.Date property and simply exposing it as usual in a form will cause an exception since Spring doesn’t [...]

I18n workaround for Spring form:options tag

Spring Framework provides the convenient form:options tag to render a list of <option> tags for a form <select>. Here is an example: <form:select id="status" path="status" cssClass="text large" cssErrorClass="text large error" > <form:options items="${statusList}" itemValue="id" itemLabel="label"></form:options> </form:select> It does iteratate through statusList and will output each item as an option with the value statusList[i].id and the [...]