Thank you Chuck, Simon, Anjo, Lachlan, and others. You've all given good insight and I appreciate you thinking about the problem.
The idea of WOComponent.awake() sounds appealing but I got a question about it. I like the idea of every WOComponent on the page getting the awake() message and then building an ordered "array" of items that need to be placed between the head tags. Then, later through various means that people have already mentioned, we slap those resources between the "head" tags before we return the response to the user. Problem is, I don't think that *every* component on the page gets that "awake" message. Can someone verify this for me? I did a test which I'll explain below but the results are confusing. I have a "DateWidget.wo" WOComponent that uses complex Javascript to validate the date the user types and keeps them on the field until the data is either in the correct format or is blank. It even disables the form from submitting or the user from closing the web browser while the data is invalid. This is complex stuff that is contained in "DateWidget.js" I made a quick test by adding "awake()" to "DateWidget.java". All I did was log out a statement to let me know when the "awake" message was invoked. I then went to a page that showed a list of search results. Clicking on any search result would do a partial page refresh to show editable fields and other detailed information. That "detail view" is inside a WOConditional which is also under an AjaxUpdateContainer. Here's what happened: 1) Initial page load with nothing in the detail view: No logging information. I was bummed when I realized this. I was so hoping that the component, even though it was inside a WOConditional that evaluated to false, would still have it's "awake" message fired. Seems reasonable that it would "awake" but not have "appendToResponse" called, but that's not what happened. 2) Clicking on a search result to do a partial page refresh and show the detail view: "awake" message was logged. Makes sense, especially since it had it's "appendToResponse" called too. 3) Deselected the search result so that no detail view was displayed, then refreshed the page (full page load): To my amazement, even though there was no "DateWidget.wo" currently displayed via "appendToResponse", it *did* in fact have its "awake" message fired. Wow! How does that work given that in test #1 above "awake" never happened. Seems to me that this should be the same situation as test #1, but somehow, just by having been displayed at least one time, it is now in the "awake" graph even when it is not visible any longer. See, I'm all confused. Maybe it's something wrong with my test that I'm overlooking. Does anyone know if this is the proper behavior for "awake"? Should "awake" always be called even if "appendToResponse" is not called? Thanks, -- Aaron
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
