What css concerns, I would leave it to the trouble of the developer to specify the right css's to use. it is a very tricky issue because css is very sensitive in respect to the order of the stylesheets, so the designer must decide, and thus it goes as static def. in the page.
No component contributions.

We did implement such a thing for a border component: it went down the tree of components, and took css defs from Styleable (interface) instances. We ended up not knowing which css will be contributed on which place, making of our styles a big salat, impossible to design. Css is very tricky...

Now I thought js contributions are already there using the Body...
Is it essential to add the to the head?
what about changing body to render the </head> after it renders JS contributions?

Cheers,
Ron


Jesse Kuhnert wrote:
I'm starting to think over how to implement being able to have components
contribute css/js type assets into the Shell component automatically and
have run into a one way or the other sort of decision.

Method 1:
Because the Shell component will almost always come first before any other
component, the only way to allow these global contributions in a normal
sense would be to create a NestedMarkupWriter that Shell hands off to render
it's body with. This has major drawbacks in that the memory footprint of a
page render will grow very large(or not, depending on your pages
implementation..), as well as the negative impact of content not being
written to the client as it is found, making percieved response times of
apps slower.

Method 2:
The way I'd like to do it, but don't even know if is possible would be to
use IComponentSpecification instances of all the components involved in a
response to allow the Shell to iterate over and determine the global assets
ahead of time. This sounds like the more "correct" way to do things, but
also makes me question how reasonable this is to do. It would almost be like
doing a rewind cycle the way forms do to parse out submitted values. I can't
imagine it will be as simple as just iterating over some assets as they must
somehow change sometimes during loops or other application specific logic.

My gut says Method 1 is going to win, but if someone can point out an
obvious way that Method 2 is safe I'd definitely be willing to explore that
path.

jesse



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to