You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Did <di...@free.fr> on 2005/02/01 15:34:07 UTC

Re: [component] properties + css

Erik Hatcher <erik <at> ehatchersolutions.com> writes:

> 
> >> Then what's the question?
> >>
> >
> > Sorry but my "question" is very stupid in fact because it is not 
> > possible for a
> > HTML file to access to a CSS file in the WEB-INF folder. I wanted that 
> > the
> > folder of my component "C" contains: C.jwc, C.class, C.properties, 
> > C.js,
> > C.script and C.css !!!
> 
> This has been discussed somewhat.  I think there is merit to consider 
> some  <at> Shell infrastructure that can do to CSS what  <at> Body can do with 
>  <at> Script contributions to onload.  Having a way to blend CSS such that 
> each component can have its own contribution may be something powerful 
> - though I haven't fully thought through the implications of this.
> 
> 	Erik


Yes, it's exactly what I tought. The only thing which causes some trouble is how
to declare the stylesheet file in the component (to be the more flexible for
everyone). An important point is that the solution should not impact or the
least possible the existing.

1) like properties files: the css file must name <Component>.css and has to be
in the same location as the component definition.
2) for example, add an addStylesheetLink() method overriden for each component.

It seems to me that the first solution is the best one. Thus, the user will put
his file in the right folder and that's all !!! 

What do you think ? Maybe there is another way that I didn't see !
Tchusss.

  Did






---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [component] properties + css

Posted by Did <di...@free.fr>.
Did <dinedine31 <at> free.fr> writes:

In the case of the first solution, the classes to modify are:

* Shell: 
   - add an addStyleSheetLink method with an IResourceLocation in only
parameter. This method inserts a new entry in the list of stylesheet links 
(use of getStylesheets() to get the list of links).

* AbstractComponent: 
   - modify the finishLoad method to search a styleSheet link (which can 
be optionnal). see DefaultComponentMessagesSource class to do it.
   - get the shell object (I don't know to get it).
   - call the addStyleSheetLink method from the shell object with the link 
(in fact an IResourceLocation) performed previously. 

This is exactly what I would do but I don't know if my approach is in the 
spirit of Mr. HLS and the others contributors !


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [component] properties + css

Posted by Did <di...@free.fr>.
Did <dinedine31 <at> free.fr> writes:

> 
> Yes, it's exactly what I tought. The only thing which causes some trouble is 
> how to declare the stylesheet file in the component (to be the more flexible
> for > everyone). 
> An important point is that the solution should not impact or the
> least possible the existing.
> 
> 1) like properties files: the css file must name <Component>.css and has to be
> in the same location as the component definition.
> 2) for example, add an addStylesheetLink() method overriden for each component.
> 
> It seems to me that the first solution is the best one. Thus, the user will put
> his file in the right folder and that's all !!! 
> 
> What do you think ? Maybe there is another way that I didn't see !
> Tchusss.
> 
>   Did
> 

In the case of the first solution, the classes to modify are:

* Shell: 
   - add an addStyleSheetLink method with an IResourceLocation in only
parameter. This method inserts a new entry in the list of stylesheet links 
(use of getStylesheets() to get the list of links).

* AbstractComponent: 
   - modify the finishLoad method to search a styleSheet link (which can 
be optionnal). see DefaultComponentMessagesSource class to do it.
   - get the shell object (I don't know to get it).
   - call the addStyleSheetLink method from the shell object with the link 
(in fact an IResourceLocation) performed previously. 

This is exactly what I would do but I don't know if my approach is in the 
spirit of Mr. HLS and the others contributors !


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org