Sha*_*aul 6 html css struts-1 struts1 twitter-bootstrap
我正在研究一些使用Struts html标签而不是标准html标签的传统Struts 1.x应用程序.我试图在不进行功能更改的情况下实现UI的现代化.
例如:输入字段是 <html:text property="someProperty" styleClass="someCssStyle">
代替 <input type="text" class="someCssStyle">
如果我改变,<html:text>
以<input type="text">
财产的结合断裂即输入字段中的值不会传递到代码中.
如果我尝试应用bootstrap样式<html:text>
,它不起作用.
如何将Bootstrap样式应用于旧的struts html标记?
您已将样式添加到styleClass
属性中。
例如:
<html:text property="propName" name="formName" styleClass="form-control"></html:text>
Run Code Online (Sandbox Code Playgroud)
或者
<html:submit styleClass="btn btn-link">submit</html:submit>
Run Code Online (Sandbox Code Playgroud)
这是 GitHub 上一个非常基本的示例应用程序,显示了此功能: https ://github.com/lviviani/sample-struts-bootstrap