Hi,
        I have similar situation. I too need help! digital_eyezed(sorry I
don't know your name), if you don't mind can you post your code, if you
already solved this problem.

Abdul, If I pass individual data elements(variables) to method as arguments
then don't you think we have to change method signature in java classes on
the server?

Can we pass a model which is corresponding to a VO coming from java class
thru RemoteObject call? I am using model to trap the result from
remoteobject call and binded the model attributes to the individual control
elements to display data and it did work fine. Then I thought why not send
the same model back to java class thru remoteobject call? But I got "cannot
invoke method 'saveSchedTerms' error message on my server console.

Here is code snippet..
<mx:RemoteObject id="mngScheduleController"
source="manageschedules.controllers.MngScheduleController"
showBusyCursor="true">
        <mx:method name="getSchedTerms" result="termsModel=event.result"
fault="showError(event.fault.faultString)">
                <mx:arguments>
                        <arg1>itemNum</arg1>
                        <arg2>month</arg2>
                </mx:arguments>         
        </mx:method>
        <mx:method name="saveSchedTerms" result="alert('Data Updated')"
fault="showError(event.fault.faultString)">
                <mx:arguments>
                        <arg1>termsModel</arg1>                 
                </mx:arguments>
        </mx:method>
  </mx:RemoteObject>


<mx:Button label="Save"
click="mngScheduleController.saveSchedTerms(termsModel)" />

Thanks in advance....

Thanks!
Hari

-----Original Message-----
From: Abdul Qabiz [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 02, 2005 12:05 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Using RemoteObject to pass data to the Server


Hi,

You are right, you need to pass all data as arguments in the called method. 


    <mx:RemoteObject id="remoteService" source="RemoteService">
        <mx:method name="echoName" result="alert(event.result.toString())"/>
    </mx:RemoteObject>

    <mx:Button label="Pass String" click="remoteService.echoName('Some
string');"/>


Sorry about docs, I understand it should be more better...


-abdul




-----Original Message-----
From: digital_eyezed [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 02, 2005 3:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using RemoteObject to pass data to the Server



Hi,

I can't find much documentation on passing the data to the server 
using the remoteObject data service. Everything seems to be about 
getting info from the server. Is there any info around on carrying out 
such tasks? I'm almost certain that its just about filling the 
arguments on the called method but haven't found an example to give me 
confidence.

Al I want to to is pass a VO to a server to be inserted into a 
database via remoteObject, not HTTPService or Web Services.

Thanks in advance.





 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to