Query String Inspector for Flex

来源:互联网 发布:少年西游记网络破解版 编辑:程序博客网 时间:2024/06/08 09:58
 

It is common for Flex applications which are deployed to an application server to require specific parameters be provided via the applications query string.

The Flex Framework Application class provides a parameters property which contains the query string provided to the application as well as the FlashVars HTML parameter provided to the application. This is very useful as developers are no longer required to facilitate interoperability between ActionScript and other languages, typically JavaScript, just to get an swf applications query String.

The QueryString inspector is an all static class which takes advantage of this by providing an API which allows developers to perform detailed inspection of an applications Query String.

Below is a description of each method:

  • rawQueryString: Retrieves the raw query string provided to the application
  • isProvided: Determines if parameters have been provided to the application
  • nameValuePairs: Creates an Array of objects comprised of each name / value pair provided to the application
  • parameters: Retrieves the parameter names provided to the application
  • values: Retrieves the parameter values provided to the application
  • containsParameter: Determines if the specified parameter has been provided
  • containsValue: Determines if the specified value has been provided
  • getValue: Returns the value of the specified parameter
  • length: Returns the length of the query string
You can view the source as well as download the example Flex application.
原创粉丝点击