You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/03/12 04:40:29 UTC

RE: [Tapestry-developer] Relative paths in templates linking to style sheets and images don't work.

This should work.

Details needed:  Tapestry release, exact directory structure, web.xml (for
servlet mapping).

If you have web application foo, then Tapestry servlet is at
http://server/foo/app

That makes the base URL for anything with the Tapestry app
http://server/foo/

If you have a images dir, then relative URLs such as images/foo.gif will be
interpreted as http://server/foo/images/foo.gif.

Is this your situation?  Have you tried view-source and retrieve assets
yourself?


--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: tapestry-developer-admin@lists.sourceforge.net 
> [mailto:tapestry-developer-admin@lists.sourceforge.net] On 
> Behalf Of Elankath, Tarun (Cognizant)
> Sent: Monday, February 24, 2003 2:47 AM
> To: tapestry-developer@lists.sourceforge.net
> Subject: [Tapestry-developer] Relative paths in templates 
> linking to style sheets and images don't work.
> 
> 
> Hi tapestry gurus,
> 
> I have templates that refer to stylesheets and images using 
> relative paths such as styles/site_common.css and 
> images/logo.jpg. I have these directories (and their files) 
> present in the WAR file as well.
> 
> But these don't get included in the resulting page. Do I have 
> to create an asset for every style-sheet and image used ? 
> That would be extremely tedious and I don't want to modify 
> the html templates either. 
> 
> 
> All help appreciated,
> Tarun
> 


RE: Localized DatePicker

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Thanks.  I'm holding on to this and will look at it in the next day or so.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Per Norrman [mailto:pernorrman@telia.com] 
> Sent: Wednesday, March 12, 2003 8:24 AM
> To: 'Tapestry users'
> Subject: Localized DatePicker
> 
> 
> Hi,
> 
> as promised(?) some weeks ago, I took a shot at
> localizing the DatePicker component. Turned out
> that the DHTML and CSS stuff is somewhat more
> demanding than I remembered. Anyways, I've got
> something working and is willing to contribute 
> the work, if it is found useful. Here's an
> overview of the new features:
> 
> * All calendar stuff is extracted from the appropriate
> Java classes: Locale, Calendar, SimpleDateFormat and 
> DateFormatSymbols. This means that you automatically get 
> localized month and weekday names, as well as the correct 
> first weekday.
> 
> * The locale used can be specified using a parameter,
> but defaults to the locale used by the Page.
> 
> * The format pattern can be specified as before, but
> defaults to the Calendar.SHORT format for the current 
> Locale. As a simple help, the input field title attribute 
> contains the localized pattern.
> 
> * Optionally, you can include week numbers in the Calendar
> drop down area. Where I live, this is a wildly popular
> planning element.
> 
> * It is possible to have several DatePicker instances
> on a page, each with its own Locale. Why anyone would want
> that is another question, but its good for a demo.
> 
> * Leap years actually includes February 29.
> 
> The code is tested on IE 6.0 and Mozilla 1.2.1 (IE users
> may try the mousewheel and be pleasantly surprised!)
> 
> One major issue remains, as well as some minor cosmetic stuff:
> 
> 1) I would really like to use a component private stylesheet for 
> the drop down element. However, since there is no standard 
> method to include more than one style sheet I haven't come up 
> with a good solution. What remains, I think, is to 
> programatically set the style in the javascript code. 
> Appropriate class names already exists.
> 
> 2) Currently, the drop down element becomes invisible only if 
> you select a date or click on the down arrow. I just cannot 
> get the previous behaviour to work, where the element was 
> 'closed' when you clicked anywhere on the surrounding area.
> 
> 3) There is slight difference bewteen IE6 and Mozilla, where 
> an inner table is centered in IE (as expected) but not in Mozilla.
> 
> Anyone interested, please have a look and provide some 
> feedback and possibly also solutions.
> 
> If this is something useful, how should I proceed?
> 
> /thanks
>    Per Norrman
> 
> 
> 
> 
> 


Localized DatePicker

Posted by Per Norrman <pe...@telia.com>.
Hi,

as promised(?) some weeks ago, I took a shot at
localizing the DatePicker component. Turned out
that the DHTML and CSS stuff is somewhat more
demanding than I remembered. Anyways, I've got
something working and is willing to contribute 
the work, if it is found useful. Here's an
overview of the new features:

* All calendar stuff is extracted from the appropriate
Java classes: Locale, Calendar, SimpleDateFormat and
DateFormatSymbols. This means that you automatically
get localized month and weekday names, as well as
the correct first weekday.

* The locale used can be specified using a parameter,
but defaults to the locale used by the Page.

* The format pattern can be specified as before, but
defaults to the Calendar.SHORT format for the current 
Locale. As a simple help, the input field title attribute
contains the localized pattern.

* Optionally, you can include week numbers in the Calendar
drop down area. Where I live, this is a wildly popular
planning element.

* It is possible to have several DatePicker instances
on a page, each with its own Locale. Why anyone would want
that is another question, but its good for a demo.

* Leap years actually includes February 29.

The code is tested on IE 6.0 and Mozilla 1.2.1 (IE users
may try the mousewheel and be pleasantly surprised!)

One major issue remains, as well as some minor cosmetic stuff:

1) I would really like to use a component private stylesheet for 
the drop down element. However, since there is no standard
method to include more than one style sheet I haven't come
up with a good solution. What remains, I think, is to programatically
set the style in the javascript code. Appropriate class names
already exists.

2) Currently, the drop down element becomes invisible only if you
select a date or click on the down arrow. I just cannot get the
previous behaviour to work, where the element was 'closed' when you
clicked anywhere on the surrounding area.

3) There is slight difference bewteen IE6 and Mozilla, where an
inner table is centered in IE (as expected) but not in Mozilla.

Anyone interested, please have a look and provide some feedback
and possibly also solutions.

If this is something useful, how should I proceed?

/thanks
   Per Norrman