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

Re: WOComponent children


  • Subject: Re: WOComponent children
  • From: Alexander Spohr <email@hidden>
  • Date: Thu, 10 Jan 2008 10:16:01 +0100

Hi Aaron.

a) If you need to load .js in advance because some component might become visible, don’t use a WOConditional. Always deliver the component and use visibility="false" or something equal to get it hidden from the user.

b) As you are doing Ajax which intends to change parts of a page you should implement Mike’s deferred header-modification under 3) below.

c) If you think 3) is to much coding, just include all needed .js in your head (which you have in a central Layout.wo anyway, right?). The Browser will cache them so there won’t be to much overhead.

Hope this helps out.

	atze



Am 07.01.2008 um 19:52 schrieb email@hidden:

3) Dynamically load javascript or modify the DOM:
This probably can work. Mike Schrag has also alluded to this in the past as a possible solution. Ideally you could modify the contents between the "head" tags in the DOM and hopefully most browsers would understand that you inserted a JS or CSS reference and load them on the fly, possibly even utilizing the local browser cache. But this would have to be tested and might not work on a "Opera" for example. Another angle would be to always check for the existence of a function or javascript object before blindly using it. If it is not defined, then you could make an Ajax call and download the needed file on the fly, possibly using "evaluate" to load the needed functionality. This would not make use of the cache but would only happen at most once per page. While this is all perhaps possible, it would take a bit of experimentation and may not be totally cross browser compatible.

_______________________________________________ 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: 
 >Re: WOComponent children (From: email@hidden)

  • Prev by Date: Re: Pass-through bindings from parent to child component
  • Next by Date: Re: Large Array Clogging
  • Previous by thread: Re: WOComponent children
  • Next by thread: Re: WOComponent children
  • Index(es):
    • Date
    • Thread