Crispín Klander Crispín Klander - 2 months ago 15
HTML Question

Bootstrap cssStyle tag ignored Spring MVC 3.2.8

I have this input text in my JSP, using a Bootstrap class

<input type="text" name="device" class="form-control" id="device" placeholder="IOS/Android" onblur="if(this.value=='')this.value='IOS/Android'" onfocus="if(this.value=='IOS/Android') this.value='';" onkeypress="" />


But using the spring tag the style is totally ignored !

<form:input path="device" placeholder="IOS/Android" cssStyle="form-control" onblur="if(this.value=='')this.value='IOS/Android'" onfocus="if(this.value=='IOS/Android') this.value='';" onkeypress="" />

Answer

I think you will need to use cssClass instead of cssStyle.

Comments