Re: CSS Integration and SubComponents (Partial components?)
Re: CSS Integration and SubComponents (Partial components?)
- Subject: Re: CSS Integration and SubComponents (Partial components?)
- From: Jean-François Veillette <email@hidden>
- Date: Tue, 26 Oct 2004 18:56:54 -0400
Over time, we have build a very nice architecture for such things ...
- we use a common superclass for all of our wo-components.
- in there, we have the following method :
public void addJSRessourceNamed(WOResponse res, String name)
public void addCSSRessourceNamed(WOResponse res, String name)
and what they do is add the corresponding
<script language="JavaScript" src=" urlToResourceNamed "></script>
or
<link rel="stylesheet" href=" urlToResourceNamed "/>
to the response's [head] section.
So a generic component for a calendar for example, could add multiple .css and/or .js to the response stream.
We have wrapped jscalendar (
http://dynarch.com/mishoo/calendar.epl), using this technique. Now the integration of this component, is just a matter of drag-drop into the page. we originally had to manually do the .js and .css import for each of the sub(-sub)-components at the page level, this was a (little) pain to maintain.
Now a component comes with all it needs for .js and .css. it's like a component 'bundle'.
I would suggest you to evaluate this implentation path, it's worth it !
note 1: we use a variation of this technique to add to the body.onload method that is defined in the page wrapper.
note 2: I would like to share that code, but I would need first the autorisation of my employer. I'm in vacation right now, if you want that code, let me know, I'll try to post it to wocode/wodev when I'm back to work.
- jfv
Le 04-10-26, à 13:00, Jeremy Matthews a écrit :
I have listened to several different posts regarding CSS and the different methodologies employed to achieve integration with it. Can anyone provide tales of their experience, and why they've chosen one method over another? I don't see a lot of comparisons, so it's difficult to understand what is best (and why).
Right now I'm following some docs and a few excerpts, though it seems rather sparse....
Also, on the component side of life, I'm working with partial components to reduce redundancy on navigation. Partial components are the same as subcomponents, right? I hear different terminology and want to make sure we're not talking about apples and oranges here.
And Charles, if you're listening...is there any way you can provide an index from your book about the specific topics you cover?
Thanks,
Jeremy
_______________________________________________
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
_______________________________________________
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