Currently, there is no mechanism to report errors back to the user for invalid search expressions. For instance, if a user types "availability=dwn" by accident (leaving out the letter 'o'), then the translator will treat this term as invalid because there is no AvailabilityType enum called 'dwn'. It would be nice if there were an error message added somewhere to the interface to notify users that their expression is invalid...and the more accurate that error message the better.
Without this fix, it would be difficult for users to know which of a series of search terms is being ignored under the covers, and thus why their search isn't returning the resources they think it should be returning.
commit 965da8b99fea42c04bc8dc07cb54b405daa13a3d Author: Joseph Marques <joseph> Date: Tue Jul 13 12:36:04 2010 -0400 BZ-610228: allow search expression errors to bubble up to the inventory browser * create new SearchExpressionException runtime exception class * update RHQL.g grammar file, short-cut and throw SearchExpressionException on error * allow CriteriaQueryGenerator to directly pass SearchExpressionExceptions up to the caller * update the inventory browser layout file to use rich:messages to show ajax-errors * add inventoryBrowserErrorPanel to list of rerendered objects when invoking resource/group search ** (Note: 'requestDelay' attribute is required, otherwise msg is sometimes lost) * add exception handlers in Browse(Resource|Group)UIBean.fetchDataForPage to add appropriate faces message on error
Marking this as urgent to ensure prioritized QE
Technically this works, but the way it works is not user friendly - see screenshot. We must not show "runtime exception : Illegal Argument Exception .." stuff
Created attachment 432852 [details] Example of output to hide from users.
commit 9c2972b0e0abdfb4a89870a22a17a80ea01f9aa2 Author: Joseph Marques <joseph> Date: Mon Jul 19 10:44:41 2010 -0400 BZ-610228: pretty up SearchBar error messages ----- heiko, can you retest and let me know what you think of the new error message handling?
This is now much improved in 10856:52c274a and the message does not show the technical messages any more.
Mass-closure of verified bugs against JON.