[jboss-jira] [JBoss JIRA] Created: (JBRULES-2456) Field completion in guided rule editor doesn't show camel-case 'multi-words' java beans properties

Guillaume HOLLER (JIRA) jira-events at lists.jboss.org
Thu Mar 18 07:40:37 EDT 2010


Field completion in guided rule editor doesn't show camel-case 'multi-words' java beans properties
--------------------------------------------------------------------------------------------------

                 Key: JBRULES-2456
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2456
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-guvnor
    Affects Versions: FUTURE
         Environment: windows
            Reporter: Guillaume HOLLER
            Assignee: Mark Proctor


I have attached an example model class and the modified BRMSSuggestionCompletionLoaderTest class   (with the new testLoaderWithComplexFields method) to demonstrate the issue.

The test shows that the SuggestionCompletionLoader exposes all javabean properties as ModelFields but then fails to expose them in specific categories according to accessor/mutator classification. In the test, only the fields for
which the assertion:

assert fieldName.equals(fieldName.toLowerCase())

is verified are exposed by methods engine.getModelFields(FieldAccessorsAndMutators.[ACCESSOR|MUTATOR], "Agent"): nom, prenom and sexe (and the keyword 'this' of course).

Consequence is for example that in guided editor, only this fields are proposed as restriction fields in the WHEN side of the RULE .

I have found tha the problem lies in method loadClassFields of SuggestionCompletionLoader and propose a patch (attached).



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

        



More information about the jboss-jira mailing list