Custom label attribute required

1

When in a custom tag the value of attribute required , is true (mandatory) but not sent, marks error in runtime or translation.

<taglib
  xmlns = "http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation = "http://java.sun.com/xml/ns/j2eeweb-jsptaglibrary_2_0.xsd"
  version = "2.0"
>
    <tlib-version> 1.0 </tlib-version>
    <short-name> stock </short-name>
    <uri> http://example.com/tld/stock </uri>
    <tag>
        <name> quote </name>
        <tag-class> com.example.QuoteTag </tag-class>
        <body-content> empty </body-content>
        <variable>
            <name-from-attribute> var </name-from-attribute>
            <scope> AT_BEGIN </scope>
        </variable>
        <attribute>
            <name> symbol </name>
            <required> true </required>
            <rtexprvalue> true </rtexprvalue>
        </attribute>
        <attribute>
            <name> var </name>
            <required> true </required>
            <rtexprvalue> true </rtexprvalue>
        </attribute>
    </tag>
</taglib>

Custom label:

<stock:quote symbol="Ejemplo"/>

I do not send the other attribute var .

    
asked by Marco Antonio ChavGar 11.01.2017 в 17:53
source

0 answers