RE: Location of css and js files

2009-12-21 Thread Alex Objelean


Hi!
You can use wro4j to load css  js resources from anywhere (even from
classpath, servlet context relative location or disc location). Another
advantage is that the resources are merged and minified, thus greatly
improving the response time:
http://code.google.com/p/wro4j/wiki/GettingStarted

Alex Objelean


dale77 wrote:
 
  
 Hi Alex,
 
 I'm after best practice for css/img and js locations. 
 
 I know there are many ways to do something, I'm after a recommendation
 as to what is the best way to do this in wicket. 
 
 The way that allows the html markup to be opened by the web designer
 showing the same page view that appears at runtime.
 
 Thanks
 
 Dale
 
 
 -Original Message-
 From: Alex Rass [mailto:a...@itbsllc.com] 
 Sent: Monday, 21 December 2009 5:03 p.m.
 To: users@wicket.apache.org
 Subject: RE: Location of css and js files
 
 Global resources you can reference globally. Use can use the
 non-wicket links. Container hosts folders you can use.
 
 Idea behind this is to use components which are fully contained. Hence
 (all in one place).  If this doesn't suit you - there are bunch of
 tutorials on how to load resources from elsewhere.
 
 - Alex
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/-announce--wicket-1.4.5-released-tp26868988p26871530.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Location of css and js files

2009-12-21 Thread Steve Swinsburg
None of these solutions are going to do what the OP really needs since they all 
assume an app server is serving the pages.

Presumably he wants the designer to be able to run up the static HTML in the 
browser, without running in a web application.

You have a few options:
1. link the files as siggested before, ie the HTML knows where the CSS lives 
and references it normally. If you don't want to have to adjust it later, put 
it in the same directory as the classes and HTML. You won't need to start the 
webapp to modify it.
2. Do it in a normal webapp structure as you suggested with the javascript and 
css directories, and use the Wicket provided HeaderContributor to load it. 
You'll need to deploy the webapp, but your designer can edit the HTML live if 
he edits the deployed structure. This approach isn't the greatest since if the 
webapp is redeployed it will be overwritten.

I dont think there is a neat way to do it offline but still in the Wicket way, 
without having it all with the classes.

cheers,
Steve



On 21/12/2009, at 8:19 PM, Alex Objelean wrote:

 
 
 Hi!
 You can use wro4j to load css  js resources from anywhere (even from
 classpath, servlet context relative location or disc location). Another
 advantage is that the resources are merged and minified, thus greatly
 improving the response time:
 http://code.google.com/p/wro4j/wiki/GettingStarted
 
 Alex Objelean
 
 
 dale77 wrote:
 
 
 Hi Alex,
 
 I'm after best practice for css/img and js locations. 
 
 I know there are many ways to do something, I'm after a recommendation
 as to what is the best way to do this in wicket. 
 
 The way that allows the html markup to be opened by the web designer
 showing the same page view that appears at runtime.
 
 Thanks
 
 Dale
 
 
 -Original Message-
 From: Alex Rass [mailto:a...@itbsllc.com] 
 Sent: Monday, 21 December 2009 5:03 p.m.
 To: users@wicket.apache.org
 Subject: RE: Location of css and js files
 
 Global resources you can reference globally. Use can use the
 non-wicket links. Container hosts folders you can use.
 
 Idea behind this is to use components which are fully contained. Hence
 (all in one place).  If this doesn't suit you - there are bunch of
 tutorials on how to load resources from elsewhere.
 
 - Alex
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 View this message in context: 
 http://old.nabble.com/-announce--wicket-1.4.5-released-tp26868988p26871530.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



smime.p7s
Description: S/MIME cryptographic signature


Location of css and js files

2009-12-20 Thread Dale Ogilvie

Hello,

For html page markup containing style and javascript, what is the best
practice for positioning the css and js files, so that they are
available both at design time, and at run time?

I want the designer to be able to see the markup in full glory, while
still having this translate properly at run-time.

I'm thinking of an html file such as:

html
head
link rel='stylesheet' href='style.css' type='text/css'
script type=text/javascript src=javascript.js/script
/head
body
p class=pretty onclick=doit();Hello world/p
/body
/html

If this markup is alongside the java source, that would imply that the
css and js would also have to be there. But tradition would have these
files under a sub directory like so:

...
link rel='stylesheet' href='/style/style.css' type='text/css'
script type=text/javascript src=/js/javascript.js/script
...

What is the wicket way?

Thanks!

Dale

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Location of css and js files

2009-12-20 Thread Igor Vaynberg
head
wicket:link
link rel='stylesheet' href='style.css' type='text/css'
script type=text/javascript src=javascript.js/script
/wicket:link
/head

and have the files in the same package as the page

-igor

On Sun, Dec 20, 2009 at 7:21 PM, Dale Ogilvie
dale.ogil...@trimble.co.nz wrote:

 Hello,

 For html page markup containing style and javascript, what is the best
 practice for positioning the css and js files, so that they are
 available both at design time, and at run time?

 I want the designer to be able to see the markup in full glory, while
 still having this translate properly at run-time.

 I'm thinking of an html file such as:

 html
 head
 link rel='stylesheet' href='style.css' type='text/css'
 script type=text/javascript src=javascript.js/script
 /head
 body
 p class=pretty onclick=doit();Hello world/p
 /body
 /html

 If this markup is alongside the java source, that would imply that the
 css and js would also have to be there. But tradition would have these
 files under a sub directory like so:

 ...
 link rel='stylesheet' href='/style/style.css' type='text/css'
 script type=text/javascript src=/js/javascript.js/script
 ...

 What is the wicket way?

 Thanks!

 Dale

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Location of css and js files

2009-12-20 Thread Dale Ogilvie

Thanks Igor.

So having your css and js collected off under another path is not the
wicket way?

Are you saying the following for best-practice:

com/acme/myweb
 HelloWorldPage.java
 HelloWorldPage.html
 style.css
 Javascript.js

What about images used by the css? Would these live alongside the
style.css as well?


-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Monday, 21 December 2009 4:23 p.m.
To: users@wicket.apache.org
Subject: Re: Location of css and js files

head
wicket:link
link rel='stylesheet' href='style.css' type='text/css' script
type=text/javascript src=javascript.js/script /wicket:link
/head

and have the files in the same package as the page

-igor

On Sun, Dec 20, 2009 at 7:21 PM, Dale Ogilvie
dale.ogil...@trimble.co.nz wrote:

 Hello,

 For html page markup containing style and javascript, what is the best

 practice for positioning the css and js files, so that they are 
 available both at design time, and at run time?

 I want the designer to be able to see the markup in full glory, while 
 still having this translate properly at run-time.

 I'm thinking of an html file such as:

 html
 head
 link rel='stylesheet' href='style.css' type='text/css' script 
 type=text/javascript src=javascript.js/script /head body p

 class=pretty onclick=doit();Hello world/p /body /html

 If this markup is alongside the java source, that would imply that the

 css and js would also have to be there. But tradition would have these

 files under a sub directory like so:

 ...
 link rel='stylesheet' href='/style/style.css' type='text/css' 
 script type=text/javascript src=/js/javascript.js/script ...

 What is the wicket way?

 Thanks!

 Dale

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Location of css and js files

2009-12-20 Thread Alex Rass
Global resources you can reference globally. Use can use the non-wicket
links. Container hosts folders you can use.

Idea behind this is to use components which are fully contained. Hence (all
in one place).  If this doesn't suit you - there are bunch of tutorials on
how to load resources from elsewhere.

- Alex


-Original Message-
From: Dale Ogilvie [mailto:dale.ogil...@trimble.co.nz] 
Sent: Sunday, December 20, 2009 10:41 PM
To: users@wicket.apache.org
Subject: RE: Location of css and js files


Thanks Igor.

So having your css and js collected off under another path is not the
wicket way?

Are you saying the following for best-practice:

com/acme/myweb
 HelloWorldPage.java
 HelloWorldPage.html
 style.css
 Javascript.js

What about images used by the css? Would these live alongside the
style.css as well?


-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Monday, 21 December 2009 4:23 p.m.
To: users@wicket.apache.org
Subject: Re: Location of css and js files

head
wicket:link
link rel='stylesheet' href='style.css' type='text/css' script
type=text/javascript src=javascript.js/script /wicket:link
/head

and have the files in the same package as the page

-igor

On Sun, Dec 20, 2009 at 7:21 PM, Dale Ogilvie
dale.ogil...@trimble.co.nz wrote:

 Hello,

 For html page markup containing style and javascript, what is the best

 practice for positioning the css and js files, so that they are 
 available both at design time, and at run time?

 I want the designer to be able to see the markup in full glory, while 
 still having this translate properly at run-time.

 I'm thinking of an html file such as:

 html
 head
 link rel='stylesheet' href='style.css' type='text/css' script 
 type=text/javascript src=javascript.js/script /head body p

 class=pretty onclick=doit();Hello world/p /body /html

 If this markup is alongside the java source, that would imply that the

 css and js would also have to be there. But tradition would have these

 files under a sub directory like so:

 ...
 link rel='stylesheet' href='/style/style.css' type='text/css' 
 script type=text/javascript src=/js/javascript.js/script ...

 What is the wicket way?

 Thanks!

 Dale

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Location of css and js files

2009-12-20 Thread Dale Ogilvie
 
Hi Alex,

I'm after best practice for css/img and js locations. 

I know there are many ways to do something, I'm after a recommendation
as to what is the best way to do this in wicket. 

The way that allows the html markup to be opened by the web designer
showing the same page view that appears at runtime.

Thanks

Dale


-Original Message-
From: Alex Rass [mailto:a...@itbsllc.com] 
Sent: Monday, 21 December 2009 5:03 p.m.
To: users@wicket.apache.org
Subject: RE: Location of css and js files

Global resources you can reference globally. Use can use the
non-wicket links. Container hosts folders you can use.

Idea behind this is to use components which are fully contained. Hence
(all in one place).  If this doesn't suit you - there are bunch of
tutorials on how to load resources from elsewhere.

- Alex

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org