On 7/22/06, William Noto <[EMAIL PROTECTED]> wrote:
I am able to show the inputCalendar widget, and use my own popup image, but
my problem is that the calendar pops up too far to the right, and too far
below the link. I have played around with trying to supply my own resources
but whenever I supply my own resources it doesn't work at all (no popup
calendar image).
Question: Does the order of my filter-mappings matter? Is it possible to
"insert" my own javascript above the MyFacesResourceLoader lines that are
inserted (I believe) by the extension Filter?
Yes, the order of the filter-mappings is the order that the code in
the filters will run.
So if you put in your own servlet filter for
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>, then
your filter should in theory have the opportunity to detect and
override the requested resources, provided you know what the names of
those resources are.
One thing that I think is funky is that I map *.html to the extension filter
somewhat later than the *.jsf and the /faces/* mappings. Strange, but it was
the only way I could get it to work at all.
There's no point in mapping .jsf to your extensions filter since your
faces servlet is mapped to *.html.
Generally my recommendation would be to list the resources-serving
filter mapping first and the page-modifying (*.html) last for
performance reasons. Obviously your custom filter mapping would be
first to override the behavior.
I think you shoudl also consider using a servlet-name filter-mapping
parameter rather than a url-mapping parameter for all of those *.html
mappings. That will reduce the chances of error and allow you to
change things easier.