All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tld-fragments.mask-fragment.xml Maven / Gradle / Ivy

There is a newer version: 4.0.38
Show newest version
<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 a ser incorporado a mascara</description>
			<name>attachTo</name>
			<required>true</required>
			<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>
			&lt;html:input name="test"/&gt;
			&lt;html:mask mask="99/99/9999" attachTo="test"/&gt;
		</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>
			&lt;html:input name="teste"/&gt;
			&lt;html:mask mask="(00) 0000-00000" attachTo="teste"&gt;
				&lt;html:maskOnKeypress&gt;
				    var masks = ['(00) 0000-00000', '(00) 00000-0000'];
					mask = (value.length > 14) ? masks[1] : masks[0];
					$('#'+$(field[0]).attr('id')).mask(mask,options);
				&lt;/html:maskOnKeypress&gt;
			&lt;/html:mask&gt; 
		</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>
			&lt;html:input name="teste" value="0" formatter="currency"/&gt;
			&lt;html:maskCurrency attachTo="teste"/&gt; 
		</example>
	</tag>
</fragment>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy