You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/09/01 06:03:34 UTC

[jira] Closed: (STR-1714) A JSTL EL Validator rule would make a lot of sense.

     [ https://issues.apache.org/struts/browse/STR-1714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict closed STR-1714.
------------------------------

    Resolution: Won't Fix
      Assignee:     (was: Struts Developers)

> A JSTL EL Validator rule would make a lot of sense.
> ---------------------------------------------------
>
>                 Key: STR-1714
>                 URL: https://issues.apache.org/struts/browse/STR-1714
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: Future
>         Environment: Operating System: All
> Platform: All
>            Reporter: Rick Hightower
>            Priority: Minor
>
> A JSTL EL Validator rule would make a lot of sense.
> I believe this approach has several advantages over requiredif and 
> validatewhen. I call this new rule validatejstlel (Validate JSTL EL).
>  
> JSTL makes a lot of sense for the follwing reasons:
> 1) EASY TO LEARN
> The first advantage of this approach is it is easy to learn since developers 
> know JSTL EL already. JSTL EL is easy to learn and you have to learn it for JSP 
> 2.0 anyway. In fact, developers should be using JSTL tags in place of
> logic:* tags already.
> 2) ACCESS TO PAGE CONTEXT 
> The nice thing about this rule is that it has access to the complete 
> pageContext (Headers, Request Parameters, Session, the whole thing) name space 
> like any JSTL tag. (more on this trick later).
> Since it uses JSTL EL you can make your expressions as complex as need be, 
> e.g., you can check to see if one date is before another or if a string starts 
> with a certain substring. It is very powerful, and yet very easy to learn and 
> use.
> 3) VERY LITTLE CODE
> This rule was very easy to implement. It relies on the Jakarta JSTL EL 
> implementation. Struts relies on JSP and Servlets and JSP will be using JSTL so 
> this rule is a natural fit. (Less code to add means less code to maintain....)
> I've received some feedback from a few struts users (clients and peers). They 
> like the idea of JSTL EL validator rule. It just makes so more sense and solves 
> the problem of doing validation that involves relationships between form 
> fields. This is a hole in the validator framework that gets filled quite nicely 
> by validatejstlel. The beauty of this is it is so small.
> Here is the war file.... 
> http://www.rickhightower.com/CustomRule.war
> Here is the src....
> http://www.rickhightower.com/CustomRule.zip

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.