You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by joelus <jo...@beach.co.za> on 2006/04/05 17:39:39 UTC

Using Custom CSS with extensions filter

I used the tabbedpane component, without using the extensions filter, by
copying the relevant resource files into my local directory and then worked
on the relevant css files to get the exact look and feel that I wanted. In
one of the tabs I put a inputCalendar component. In order to get it to work
though, I had to add the extensions filter to the web.xml. Unfortunately,
doing this messes up my carefully designed tabbedPane component as my custom
css file is ignored in place of the css found in tomahawk. 

Is there anyway around this? ie, can I either override the css supplied when
using the extensions filter for my tabbedpane, or, can I get the
inputcalendar component to work without the extensions filter?

Any insight appreciated!
Thanks  
--
View this message in context: http://www.nabble.com/Using-Custom-CSS-with-extensions-filter-t1400335.html#a3767274
Sent from the MyFaces - Users forum at Nabble.com.


Re: Using Custom CSS with extensions filter

Posted by joelus <jo...@beach.co.za>.
Thanks for the responses! 
Mike, I'll try your suggestion and let you know how it goes. I haven't used
filters much before so I guess it's time I learnt how! 
--
View this message in context: http://www.nabble.com/Using-Custom-CSS-with-extensions-filter-t1400335.html#a3779615
Sent from the MyFaces - Users forum at Nabble.com.


Re: Using Custom CSS with extensions filter

Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/5/06, joelus <jo...@beach.co.za> wrote:
> Is there anyway around this? ie, can I either override the css supplied when
> using the extensions filter for my tabbedpane, or, can I get the
> inputcalendar component to work without the extensions filter?

There may be better ways to do this, but since the Extension filter
intercepts two kinds of requests, just add a second filter in front of
it that intercepts the resource-serving part.   When you see a
resource you want to replace, then serve your own resource instead.  
Otherwise, let the request go through to the extension filter.

<!-- my replacement  -->
<filter-mapping>
    <filter-name>MyResourceServerFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/css-file-to-replace.css</url-pattern>
</filter-mapping>

<!-- extension mapping for serving page-independent resources
(javascript, stylesheets, images, etc.)  -->
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>



I think there's a javascriptLocation attribute you can specify per
component.  I wonder if there's also a cssLocation attribute?   If
not, perhaps you could submit a patch to create one.

Re: Using Custom CSS with extensions filter

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

why not using extensions filter always? You can apply every ressource
you want, also when using extensions filter.

Just use the style-sheets as ever before. Or do I missunderstand your problem?

cheers,

Gerald

On 4/5/06, joelus <jo...@beach.co.za> wrote:
>
> I used the tabbedpane component, without using the extensions filter, by
> copying the relevant resource files into my local directory and then worked
> on the relevant css files to get the exact look and feel that I wanted. In
> one of the tabs I put a inputCalendar component. In order to get it to work
> though, I had to add the extensions filter to the web.xml. Unfortunately,
> doing this messes up my carefully designed tabbedPane component as my custom
> css file is ignored in place of the css found in tomahawk.
>
> Is there anyway around this? ie, can I either override the css supplied when
> using the extensions filter for my tabbedpane, or, can I get the
> inputcalendar component to work without the extensions filter?
>
> Any insight appreciated!
> Thanks
> --
> View this message in context: http://www.nabble.com/Using-Custom-CSS-with-extensions-filter-t1400335.html#a3767274
> Sent from the MyFaces - Users forum at Nabble.com.
>
>


--
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
Bierbrauen@gmail.com