Re: WOSwitchComponent?
Re: WOSwitchComponent?
- Subject: Re: WOSwitchComponent?
- From: Randy Becker <email@hidden>
- Date: Sun, 13 Nov 2005 18:56:17 -0500
Wow. I've got my app split up into separate .wo s now, and it's
great, but I don't know how to pass variables around between them -
e.g. how should I handle errors that need to be displayed to the user
- I'd like to do something like this:
} else {
errorMessage = "Something bad happened!";
return (WOComponent)pageWithName("ErrorOccurred");
}
But that doesn't work, because I don't know how to tell
ErrorOccurred.java what the contents of errorMessage are. Basically,
I don't know how to call a function. :) At least, not one I've
defined myself, let alone in another file.
-Randy
On Nov 13, 2005, at 1:26 PM, Karl wrote:
Use a page wrapper. You simply create a single component to
enclose your content. That page (say PageWrapper.html and .wod)
only has to contain a single WOCompoent - namely WOComponentContent.
Each page should include your PageWrapper component. What happens
at runtime is that your page essentially gets popped into the
PageWrapper in place of the WOComponentContent. Very powerful but
difficult to visualize.
Karl
On 13-Nov-05, at 1:18 PM, Randy Becker wrote:
Hi, I'm new to WO, and was wondering what the WO way is to
implement a common look to a site. By this I mean having a
dynamic, but always included header, footer, etc. I get the
feeling that it has something to do with components and maybe with
WOSwitchComponent, but I can't really get anything to work, so I'm
currently I've been putting parts of my project (all of which is
in Main.wo) into WOConditionals and toggling their values in order
to display and hide them. I know there's got to be a better way.
What is it?
-Randy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
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:
This email sent to email@hidden