Current Struts data check is in Bean. It requires you to submit data to check the legality of form data. And ask beans and forms to be strict. It is limited to use. For this purpose, it has developed a set of labels and puts the data check in the label. The label check rules come from your database table structure.
This tag component is named useeasy-size.tld. Similar to the Struts-HTML.TLD tag assembly. UseEasy-size.tld retains all the struts-html.tld all features, which extends the tag's data check properties. Apply the useEasy-size.tld tab to implement the front desk automatic check of page forms. UsesEeasy-size.tld only supports Oracle Database.
Applying this tag's greatest advantage is that it is a front desk check, so you don't need to submit data. Its verification rules come from your database table structure, so its verification is the most accurate, most appropriate.
When your table structure changes, your HTML can do not need to do any changes. The label still makes the correct verification.
Apply this tag, you don't even need any script check code!
Useeasy-size.tld supports the following checks:
Not an air check. Digital Type Check. Date type verification. Maximum length verification. Use examples Example.jsp:
<% @ Taglib Uri = "/ Web-INF / UseEasy-size.tld" prefix = "shtml"%>
shtml>
html>
Useeasy-size.tld components include the following tag types:
Useeasy-size.tldstruts like WRITEWRITEMMTEXTTEXTHIDDENHIDDENTEXTATEXTAREA
Property Description:
Label Name: The form property describes the database table name of TAB form data. If there is no specified, the label default table name is equal to the bean name of the Action. Label Name: Text Property Description The database table name corresponding to the TAB field. If not specified, inherit from the Form tag. The field name of the database corresponding to the Field field. If not specified, the label default Field is equivalent to Property. Label Name: Hidden Attribute Describes the database table name corresponding to the TAB field. If not specified, inherit from the Form tag. The field name of the database corresponding to the Field field. If not specified, the label default Field is equivalent to Property. Label name: TextArea property Describes the database table name corresponding to the TAB field. If not specified, inherit from the Form tag. The field name of the database corresponding to the Field field. If not specified, the label default Field is equivalent to Property. Label Name: Bean Properties Description MaxLength. The maximum length displayed on the page is displayed. Exceeding length is replaced by "...". And display with a help bar.
Because Blog does not support accessories. Limited to the space, it is really unable to paste the complete code to everyone. Brothers and sisters who need code can contact me. Leave your email below. A very very very good code generation tool will be provided next time. It automatically generates Bean, Action, ADO (Database Layer) based on your database table structure. It can be said that it will let you free from the boring ABC code, let you completely care about the higher level design. Hehe ~ Please pay attention!