[ http://issues.apache.org/jira/browse/BEEHIVE-1127?page=all ]

Carlin Rogers updated BEEHIVE-1127:
-----------------------------------

    Attachment: j1127-patch-newAPFactory.txt

Adding an attachment of a patch that includes a new 
FormBeanAnnotationProcessorFactory that returns the 
FormBeanCoreAnnotationProcessor using the FormBeanChecker as a standalone 
checker (rather than being part of the flow control checker). However, there's 
no support for sharing error status between APs so this will not truly solve 
the issue in this bug. It adds NetUI annotation processing for an external form 
bean class in check() phase but the generate() phase of the page flow 
annotation processor will not know of the form bean errors and could still 
produce additional errors (like the ClassCastException described in the example 
of this bug description).

The following link to the archived thread in the beehive dev list has more on 
the discussion and issues with using a new, second AP.

http://www.mail-archive.com/[email protected]/msg02573.html

Maybe with JSR 269 (Pluggable Annotation Processing API) we will be able to 
detect the status between multiple AP and we can use the work in this patch...

For now, I will check in code that will fix this bug and still avoid doing 
multiple redundant checks on form beans.

> 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: Carlin Rogers
>         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

        

Reply via email to