0 Replies Latest reply on Oct 9, 2009 11:09 AM by WilsonPenha

    URLRequest and URLVariables and struts2 mapping


      Hi all,


      I am pure new on Flex, but very old on Java and Struts1,2, Spring and Hibernate.


      I have an application made under the above scenario and I am facing a weird problem.


      See what am trying to do:











      private function uploadHandler(event:Event):void {



         var url:String = salvar.url;



         var request:URLRequest = new URLRequest();

         request.url = "/myApp/salvarEditar.action"


         request.method = URLRequestMethod.POST;




         var variables:URLVariables = new URLVariables("trabalho.id=");

         request.data = variables;


         pbrUploadProgress.visible =






      it works almost right, wasn't for the "trabalho.id" thing are not being send by the request, my action has a getTrabalho() and setTrabalho() which is a reference to my class Trabalho and it has a attribute "id" get/set are ok,


      if I change it to new URLVariables("id="); and put the get/set into my action class it works, this is something we struts developers did into our jsp to put

      name="trabalho.id" then the action will handle it into my class Trabalho thrugh the setTrabalho() and than to the setId().


      My point is to fix this problem into those Flex classes : URLRequest and URLVariables, to accept a url QueryString that way: http://localhost:8080/MyApp/save.action?trabalho.id=1&trabalho.name=something&trabalho.dat e=2009-10-09


      this way the struts side will handle it by injecting that class and doing those convertion.


      Thx and best regards,


      If here is not the right place to post that thing, pls. drive to the right place.