Re: url to each component in javascript?
Re: url to each component in javascript?
- Subject: Re: url to each component in javascript?
- From: Francis Labrie <email@hidden>
- Date: Fri, 2 Jul 2004 09:41:34 -0400
Hi,
Goh Keng Boon wrote:
> I got this javascript used to generate dynamic drop down menu, and i
> would like to use it to access all WO Component, my js is put into a
> page wrapper, but i'm not sure what should i put into the a href="" in
> order to access all the Components. thanks
First, when you are talking about WebObjects components, you are
referring to complete pages, right? Because WebObjects components can
also be a smaller part of a HTML document.
If you can access to the different pages of your application with
direct actions and you don't need to keep session or form values, then
you can easily use statics references to build your JavaScript menu.
But if you use component actions or if you need to keep session or form
values, you can define one WOActionURL component to access each page,
and embed them directly in your JavaScript. Example:
In your ".wod" file:
[...]
DefaultActionURL: WOActionURL {
actionClass = "DirectAction";
directActionName = "default";
}
[...]
In your ".html" file:
[...]
<script type="text/javascript">
[...]
href1 = "<webobject name=DefaultActionURL></webobject>";
[...]
</script>
[...]
--
Francis Labrie
Saint-Bruno-de-Montarville, Quibec, Canada
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.