-1

I'm trying to develop the tutorial of opengeo-suite sdk, but when I try to add a queryform to my app, firebug throws this exception:

Error: Could not create tool plugin with ptype: gxp_queryform I've tryed to perform a query form and i used this code

  • @require plugins/QueryForm.js

    { ptype: "gxp_featuremanager", id: "states_manager", maxFeatures: 20 },{ ptype: "gxp_queryform", featureManager: "states_manager", outputConfig: { title: "Query", width: 320 }, actionTarget: ["featuregrid.bbar"], appendActions: false }

How do I solve this?

  • Can you give us an example? What code caused that error to be thrown? – Brad Koch May 29 '13 at 18:54
  • 1
    Is this related to your other question? Please clearly communicate what you've done and what you're trying to do. – Brad Koch May 29 '13 at 19:06
  • sorry about the poor information I've provided. I've put the code now. The example is the same, but I've solved the another problem, this one is new problem, it's a problem with QueryForm – Javier Cornejo May 29 '13 at 21:12
1

The main issue is that the FeatureManager is not bound to a layer.

Either specify the layer or autoSetLayer property in your FeatureManager, like:

/*
 * @require plugins/FeatureManager.js
 * @require plugins/QueryForm.js
 */

{
  ptype: "gxp_featuremanager",
  id: "states_manager",
  maxFeatures: 20,
  layer: { 
    source: "local",
    name: "usa:states"
  }
}, {
  ptype: "gxp_queryform",
  featureManager: "states_manager",
  outputConfig: {
    title: "Query",
    width: 320
  },
  actionTarget: "featuregrid.bbar"
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.