• 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: Inserting contents in <head>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting contents in <head>


  • Subject: Re: Inserting contents in <head>
  • From: "Jerry W. Walker" <email@hidden>
  • Date: Mon, 6 Mar 2006 07:32:56 -0500

Hi, Vincent,

I have the feeling that a different design might obviate the need for this and would suggest some thought along those lines. However, if there seems to be no design of the various components that would avoid this problem, then try the following.

I've never done this, but I think that if you ask your component for its parent (using parent()) and it returns null, you will know that your component is not embedded (that is the part I'm not sure about). If that's the case, then create two PageWrapper components that embed your component with a WOComponentContent dynamic element. Call one of these NullWrapper and the other FullWrapper.

The content of each of these page wrapper components should be identical comprising a single WOComponentContent element. However, make one with the full page header and the other with none (a partial page component).

Then, embed your original page's content within a WOSwitchComponent and set its WOComponentName binding to addHead which references the following method in your original page Java file:

	public String addHead()
	{
		if (parent() == null) {
			return "FullWrapper";
		}
		return "NullWrapper";
	}

This will probably work (if parent() returns null as I suspect), but it seems like a kludge and begs for a higher level redesign.

Good luck.

Regards,
Jerry

On Mar 6, 2006, at 5:56 AM, Vincent Coetzee wrote:

Dear List

I have a WebObjects component that I have developed that is a partial document. It preferably needs to insert some content into the <head></head> portion of a page, and additionally only needs to insert it if it is no already there. How does one insert content into <head></head> and test whether it has already been inserted.

Any pointers would be appreciated.

Vincent

______________________________________________________________________ _____________________________

“The information contained in this e-mail is confidential and may contain proprietary information.
It is meant solely for the intended recipient. Access to this e- mail by anyone else
is unauthorised. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted in reliance on this, is prohibited andmay be unlawful .No liability or responsibility is accepted if information or data is,for whatever reason corrupted or does not reach its intended recipient. No warranty isgiven that this e-mail is free of viruses. The views expressed in this e-mail are, unlessotherwise stated, those of the author and not those of FirstRand Bank Limited or its management.
FirstRand Bank Limited reserves the right to monitor, intercept and block e-mails addressedto its users or take any other action in accordance with its e-mail use policy.
Licensed divisions of FirstRand Bank Limited are authorised financial service providersin terms of the Financial Advisory and Intermediary Services Act 37 of 2002.”


______________________________________________________________________ _____________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office



_______________________________________________
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


References: 
 >Inserting contents in <head> (From: Vincent Coetzee <email@hidden>)

  • Prev by Date: Inserting contents in <head>
  • Next by Date: Re: Inserting contents in <head>
  • Previous by thread: Inserting contents in <head>
  • Next by thread: Re: Inserting contents in <head>
  • Index(es):
    • Date
    • Thread