Re: Flash and WebObjects...Make it Work with XML or other ?
Re: Flash and WebObjects...Make it Work with XML or other ?
- Subject: Re: Flash and WebObjects...Make it Work with XML or other ?
- From: Chuck Hill <email@hidden>
- Date: Tue, 6 Sep 2005 09:52:27 -0700
On Sep 5, 2005, at 8:03 AM, Nathan Walker wrote:
I'm trying to send XML from Flash to my app and I am a bit confused
on the decoder. I constructed an XML file with similar code in Flash:
data_lv = new LoadVars();
data_lv.NewOrder = _root.myXML;
data_lv.send("http://nateg5.local/cgi-bin/WebObjects/
TikiBarz.woa/-50088/wa/newOrder","_self");
Not at all sure what that does or if it is right or not...
and then I receive the XML with the Direct Action code below:
public WOActionResults newOrderAction() {
WOComponent nextPage = pageWithName("Main");
Add:
System.out.println("URL: " + request().uri());
String theXML = context().request().stringFormValueForKey
("NewOrder");
Add:
System.out.println("NewOrder XML: " + theXML);
WOXMLDecoder xmlDecode = WOXMLDecoder.decoder();
CustomBar custBar = (CustomBar)xmlDecode.decodeRootObject
(theXML);
System.out.println(custBar);
return nextPage;
}
i know I'm not doing that right. But I'm just confused as to how to
go about this. I get a malformed URL,
From where? Is there an exception? What is it? Which line is it
raised from?
Chuck
of course with that because I'm not passing in a URL. Can someone
help set me on the right path here. Below is the XML that is
getting sent (It'd be nice to use a mapping file but I believe I'd
like to just manually parse it for greater control):
<customizebar><step1><roofSelection>Spanish Tile</
roofSelection><frontPanalSelection>Galvinized Steel</
frontPanalSelection></step1><step2><CustomBarTop CustomName="Name
Your Bar Here!"><picture picsize="5x7" rot="0" ypos="333"
xpos="184" number="2" /></CustomBarTop></
step2><step3><accessories>None</accessories></step3><step4><order
OrderTotal="$4850" OrderNumber="46381"><firstname>Nathan</
firstname><lastname>Walker</lastname><address>5189468</
address><city>654</city><state>GA</state><zip>63546</
zip><phone>65465465</phone><email>email@hidden</
email><username>test</username><password>secret</
password><cardname>nasldkjf</cardname><cardnum>43214324354354321</
cardnum><cardexp>04/06</cardexp><cardtype>MasterCard</
cardtype><billaddress>lkasdjf sad f dr.</
billaddress><billcity>valkdso</billcity><billstate>GA</
billstate><billzip>31602</billzip></order></step4></customizebar>
Thanks,
Nathan
On Jun 1, 2005, at 9:35 AM, Pierre Frisch wrote:
We have a technology demo application that works well with Flash
and WebObjects. We made it work by returning the data in XML. You
will probably have to use XMLHttpRequest to make it work as you
cannot reload the Flash without loosing the state.
http://pears.spearcat.com/
Pierre
On 31-May-05, at 9:39 PM, Nathan Walker wrote:
Thanks for this, I will give this a try and see what happens. The
OpenLaszlo project looks VERY interesting.
On May 31, 2005, at 9:48 PM, Dave Elsner wrote:
Hi Nathan,
You could try making a direct action and call request
().formValueForKey and simply call it from flash
For example in flash (action script)
data_lv = new LoadVars();
data_lv.forumData = someXML;
data_lv.send("URL to directaction", "target window");
Then in your direct action:
String theXML = (String)request().formValueForKey("forumData");
You can also return XML databack to flash and then use action
script like
data_lv.sendAndLoad("URL to directaction", variable to load
returned data into);
Hope this helps.
Dave
On 01/06/2005, at 10:45 AM, Nathan Walker wrote:
Has anybody out there successfully deployed a solution that
integrates Flash with WebObjects ? I'm working on a project
right now that would benefit greatly if I could do just that.
I'm thinking about writing ActionScript that will either save
data to text files or send XML information to a Direct Action
which would then allow WebObjects to pick up the data the Flash
application is sending. Anybody had to deal with this ?
This would be an awesome combination !
Thanks,
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40uow.edu.au
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden