• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: AJAX/Direct Actions Design question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: AJAX/Direct Actions Design question


  • Subject: RE: AJAX/Direct Actions Design question
  • From: Andrew Lindesay <email@hidden>
  • Date: Tue, 6 Mar 2007 13:25:44 +1300

Hello Ricardo;

Any components that you put into the WOSwitchComponent behave stateless. You can't depend on the same instance being returned to you on the next request-response cycle. In all of my projects I do a similar thing to what you are doing, but I have developed a navigation system around this to store state, "do breadcrumbs" etc... etc... this system works very well for me. You can find out more about this infrastructure by downloading LEWOStuff from my website (www.lindesay.co.nz) and reading the overview PDF.

cheers.

I have a little app with a single page Main.wo.  :-)

This page (Main.wo) provides the look of all pages.  The only thing
that changes is the content in that page.  So I have a
WOSwitchComponent declared in my Main.wod as follows:

ContentComponent: WOSwitchComponent { WOComponentName =
contentComponentName; }

Ok... Now of on my content components has a little bit of javascript
(ajax) code.  For example, something is selected in a pop-up a direct
action is sent to the application.  The direct action in my app is
invoked and it reads the direct action url arguments and then
generates an HTML response that is sent back to the browser and it's
loaded into a div.  Works great!

Now, I want to do things differently.   I want to find out if it's
possible for the direct action to get a hold of the current content
component being displayed by Main.wo.  Let's say that the current
content component is called "Foo".    Well, if I do pageWithName
("Foo") it will create a new copy.  What I want is to get a hold of
the existing one, pass in the direct action url arguments and then
return that as the response.

___ Andrew Lindesay www.lindesay.co.nz



_______________________________________________
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


  • Prev by Date: Re: what to do with the <return> key
  • Next by Date: Re: what to do with the <return> key
  • Previous by thread: AJAX/Direct Actions Design question
  • Next by thread: Why would D2WModel be trying to load at deployment?
  • Index(es):
    • Date
    • Thread