tld-fragments.js-fragment.xml Maven / Gradle / Ivy
<fragment> <tag> <description>Renders a javascript code</description> <display-name>Javascript</display-name> <name>jsCode</name> <tag-class>com.jslsolucoes.tagria.tag.html.v4.tag.js.JsCodeTag</tag-class> <body-content>scriptless</body-content> <attribute> <description>It indicates whether the component should be rendered. Default : true.</description> <name>rendered</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.Boolean</type> </attribute> <example> <html:jsCode> function test(){ console.log('hi'); } test(); </html:jsCode> </example> </tag> <tag> <description>Renders a triggered event for a given component</description> <display-name>Javascript</display-name> <name>jsEvent</name> <tag-class>com.jslsolucoes.tagria.tag.html.v4.tag.js.JsEventTag</tag-class> <body-content>scriptless</body-content> <attribute> <description>Indicates the component name to be achieved</description> <name>attachTo</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description>Indicates the component selector that triggers the event</description> <name>attachToSelector</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description>Indicates the javascript event to be fired</description> <name>event</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>java.lang.String</type> </attribute> <attribute> <description>It indicates whether the component should be rendered. Default : true</description> <name>rendered</name> <rtexprvalue>true</rtexprvalue> <type>java.lang.Boolean</type> </attribute> <example> <html:input name="input1" placeholder="Focus in and focus out" /> <html:jsEvent attachTo="input1" event="blur"> console.log('blur'); </html:jsEvent> </example> </tag> </fragment>