Thiago,
I will probably do something like this for now, but in my opinion its
not a suitable solution. Even with this method I am left with the burden
of injecting however many stylesheets I need, and then providing getters
for them. I must do this for every page or component that needs its own
style sheet, and in my opinion its unnecessary boiler plate. Style
sheets and script files are important entities for pages as they define
UI and behavior. They are not like other assets such as images or flash
movies, which typically have a very specific purpose and are not at all
required for the make up of a page. On the contrary, style sheets and
scripts are core foundational elements of a page and in my opinion, the
framework should provide assurance that such elements exist
(proactive/fail fast) and also provide a seamless and painless way to
include them.
T5 is halfway there with Assets, and I love that if my page declares a
missing asset it falls over. However I do not want to inject 3
stylesheets and then provide getters (or a getter for a list of them
all) for each page that needs its own style sheets. Subclassing just for
this purpose also seems nonsensical.
Is there no one else that feels css/js inclusion deserves a bit more
attention?
PS Didn't T4 have a Style component? It may have even had a Script
component. I don't know that components for this purpose is the right
way to go, but at least it was easy (and terse) to use.
Thiago H. de Paula Figueiredo wrote:
Em Wed, 26 Sep 2007 13:23:47 -0300, Chris Lewis
<[EMAIL PROTECTED]> escreveu:
Indeed, but its not declarative and it doesn't address style sheets.
Like I said, I'm not hell-bent on a declarative solution, but I do not
want to:
1) @Inject/@Path my css ...
2) .. and provide a getter ...
3) .. for every page!
What about creating an Layout component to generate the <link> tags
you need? That's what I do in my project. The @Inject's and getters
would be declared just once (in the Layout class). Your Layout
component would have parameters to allow the addition of more <link>
tags. ;)
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]