AnsweredAssumed Answered

Pop-up Form to call a WebScript GET

Question asked by isloat on Jun 7, 2011
Hi,
I need to create a pop up window with a form that appear when clicking in a custom action of documentlibrary. Then, with the information of the form I'll call a webscript GET passing this info.

I want to imitate this example: http://edlovesjava.blogspot.com/2008/10/learning-surf-5-opening-content-editor.html
But instead of calling a POST Webscript (Look Step 3 - Opening the form in a dialog)
var actionUrl = YAHOO.lang.substitute(Alfresco.constants.PROXY_URI + "slingshot/doclib/action/folder/site/{site}/{container}/{path}"
I want to call a GET WebScript.

Right now I have my code like this and it works perfect:
onActionCustomAction: function dlA__onActionCustomAction(file)
   {
      this.modules.actions.genericAction(
        {
          success:
          {
            message: this.msg("message.customaction.success", file.displayName),
            event:
              {
                name: "metadataRefresh"
              },
          },
          failure:
          {
            message: this.msg("message.customaction.failure", file.displayName)
          },
          webscript:
          {
            name: "customwebscript",
            method: Alfresco.util.Ajax.GET,
            params:
            {
               site: this.options.siteId,
               container: this.options.containerId
            },
          },
          config:
          {
            requestContentType: Alfresco.util.Ajax.JSON,
            dataObj:
            {
               nodeRefs: [file.nodeRef]
            }
          }
        });
   },

But how can I add a pop-up window with a form to send the values that user writes with the params of the webscript call?

Thanks a lot!

Outcomes