Uploaded image for project: 'Share Application'
  1. Share Application
  2. SHA-491

Surf: ProcessJsonModelDirective hard coded for GET webscripts.

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: Aikau, Web Scripts and Surf
    • Labels:
      None
    • Story Points:
      3

      Description

      Create an Aikau page using a POST webscript. On loading the page, you'll see a stack trace similar to this: http://pastebin.com/XegZJqAA

      This is caused because there's a hardcoded "GET" when looking up the webscript.

      ProcessJsonModelDirective.java
              // Get the ID of the WebScript being executed, this is done for debugging purposes...
              String url = this.getModelObject().getProperty("url");
              if (url != null && this.webScriptsContainer != null && this.webScriptsContainer.getRegistry() != null)
              {
                  Match match = this.webScriptsContainer.getRegistry().findWebScript("GET", url);
                  String wsId = match.getWebScript().getDescription().getId();
                  if (wsId != null)
                  {
                      content.append(",webScriptId:\"");
                      content.append(wsId);
                      content.append("\"");
                  }
              }
      

      See here for context: https://github.com/Alfresco/community-edition/blob/master/projects/surf/spring-surf/spring-surf/src/main/java/org/springframework/extensions/directives/ProcessJsonModelDirective.java#L569

      Raised by Ole Hejlskov on IRC

        Attachments

          Structure

            Activity

              People

              • Assignee:
                ddraper David Draper [X] (Inactive)
                Reporter:
                dwebster David Webster [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel