• 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: Newbie Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Questions


  • Subject: Re: Newbie Questions
  • From: Greg Hulands <email@hidden>
  • Date: Mon, 20 Oct 2003 17:51:55 +1000

Thank you all very much to those who responded. I always thought it was possible, I just wasn't sure where to look in the docs.

Regards,
Greg

On Sunday, October 19, 2003, at 06:50 PM, Gerald Hanks wrote:

Greg,

What you are trying to accomplish is not only possible in webobjects but also fundamental to the way that it works. There are several ways to accomplish this. One popular way is to create a component to use as your page template. Lets call this component PageTemplate. Within this component you would include all your layout code including your header, footer, etc. (BTW these could also be created as separate components.) Then, where you would like the content to go, you would place a WOComponentContent object. Now when you would like to create a page that uses this page template, you would simply create a new component and using the inspector in WebObjects Builder change the component to be a Partial Document. Then, place the PageTemplate object on this page. This creates the wrapper for your content. If you look around you will see many examples of this. One included with your webobjects install can be found in the examples folder. It is called PetStoreWOJava. Notice that they call their template component Template and also that it is a Full Document using the inspector in WebObjects Builder. Now open the Main component in WebObjects builder and notice that they have included the Template object on this page (which is a partial document) and that is wraps all of the content that will be drawn.

Happy Coding.

-gerald

Message: 4
Date: Sun, 19 Oct 2003 12:08:46 +1000
From: Greg Hulands <email@hidden>
Subject: Newbie Questions
To: email@hidden

Hi,
I have done previous web development using PHP and am now moving to WO.
During my time using php I have created an architecture that I am
having trouble trying to replicate using WO. The way my php
applications worked was that I had a layout script that would take the
content for the page and place it in the appropriate <div> so that each
page would be rendered the same. An example of this is having a website
that mimics windows on a desktop (title bar, background, border, etc)
and uses javascript to change the window theme (mac os 9, mac os x,
window 2k, windows xp). Because all the layout was exactly the same on
every page, reduced the amount of code to write.


I am struggling to find in web objects how I can achieve this same
method of producing a consistent page layout with minimal effort. If
this is possible could you please point me in the right direction in
the documentation. Otherwise I guess I will just have to do a
copy/paste on every component.

Is there a way for WO Builder to generate its tags in lower case. I
have been writing xhtml markup and displaying the w3 validated icon.
This is not a real problem for me personally, but it would be nice to
have.

Are there any good web resources besides stepwise out there? Is there a
better search for the mailing list besides apples one, eg
cocoa.mamasam.com?


If anyone could provide me of their experiences coming from php (if
there are any) it would be greatly appreciated.

Regards,
Greg
_______________________________________________
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.

  • Prev by Date: Re: Reusable Components [solved & summarised]
  • Next by Date: Internet Explorer and Sessions
  • Previous by thread: Re: Newbie Questions
  • Next by thread: How are you maintaining Client Schemas?
  • Index(es):
    • Date
    • Thread