You are viewing a plain text version of this content. The canonical link for it is here.
Posted to announce@wicket.apache.org by Igor Vaynberg <ig...@gmail.com> on 2009/12/21 02:28:32 UTC

[announce] wicket 1.4.5 released

The Apache Wicket project is proud to announce the fifth maintenance
release of Apache Wicket 1.4.

Download Apache Wicket 1.4.5
----------------------------------------------
You can download the release here:
http://www.apache.org/dyn/closer.cgi/wicket/1.4.5

Or use this in your Maven pom's to upgrade to the new version:

<dependency>
 <groupId>org.apache.wicket</groupId>
 <artifactId>wicket</artifactId>
 <version>1.4.5</version>
</dependency>

Changes
-------------
A complete list of changes can be found here:
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=DESC&sorter/field=priority&pid=12310561&fixfor=12314441

We thank you for your patience and support.

-The Wicket Team

---------------------------------------------------------------------
To unsubscribe, e-mail: announce-unsubscribe@wicket.apache.org
For additional commands, e-mail: announce-help@wicket.apache.org


RE: Location of css and js files

Posted by Alex Rass <ar...@itbsllc.com>.
I had the exact same problem and I went a diff route:
1) Have designer lay out everything and create whatever tree structure they
like/can understand. Use relative paths only.
2) Deploy it into your environment as a folder. (I suggest some version
control since you both will be editing them).
3) Overwrite the load path for wicket to some context where these files are
located. I am using the root of the site to simplify it.
(tutorials-o-plenty on resource loading).

This way all the content is served by the servlet container. And files are
"where they left them".

There are a BUNCH of tutorials on how to load resources from elsewhere.

But I HIGHLY suggest to not use this for "reusable" components and go with
Wicket's way of storing it all in one place. Your designers can still change
it's look by way of CSS.



This is probably THE most common question in these forums. Perhaps something
should be done to simplify this....
Maybe I'll create something that does this and send it to Igor for review.
Though he'll probably yell at me for promoting bad behavior. ;)

- Alex


-----Original Message-----
From: Steve Swinsburg [mailto:steve.swinsburg@gmail.com] 
Sent: Monday, December 21, 2009 5:36 AM
To: users@wicket.apache.org
Subject: Re: Location of css and js files

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:ar@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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
http://old.nabble.com/-announce--wicket-1.4.5-released-tp26868988p26871530.h
tml
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 



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


Re: Location of css and js files

Posted by Steve Swinsburg <st...@gmail.com>.
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:ar@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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


RE: Location of css and js files

Posted by Alex Objelean <al...@yahoo.com>.

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:ar@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Location of css and js files

Posted by Dale Ogilvie <Da...@trimble.co.nz>.
 
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:ar@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Location of css and js files

Posted by Alex Rass <ar...@itbsllc.com>.
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.Ogilvie@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.vaynberg@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
<Da...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


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



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


RE: Location of css and js files

Posted by Dale Ogilvie <Da...@trimble.co.nz>.
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.vaynberg@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
<Da...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


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


Re: Location of css and js files

Posted by Igor Vaynberg <ig...@gmail.com>.
<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
<Da...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Location of css and js files

Posted by Dale Ogilvie <Da...@trimble.co.nz>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org