Hi,
I have just downloaded the DBTags taglibrary. After a quick look
I have two questions:

1) Why do all the attributes of the tags have "rtexpvalue" set to false?
By having rtexpvalue, column names or numbers can be variables in a
java class or interface and jspc can catch any errors before deployment.
eg:
        <dbtags:getTime colName='<%=Constants.START_DATE%>' format="EEE, dd
MM yyyy"/>
this means that the sql that produced this result set can be something like:

"SELECT date AS " + Constants.START_DATE + " FROM some_table";

Hence, the jspc compiler will pick up any mistakes in names.

2) Along a similar thought, why use

            StatementTag _stmtTag =
                (StatementTag) findAncestorWithClass(this,

Class.forName("org.apache.taglibs.dbtags.statement.StatementTag"));

when a compiler could catch errors early with the equivalent:

            findAncestorWithClass(this, StatementTag.class);


Any thoughts?

Regards,
Nick




Reply via email to