beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers (JIRA)" <...@beehive.apache.org>
Subject [jira] Resolved: (BEEHIVE-1127) No check() phase during the Controller annotation processing for an external form bean class and ValidatableProperty
Date Fri, 01 Sep 2006 06:03:23 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-1127?page=all ]

Carlin Rogers resolved BEEHIVE-1127.
------------------------------------

    Fix Version/s: v.next
       Resolution: Fixed
         Assignee: Julie Zhuo  (was: Carlin Rogers)

Fixed with SVN revision 439193...
http://svn.apache.org/viewvc?rev=439193&view=rev

This fix takes the set of declarations from APT and not only processes the annotated class
declarations but now also includes class types that have annotated methods (for possible declarative
validation annotations). As before, class declarations that are page flows, shared flows,
etc. will be processed using a page flow checker. However, the other class declarations (inner
and external) that have Jpf annotations will be run run through the form bean checker to ensure
that the grammar of any validation annotations are correct. 

Note that there is a new warning as requested in the beehive dev list that @Jpf.FormBean exist
as a class-level identifying annotation if the form bean contains declarative validation annotations.
This revision updates existing tests and samples to add the @Jpf.FormBean.

There's also a new test that was added to the compiler test suite with this revision.

> No check() phase during the Controller annotation processing for an external form bean
class and ValidatableProperty
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1127
>                 URL: http://issues.apache.org/jira/browse/BEEHIVE-1127
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: 1.0.1
>            Reporter: Carlin Rogers
>         Assigned To: Julie Zhuo
>             Fix For: v.next
>
>         Attachments: j1127-patch-newAPFactory.txt, j1127-repro.zip
>
>
> The processing of ValidatableProperty annotations in an external form bean does not go
through the typical check() phase of the TwoPhaseCoreAnnotationProcessor. During the Controller
annotation processing during the check() we run through the FormBeanChecker and specifically
the ValidateTypeGrammar.onCheck(), for an inner form bean. However, if we have an external
form bean class, the Controller annotation processing only looks at the external form bean
during the generate() phase. Any errors in the ValidatableProperty annotations of the external
form bean will cause processing problems without providing the kind user messages during the
check() phase.
> For example, if you have a ValidateType(type=String.class) you should see a message about
using a primitive Class, e.g. int.class. However, you will get either an AssertionError or
without asserts a ClassCastException in org.apache.beehive.netui.compiler.genmodel.DefaultValidatorRuleFactory.getFieldRule().
> I will attach a repro case.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message