Re: XMLHttpRequest integration on WebObjects
Re: XMLHttpRequest integration on WebObjects
- Subject: Re: XMLHttpRequest integration on WebObjects
- From: John Bruce <email@hidden>
- Date: Mon, 24 Oct 2005 06:55:44 +1000
I've attached the version of prototype.js, effects.js and controls.js,
in a zip archive,
that I used when I was playing around with these components. It turns
out my memory wasn't so good earlier today as it was controls.js I
modified. What I did was in the select_entry() function was read an
extra attribute I added to the html container called "pk" which held
the primaryKey for the EO. If an option function for the attribute
processPK is present the provided function gets called with the pk
value as it's argument. I was using this to set a hidden text field. I
also changed it to use definition lists as well as normal html lists.
The thought was if you were trying to autocomplete a parent entity you
could return children entity results and use the definition list to
separate the types. The original controls.js and effects.js files
should be available from http://script.aculo.us .
I'll just add that the class files I posted earlier are just basic
hacks to play around with some ajax / XHR ideas. They haven't been used
in production and I never implemented any error checking or even all
the possible bindings etc so YMMV.
I'm really interested in creating a set of AJAX WO components to do
various things but in the *WO way* so if anyone is interested in such a
thing let me know and I'll spend more time on it.
I've played around with some ideas for better integration without the
need to use direct actions all the time and just bind up an ajax
component as usual with wo components but I haven't found an elegant
enough way yet. My initial thought was to have a separate class that
was called when the XHR request came it which had a reference to the
containing page so that values could be set etc but that wasn't
panning out so good -mainly due to still manually creating the
response. Any ideas would be welcome.
Cheers,
John
BTW if anyone needs some documentation on prototype.js there is some info here:
http://www.sergiopereira.com/articles/prototype.js.html
On 10/23/05, David Teran <email@hidden> wrote:
> Hi,
>
> i think you forgot to add the prototype.js file. Could you post it, too?
>
> regards, David
>
Attachment:
jsfiles.zip
Description: Zip archive
_______________________________________________
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