Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for gxp #189 - allow matchCase in WFS Filter #190

Merged
merged 2 commits into from
May 26, 2013

Conversation

justb4
Copy link
Contributor

@justb4 justb4 commented May 24, 2013

See description in issue #189. With this fix the QueryPanel gets an extra config param 'caseInsensitiveMatch' (default false) to allow case-insensitive string matching for attribute conditions in OL ComparisonFilter's. This setting propagates to an OpenLayers WFS Filter attribute 'matchCase'.

See a working example here:
http://lib.heron-mc.org/heron/latest/examples/querybuilder

  • select USA States layer
  • add STATE_NAME = condition
  • fill in e.g. ohio or alabama
  • see one result

@@ -165,7 +171,7 @@ gxp.form.FilterField = Ext.extend(Ext.form.CompositeField, {
* {OpenLayers.Filter} By default, returns a comarison filter.
*/
createDefaultFilter: function() {
return new OpenLayers.Filter.Comparison();
return new OpenLayers.Filter.Comparison({matchCase: this.caseInsensitiveMatch});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be {matchCase: !this.caseInsensitiveMatch}) instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yes indeed. Added a new commit to fix. best, Just
On 26-05-13 01:57, ahocevar wrote:

In src/script/widgets/form/FilterField.js:

@@ -165,7 +171,7 @@ gxp.form.FilterField = Ext.extend(Ext.form.CompositeField, {
* {OpenLayers.Filter} By default, returns a comarison filter.
*/
createDefaultFilter: function() {

  •    return new OpenLayers.Filter.Comparison();
    
  •    return new OpenLayers.Filter.Comparison({matchCase: this.caseInsensitiveMatch});
    

Shouldn't this be |{matchCase: !this.caseInsensitiveMatch})| instead?


Reply to this email directly or view it on GitHub
https://github.com/opengeo/gxp/pull/190/files#r4393548.

ahocevar added a commit that referenced this pull request May 26, 2013
Fix for gxp #189 - allow matchCase in WFS Filter
@ahocevar ahocevar merged commit 5a1f79a into planetfederal:master May 26, 2013
@justb4
Copy link
Contributor Author

justb4 commented May 26, 2013

Top! Thanks Andreas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants