tld-fragments.mask-fragment.xml Maven / Gradle / Ivy
<fragment> <tag> <description>Renders a mask on a particular component</description> <display-name>Mask</display-name> <name>mask</name> <tag-class>com.jslsolucoes.tagria.tag.html.v4.tag.mask.MaskTag</tag-class> <body-content>scriptless</body-content> <attribute> <description>Indicates the mask to be used</description> <name>mask</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description>Indicates the component name to be attached</description> <name>attachTo</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description>Indicates the component selector to be attached</description> <name>attachToSelector</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description>It indicates whether the fill should occur behind forward</description> <name>reverse</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.Boolean</type> </attribute> <example> <html:input name="test"/> <html:mask mask="99/99/9999" attachTo="test"/> </example> </tag> <tag> <description>Renders event on mask after any key press</description> <display-name>Mask</display-name> <name>maskOnKeypress</name> <tag-class>com.jslsolucoes.tagria.tag.html.v4.tag.mask.MaskOnKeyPressTag</tag-class> <body-content>scriptless</body-content> <example> <html:input name="teste"/> <html:mask mask="(00) 0000-00000" attachTo="teste"> <html:maskOnKeypress> var masks = ['(00) 0000-00000', '(00) 00000-0000']; mask = (value.length > 14) ? masks[1] : masks[0]; $('#'+$(field[0]).attr('id')).mask(mask,options); </html:maskOnKeypress> </html:mask> </example> </tag> <tag> <description>Renders a mask in currency format for a particular input</description> <display-name>Mask</display-name> <name>maskCurrency</name> <tag-class>com.jslsolucoes.tagria.tag.html.v4.tag.mask.MaskCurrencyTag</tag-class> <body-content>scriptless</body-content> <attribute> <description>Indicates the component name to attach currency mask</description> <name>attachTo</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description>Indicates the component selector to attach currency mask</description> <name>attachToSelector</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <example> <html:input name="teste" value="0" formatter="currency"/> <html:maskCurrency attachTo="teste"/> </example> </tag> </fragment>