Re: [RFE] packed JS in DEPLOYMENT mode.

2007-11-30 Thread David Bernard

What do you mean by included resources ?
By default every js and css under src/main/resources, src/main/webapp, 
src/main/js are minified. (using the resources option is for exceptionnal case)

Contact me privatly for questions about the plugin (not related to wicket).

Alex Objelean wrote:

David, what is the best practice to specify the order of included resources?

Thank you!


David Bernard-2 wrote:

You could aggregate every type of resources.

Alex Objelean wrote:

Very interesting. Would be nice to have also aggregate css.

Regards, 
Alex.



David Bernard-2 wrote:

If you want you could use the yuicompressor-maven-plugin to minified
(more than just strip whitespace) at build time.
http://alchim.sf.net/yuicompressor-maven-plugin
Other features:
* aggregate js
* minified css

So you could test/run with minified in development and/or deployment
mode

Disclamer, I'm the author of the plugin, but not of the compressor.

Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RFE] packed JS in DEPLOYMENT mode.

2007-11-29 Thread David Bernard

If you want you could use the yuicompressor-maven-plugin to minified (more 
than just strip whitespace) at build time.
http://alchim.sf.net/yuicompressor-maven-plugin
Other features:
* aggregate js
* minified css

So you could test/run with minified in development and/or deployment mode

Disclamer, I'm the author of the plugin, but not of the compressor.

Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RFE] packed JS in DEPLOYMENT mode.

2007-11-29 Thread David Bernard

You could aggregate every type of resources.

Alex Objelean wrote:

Very interesting. Would be nice to have also aggregate css.

Regards, 
Alex.



David Bernard-2 wrote:

If you want you could use the yuicompressor-maven-plugin to minified
(more than just strip whitespace) at build time.
http://alchim.sf.net/yuicompressor-maven-plugin
Other features:
* aggregate js
* minified css

So you could test/run with minified in development and/or deployment mode

Disclamer, I'm the author of the plugin, but not of the compressor.

Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to Jquery, Json, wicket spring?

2007-11-04 Thread David Bernard

Hi,

I started the wicketstuff-jquery project, currently there is no doc/wiki, only 
the [source][1] is available and a demo application ([source][2], [war][3]).
For the communication with between client and server, I used the native Wicket API, 
simpler than trying to write it in JSON (client and server).

every feedbacks, helps,... are welcome through this mailing list (please prefix 
subject with [wicketstuff-jquery] or via the issue tracker) [4].

[1]: 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/
[2]: 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples/
[3]: 
http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war
[4]: http://wicketstuff.org/jira/browse/WSJQUERY

Pen wrote:


We are developing a new web based application in wicket, we need to
integrate Ajax(Jquery 1.2) with JSON data format and wicket(1.3). 
Does anybody know how to do this? any sample example or pointer will be

great full. I have googled and could not find anything.
Also is there any example to integrate Wicket(1.3) with spring using new
spring annotations 2.5?

thanks
Pen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Netbeans 6

2007-10-20 Thread David Bernard

I try NB 6 some time ago with wicket and maven.
You don't need to mvn netbeans:netbeans, but you need to install NB 
module/plugins to manage maven2 project.
ToolsPluginsAvailable plugins
Sort by category, select to install : maven in category java, and if you want 
(optional) other plugin in category maven.

Regard

ZedroS Schwart wrote:

Hi all

Following what's written here http://wicket.apache.org/quickstart.html
I've tried to have the quickstart to run in Netbeans 6 beta 1.

I successfully managed to create the project using the mvn
archetype:create ... command, but I don't manage to use it with
Netbeans 6 even if I read :
* To create a NetBeans project perform the mvn netbeans:netbeans
command inside the project directory, or if using NetBeans 6, just
open the pom.xml directly.

I've tried the mvn netbeans:netbeans command in various locations
(at the same level as the project folder and inside it) but got :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'netbeans'.
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] The plugin 'org.apache.maven.plugins:maven-netbeans-plugin' does not exis
t or no valid version could be found
[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time:  1 second
[INFO] Finished at: Sat Oct 20 14:59:25 CEST 2007
[INFO] Final Memory: 1M/4M
[INFO] 

Furthermore, I don't manage to just open the pom.xml directly. I
open the file with Netbeans, then I see it but I see nothing to have
some action. Furthermore, when doing open project in my project
folder, NEtbeans doesn't recognise the pom file, so no project is
open.

Where am I doing wrong ?

Thanks in advance
ZedroS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Netbeans 6

2007-10-20 Thread David Bernard

I can't help you more, I didn't use those feature when I work with netbeans. I run the 
webapp from a shell with mvn jetty:run.

Sorry

ZedroS Schwart wrote:

Thanks a lot.

Netbeans has now created a quickstart project. However its name is
quickstart (war) and I don't manage to have it running. I run the
Start.java but nothing happens...

Sorry for all these questions, I'm new to Netbeans (which I choose to
try out the UML part).

Thanks in advance

ZedroS

On 10/20/07, David Bernard [EMAIL PROTECTED] wrote:

I try NB 6 some time ago with wicket and maven.
You don't need to mvn netbeans:netbeans, but you need to install NB 
module/plugins to manage maven2 project.
ToolsPluginsAvailable plugins
Sort by category, select to install : maven in category java, and if you want 
(optional) other plugin in category maven.

Regard

ZedroS Schwart wrote:

Hi all

Following what's written here http://wicket.apache.org/quickstart.html
I've tried to have the quickstart to run in Netbeans 6 beta 1.

I successfully managed to create the project using the mvn
archetype:create ... command, but I don't manage to use it with
Netbeans 6 even if I read :
* To create a NetBeans project perform the mvn netbeans:netbeans
command inside the project directory, or if using NetBeans 6, just
open the pom.xml directly.

I've tried the mvn netbeans:netbeans command in various locations
(at the same level as the project folder and inside it) but got :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'netbeans'.
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] The plugin 'org.apache.maven.plugins:maven-netbeans-plugin' does not exis
t or no valid version could be found
[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time:  1 second
[INFO] Finished at: Sat Oct 20 14:59:25 CEST 2007
[INFO] Final Memory: 1M/4M
[INFO] 

Furthermore, I don't manage to just open the pom.xml directly. I
open the file with Netbeans, then I see it but I see nothing to have
some action. Furthermore, when doing open project in my project
folder, NEtbeans doesn't recognise the pom file, so no project is
open.

Where am I doing wrong ?

Thanks in advance
ZedroS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PopupDatePicker + AjaxButton + IE 7 + visibility

2007-10-10 Thread David Bernard

WARNself promotion/WARN

In the wicketstuff-jquery there is a date picker (based on jquery) that should 
(not tested I'm on linux) work on IE7.
You could download the examples war at (quicker than svn co + build only for 
test)
http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war


Juha Alatalo wrote:

Hi,

we are still using old DatePicker (PopupDatePicker in
wicket-contrib-datepicker) and found an error in following situation.

- Panel is invisible
- AjaxButton sets panel visible
- DatePicker (in that panel) doens't work when using IE 7

I created a simple example:
http://download.syncrontech.com/public/PopupDatePickerExample.zip
which contains two errors when using IE 7

Expected ';' (when pressing AjaxButton)
'Calendar._TT.DEF_DATE_FORMAT' is null or not an object (when pressing 
PopupDatePicker link)


- Juha


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Stuff

2007-10-10 Thread David Bernard

WARNself promotion/WARN

In the wicketstuff-jquery there is a sortable list (by DnD) (based on jquery).
You could download the examples war at (quicker than svn co + build only for 
test)
http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war



anita nichols wrote:

 I tried to create Sortable list using Wicket Stuff, but the
SortableListView give me an error. What do I do wrong here, below is the
code:

import wicket.contrib.scriptaculous.*;


add(new SortableListView(item, items)
{
protected void populateItem(ListItem item)
{
// add an AJAX checkbox to the item
item.add(new AjaxCheckBox(check,
new PropertyModel(item.getModel(), checked))

{

protected void onUpdate(AjaxRequestTarget target)
{
// no need to do anything, the model is updated
by
// itself, and we don't have to re-render a
// component (the client already has the correct
// state).

}
});
// display the text of the milestone item

item.add(new Label(text, new PropertyModel(
item.getModel(), text)));
 }
});
}
}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pass information through ajax without form

2007-10-03 Thread David Bernard

For a similar case, I override (in MyBehavior)
@Override
public final void respond(AjaxRequestTarget target) {
try {
Request req = RequestCycle.get().getRequest();
String param1 = req.getParameter(param1);
// to stuff
super.respond(target); //??
} catch (RuntimeException exc) {
throw exc;
} catch (Exception exc) {
throw new RuntimeException(wrap:  + exc.getMessage(), exc);
}
}

And you need to override (server or client side) the callbackUrl to add 
parameter.



ywtsang wrote:

How to pass information (stored in an attribute of a html tag, or javascript
variable) through ajax without involving form?

e.g. there is an ajax link and after I click this ajax link, an ajax event
is triggered and I want to get the states of other html elements/javascript
states in this ajax event

it is no problem to use form, but we have a restriction that no form is used
(may look weird to all here), so I would like to see if there is workaround
in wicket.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pass information through ajax without form

2007-10-03 Thread David Bernard

Currently I have no simple example :-(
In my case (wicketstuff-jquery),  I've got a link that call a javascript 
function generated (with a template on server side).
In this function :
var wcall = wicketAjaxGet('${callbackUrl}' + 
DnDSortableBehavior.asQueryString(), function(){}, function(){});

And the method DnDSortableBehavior.asQueryString() is in charge of formated 
collected state, params,...
var DnDSortableBehavior = {
  ...
  asQueryString : function() {
return 'itemId=' + this.itemId + 'srcContainerId=' + this.srcContainerId + 
'srcPosition=' + this.srcPosition + 'destContainerId='+ this.destContainerId + 
'destPosition=' + this.destPosition;
  }
};

In my case I use jquery to retrieve states, values.

If I've got time this evening, I'll try to create a sample.
Which type of information do you want to send back to server ?

ywtsang wrote:

i have traced the wicket source codes at the place that how it generates the
ajax js like
wcall=wicketAjaxGet('xxx') 
but i don't know exactly what this does, so how to add parameter to the

wicket ajax request?

i can add custom js to the wicket ajax javascript, but how can I pass the
some dynamic js state into that ajax request, e.g. i trigger the ajax
request by a link with AjaxEventBehavior on onclick event.

would you mind show me a simple example?




David Bernard-2 wrote:

For a similar case, I override (in MyBehavior)
 @Override
 public final void respond(AjaxRequestTarget target) {
 try {
 Request req = RequestCycle.get().getRequest();
 String param1 = req.getParameter(param1);
 // to stuff
 super.respond(target); //??
 } catch (RuntimeException exc) {
 throw exc;
 } catch (Exception exc) {
 throw new RuntimeException(wrap:  + exc.getMessage(), exc);
 }
 }

And you need to override (server or client side) the callbackUrl to add
parameter.



ywtsang wrote:

How to pass information (stored in an attribute of a html tag, or
javascript
variable) through ajax without involving form?

e.g. there is an ajax link and after I click this ajax link, an ajax
event
is triggered and I want to get the states of other html
elements/javascript
states in this ajax event

it is no problem to use form, but we have a restriction that no form is
used
(may look weird to all here), so I would like to see if there is
workaround
in wicket.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pass information through ajax without form

2007-10-03 Thread David Bernard



ywtsang wrote:

my case is:

there is a javascript variable (let say var STATE;) that will be updated
througout the client side javascript event

there is a link (for example) that I want to use to pass the STATE through
ajax to server.

in your codes, does client side javascript method
DnDSortableBehavior.asQueryString() generate the query string and append
to the wicketAjaxGet?


YES
I think you could use the code sent by swaroop
@Override
public CharSequence getCallbackUrl() {
return super.getCallbackUrl()+STATE=' + 
STATE;
}

protected CharSequence getCallbackScript(boolean 
recordPageVersion,
boolean onlyTargetActivePage){
return getCallbackScript(wicketAjaxGet('
+ getCallbackUrl(), null, null);
}

and you parse the parameters in the server side?


YES with the code sent ealier.



I think you have already given me good hints and I will continue work on
that, thanks very much


David Bernard-2 wrote:

Currently I have no simple example :-(
In my case (wicketstuff-jquery),  I've got a link that call a javascript
function generated (with a template on server side).
In this function :
var wcall = wicketAjaxGet('${callbackUrl}' +
DnDSortableBehavior.asQueryString(), function(){}, function(){});

And the method DnDSortableBehavior.asQueryString() is in charge of
formated collected state, params,...
var DnDSortableBehavior = {
   ...
   asQueryString : function() {
 return 'itemId=' + this.itemId + 'srcContainerId=' +
this.srcContainerId + 'srcPosition=' + this.srcPosition +
'destContainerId='+ this.destContainerId + 'destPosition=' +
this.destPosition;
   }
};

In my case I use jquery to retrieve states, values.

If I've got time this evening, I'll try to create a sample.
Which type of information do you want to send back to server ?

ywtsang wrote:

i have traced the wicket source codes at the place that how it generates
the
ajax js like
wcall=wicketAjaxGet('xxx') 
but i don't know exactly what this does, so how to add parameter to the

wicket ajax request?

i can add custom js to the wicket ajax javascript, but how can I pass the
some dynamic js state into that ajax request, e.g. i trigger the ajax
request by a link with AjaxEventBehavior on onclick event.

would you mind show me a simple example?




David Bernard-2 wrote:

For a similar case, I override (in MyBehavior)
 @Override
 public final void respond(AjaxRequestTarget target) {
 try {
 Request req = RequestCycle.get().getRequest();
 String param1 = req.getParameter(param1);
 // to stuff
 super.respond(target); //??
 } catch (RuntimeException exc) {
 throw exc;
 } catch (Exception exc) {
 throw new RuntimeException(wrap:  + exc.getMessage(),
exc);
 }
 }

And you need to override (server or client side) the callbackUrl to add
parameter.



ywtsang wrote:

How to pass information (stored in an attribute of a html tag, or
javascript
variable) through ajax without involving form?

e.g. there is an ajax link and after I click this ajax link, an ajax
event
is triggered and I want to get the states of other html
elements/javascript
states in this ajax event

it is no problem to use form, but we have a restriction that no form is
used
(may look weird to all here), so I would like to see if there is
workaround
in wicket.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: is wicket well-suited for integrating JS widgets?

2007-10-03 Thread David Bernard

Hi,

It's lot of easier to integrate JS lib with wicket, than with JSF.
I currently work on JQuery's widget. About integration with YUI or Scriptaclus, 
take a look at wicketstuff.org (svn and wiki), there is already some project 
about it.

Regards.

dukehoops wrote:

I'm a complete newbie to wicket (coming from JSF, Swing world) and am in
process of building small examples as part of framework eval. 


I'm looking for a framework that'd make it easy to integrate arbitrary JS ui
components. Let's say Y!UI  or Script.aculo.us develops a new
super-accordion (or autocomplete 2.0) widget?

Is Wicket designed in a way that'd make integrating this widget relatively
easy? Or is this not considered an important use case?

If it is an important use could, could someone please elaborate why Wicket
has own implementation of an Autocomplete widget (rather than integrating an
existing one)?

thanks
-nikita


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

If I understand right you use Apache as a front end ?
If it work when you access to resin via a direct call 
(http://foo.bar.com:8080/app) then I don't think it a problem with resin but 
with your apache front-end configuration.
What do you map from apache to resin (1)/app, (2)/app* or (3)/app/* ?
In my experience you need to map (1 and 3) or 2. You don't need to map 1 and 3 
only if you have a rewrite rule /app = /app/.

/david

smallufo wrote:

Hi , I think it seems resin's problem (2.1.7).
After a lot of combinations , I still cannot make the wicket filter work.
The error (URL not found) is reported by apache , not by resin . which means
the filter request is not passed to resin.
After I assign port  ( http://foo.bar.com:8080/app ) , everything works fine
now.
But other servlets are not required to assign port , it means
http://foo.bar.com/servlet/OtherServlets works very well.
( servlets are mapped to /servlet/* URL pattern )

Therefore , it maybe resin's problem I think.
To avoid exposing port 8080 , maybe I have to set a reverse-proxy in
apache's config. ...



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

It depends of how you map/forward from apache to resin.
What is your apache configuration?

If it works when you access resin directly, what is done when you access 
throught port 8080, then it's not a resin problem.


smallufo wrote:

Yes , I use Apache as a front end.
If any configuration goes wrong , servlets' requests will not be processed
by resin, either.
But http://foo.bar.com/servlet/other.servlet just works fine. (No port
assign)
It means resin (2.1.7) seems doesn't intercept filter's requests.
I've also reported this issue to resin's maillist.


2007/10/2, David Bernard [EMAIL PROTECTED]:

If I understand right you use Apache as a front end ?
If it work when you access to resin via a direct call (
http://foo.bar.com:8080/app) then I don't think it a problem with resin
but with your apache front-end configuration.
What do you map from apache to resin (1)/app, (2)/app* or (3)/app/* ?
In my experience you need to map (1 and 3) or 2. You don't need to map 1
and 3 only if you have a rewrite rule /app = /app/.



Yes , I tried but in vain.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

Sorry I need the mapping, could you send /usr/local/resin/conf/resin.conf.

smallufo wrote:

2007/10/2, David Bernard [EMAIL PROTECTED]:

It depends of how you map/forward from apache to resin.
What is your apache configuration?

If it works when you access resin directly, what is done when you access
throught port 8080, then it's not a resin problem.




Hi , this is my (partial) httpd.conf

NameVirtualHost *:80

VirtualHost *:80
ServerName foo.bar.com
DocumentRoot /home/foobar/www
ErrorLog/home/foobar/log/error_log
CustomLog /home/foobar/log/access_log combined
Directory /
# DAV on
AllowOverride
# AuthConfig
order deny,allow
Options Indexes FollowSymLinks ExecCGI
/Directory
/VirtualHost


#
# mod_caucho Resin Configuration
#

LoadModule caucho_module /usr/lib/httpd/modules/mod_caucho.so

CauchoConfigFile /usr/local/resin/conf/resin.conf



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Url Coding Strategy

2007-10-02 Thread David Bernard

Have you try to customise (ignore fragment1 and fragment2, or override matches 
methods) the following class:
* org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy
* or org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy

Or use a filter like urlrewrite (http://tuckey.org/urlrewrite/) to convert
/{var1}/fragment1/fragment2/{var2}/{var3}
into
/fragment1/fragment2/{var1}/{var2}/{var3}

/david

kent lai wrote:

Hi,
I am wondering if Wicket supports an in-built coding strategy where 
I can, given the following form


/{var1}/fragment1/fragment2/{var2}/{var3}

it can be mounted as a url to a page, passing in page parameters 
var1, var2, and var3.


A more real use case of this could be a multi user site, with each 
user having a publicly accessible page.


/kentlai/blog/2007/june - BlogMonthArchivePage with page parameters 
user:kentlai, year:2007, month:june
/wicket/blog/2006/may - BlogMonthArchivePage with page parameters 
user:wicket, year:2006, month:may


I looked through the available IRequestTargetUrlCodingStrategy, but 
could not find anything that is described to perform as above, so would 
like to check in the mailing list if it has been done before.


Thanks

Kent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

Sorry No idea :-(

abstract of your problem :

http://foo.bar.com/app  KO
http://foo.bar.com/app/ ??
http://foo.bar.com:8080/app OK
http://127.0.0.1:6802/app   ??
http://foo.bar.com/servlet/TotoServet   OK

servlet/TotoServlet is part of the same webapp
your filter mapping ?
  filter-mapping
filter-namewicket/filter-name
url-pattern/app/url-pattern
  /filter-mapping
  filter-mapping
filter-namewicket/filter-name
url-pattern/app/*/url-pattern
  /filter-mapping

is it right ?

Have you try:
* to set port to 80 instead of 8080
* to create an empty dir app under your webapp, I know that Websphere failed if 
a filter is not apply on a file or servlet.

Sorry.
smallufo wrote:

2007/10/3, David Bernard [EMAIL PROTECTED]:

Sorry I need the mapping, could you send /usr/local/resin/conf/resin.conf.



This is my partial resin.conf  , thanks in advanced.

http port='8080'/
  ...
  srun host='127.0.0.1' port='6802'/
  ...
host id='foo.bar.com' 
  error-log id='log/error.log' /

  jsp precompile='true' static-encoding='true'
recompile-on-error='true'/
  servlet-mapping url-pattern='*.jsp' servlet-name='
com.caucho.jsp.JspServlet'/

  web-app id='/' app-dir='/home/foobar/www'
session-config
  session-max4096/session-max
  session-timeout30/session-timeout
  enable-cookiestrue/enable-cookies
  enable-url-rewritingtrue/enable-url-rewriting
/session-config
  /web-app

  access-log id='/home/foobar/log/servlet/access_log'
rollover-period2W/rollover-period
  /access-log

/host



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard



Have you try:

* to set port to 80 instead of 8080



Port 80 is listened by apache httpd.
I need apache httpd to serve  large amount of static contents.


Yes, and resin.conf isn't run as part of Apache?
Apache (port 80) - srun(6802)

Sorry , no other idea, except may be create an dummyServlet mapped to /app in 
web.xml.
Have you the same problem with resin 3.x ?

:-(

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Presented Wicket to my Company...

2007-09-28 Thread David Bernard

Short version of my experience, last year I created a project with 
Seam+Facelets+JSF+EJB3/JPA+jBPM. I was optimist JSF is a standard with 2+ years 
old, lot of providers,...
* JSF : I tried to mixed components from several provider, Trinidad, ADT, 
MyFaces, Ajax4JSF,... it was a nightweird and time lost (lost of 
incompatibility in the configuration, rendering,...)
* JSF : I try to create my own components (and read  Pro JSF and Ajax: Building 
Rich Internet Components), very complex : Request lifec cycle, extensions points, 
lot of xml to write and keep sync
* JSF : sometime nothing appends due to exception or reject in the dark zone of the 
request life cycle, so don't forget to display messages on every page
* JSF : some basic widget (select) always need hack to work
* JSF : create nasty/crapy html, with lot of form, javascript, div : difficult 
to debug
* Seam : lot of good idea, need to understand Injection and Outjection, need to 
be carefull of scope (request, conversation, session, application) of 
In/outjection
* Seam : some features didn't work with third party JSF components
* Seam : required EJB
* Facelets : nice, helping information on failure, templating, tools/facilities 
to create simples components
* jBPM : nice GUI to design workflow and pageflow = lot of getter/setter, lot 
of xml, not easy to test/mock
* documenation : too many source

After 3 month, I switch to :
* Spring instead of Seam + full EJB3
* hand code instead of jBPM
* session instead conversation scope (spring doesn't support 
conversation/continuation natively)
And keep JSF(Facelets+Ajax4JSF+MyFaces), JPA(Hibernate).

About Spring + JSF, you had 2 choice
* every Bean (from spring) could be accessed from a JSF page
* only bean declared into an xml file could be accessed

About html preview :
* facelet allow to use regular html tag with attribute like wicket, but it's an option, and lot of components need to have child component with special tagname and every/lot of component add tag when 
it's rendering (runtime)  = css from static page template need to be changed.

* facelet like wicket allosw to define fragment, displaying page with fragment 
or fragment alone isn't very usefull. (note : I use fragment as general term, 
not in the Wicket terminology)

Result : I was pretty happy with the final solution but lot of xml to maintain.
It's quicker to start wth JSF than Wicket, but when to start to customize and 
use none basic widget,... welcome to hell (of configuration, documentation,...)

WARN: it's a 2006 experience. I've not used JSF extension/preview from IDE

/david

robert.mcguinness wrote:

...to tell you the truth, it impressed the developers but I didn't get that
feeling from the top brass.  I am pretty sure we will move towards
Seam/JSF/Facelets (we have a presentation on that tech next week given by
another developer) since it is standard.

Has anyone here worked with the Seam tech?  All the examples I have seen
(including Facelets) is nothing but tag soup with scriptlets in the page
(albeit small).  The configuration for a Seam project seems like a pain and
was also told that the JSF/Seam/Faclets jsp pages can be previewed in a
browser (something I thought was so clever about Wicket html pages...and I
was under the impression that Wicket was the only tech that allowed true
separation of concerns; allowing the web designer to work independenly of
the programmer with no duplication of work between the two).  Maybe I'm
blind to Wicket and I'm overlooking Seam and the techs related to it?  


I've worked with Freemarker and Struts before and Wicket feels like
natural web development.  I thought I covered all the great concepts about
Wicket: Ajax, Templating, Inheritance, Reusable Components, OO Concepts…etc…

Bah…just venting.  I’m going to have to win the votes of the developers. 
I’ll keep everyone posted.  Thanks amigos!


- rm3



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket 1.3 examples

2007-09-27 Thread David Bernard

Hi,

What do you download exactly ?
in the .zip or .tar.gz from 
http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
* the source of org.apache.wicket.examples in under
apache-wicket-1.3.0-beta3/src/jdk-1.5/wicket-examples/src/main/java/
* the war under
apache-wicket-1.3.0-beta3/lib

/david

tsuresh wrote:

Hello, I downloaded the wicket 1.3 , but could not find the package
org.apache.wicket.examples , please help me.
thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread David Bernard

Hi,

A list of url, that could help you...

About Wicket vs JSF, there is some articles :
* http://ptrthomas.wordpress.com/2007/05/14/a-wicket-user-tries-jsf/ (from the 
author of JTrac)
* a list of articles : http://cwiki.apache.org/WICKET/articles-about-wicket.html

About widgets :
* take a look to
  * wicket-extensions :
  * wicketstuff (provide some way to integrate with third party js lib) :
* a main difference with JSF and why I switch, it's the easier way to create 
custom component (see the documentation, wiki, slides).

About GWT :
Sorry I can't help you, :-(. I didn't choose it when I start my current project, because it was too younger (no validation, need to implement ISerializable, bad maven integration,... lot of things 
that seems to be fixed now).


/david


Patrick Labonte wrote:

Hello,

at the moment I'm writing my diploma-thesis. The project I'm working
on is for a big company in germany and consists of porting a
Rich-Client-Java-Application to a web-based Application. It should
make heavy use of AJAX-Components, because it should behave like the
Rich-Client. If the experiences with the prototype turn out
satisfactory, the complete application may be ported and maybe other
applications will follow.

At the moment I'm thinking about the architecture: From the
Rich-Client I will reuse Spring, Hibernate and the Business-Objects,
but I'm not sure which Web-Framework to choose from.
I have used JSF in former projects and were not happy with it (the
Web-Designer thought about committing suicide ;)
Well for my thesis I have to give reasons, why I have chosen a
specific technology and I have to convince some people, because they
have hopes to raise some new projects out of the result of my project.
They know about the JSF-Hype, but they don't know about Wicket. I have
heared about it 2 weeks ago the first time.
I'm doing a comparison between JSF and Wicket. I figured out a lot of
disadvantages on JSF-Side, but I have no experience on Wicket-Side and
it's disadvantages. I found out that JBoss Seam fixes some bad JSF
issues.
One guy in my department likes the Google Web Toolkit and is writing a
book about it. I'll give it a try. It's a bit like Wicket from the
programming style, but it needs a separate compiler and I haven't got
a backend solution. I have red that it's possible to use GWT with
Wicket. How far is this grown?
I fear about a lack of AJAX-Wicket components, because I have seen
only few components. I hope someone has experience with similar
projects and can give me a few helpful advices.

Thanks very much.
Patrick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating a Dynamic Image with AJAX (and JFreeChart)

2007-09-25 Thread David Bernard

Hi,

Have you try to extend NonCachingImage instead of Image  (and comments 
setHeaders(...))?

/david

Jason Mihalick wrote:

I am integrating JFreeChart into my application and I've followed the
JFreeChart example on the wiki.  That works very nicely.  I was impressed. 
What I want to do now is update the graph that I display based on the

selection from a drop down list.  I've successfully added the DropDownChoice
component and added a AjaxFormComponentUpdatingBehavior to it.  I've
verified that my onUpdate( AjaxRequestTarget ) method is being invoked and
I'm receiving the updated value, which is very cool.  Here is my onUpdate
implementation for the DropDownChoice control:

protected void onUpdate( AjaxRequestTarget target ) {
  log.debug( graphStyles onUpdate invoked! SelectedGraphStyle =  +  
 FieldResultsPanel.this.getSelectedGraphStyle() );

  FieldResultsPanel.this.updateGraph();  // Update the model and re-create
the JFreeChart Image

  // fieldGraph is my JFreeChartImage instance (derived from Image)
  // This is supposed to indicate back to the browser that the image needs
updated.  I think this
  // is working properly
  target.addComponent( FieldResultsPanel.this.fieldGraph );  
}


Even though I am updating the model of my JFreeChartImage, it appears that
the getImageData method is never invoked afterwards.

What do I need to do in order to get the image data to be re-read?

Here is my JFreeChartImage class:

public class JFreeChartImage extends Image {

  private static final Logger log = LoggerFactory.getLogger(
JFreeChartImage.class );
  
  private int width;

  private int height;

  public JFreeChartImage( String id ) {
super( id );
  }

  public JFreeChartImage( String id, int width, int height ) {
this( id );
this.width = width;
this.height = height;
  }
  
  public JFreeChartImage( String id, JFreeChart chart, int width, int height

) {
super(id, new Model( chart ) );
this.width = width;
this.height = height;
  }

  public Component setModel( JFreeChart chart ) {
log.debug( setModel invoked with chart:  + chart );
return super.setModel( new Model( chart ) );
  }
  
  @Override

  protected Resource getImageResource() {

return new DynamicImageResource(){
  private static final long serialVersionUID = 1L;

  @Override
  protected byte[] getImageData() {
log.debug( Invoking getImageData... );
JFreeChart chart = (JFreeChart)getModelObject();
log.debug( Chart object:  + chart );
return toImageData( chart.createBufferedImage( width, height ) );
  }
  
  @Override

  protected void setHeaders( WebResponse response ) {
if ( isCacheable() ) {
  super.setHeaders(response);
} else {
  response.setHeader( Pragma, no-cache );
  response.setHeader( Cache-Control, no-cache );
  response.setDateHeader( Expires, 0 );
}
  }
};
  }
 
Any help is much appreciated!


--
Jason


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [podcast] Wicket talk at JavaZone 2007

2007-09-24 Thread David Bernard

Why not add it to the wiki or the main site (and other presentations)?
It's a good support for internal/customer show.

I suggest a list with the following information :
* authors
* original target (ex: javazone 2007), first presentation date
* wicket version (1.3.0)
* attachament (slides, src...)
* agenda/toc

/david

Xavier Hanin wrote:

On 9/22/07, Gerolf Seitz [EMAIL PROTECTED] wrote:

for those of you couldn't attend JavaZone 2007 (probably most of you)
and haven't already listened to the podcast, here we go:

http://www4.java.no/presentations/javazone/2007/podcast/5301.mp3



As a reminder, slides and eclipse project for the custom component example
are here:
http://people.apache.org/~xavier/wicket/

Xavier

the rss-feed for all podcasts can be found here:

http://www4.java.no/web/show.do?page=141

Xavier, thank you again for stepping in...

  Gerolf







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [podcast] Wicket talk at JavaZone 2007

2007-09-24 Thread David Bernard

Done,

I added 
http://cwiki.apache.org/confluence/display/WICKET/Slides+and+presentations .
Xavier, could you check information. I create links to your presentations, but 
may do you prefer to convert to attachement (part of the wiki).

/david


Gerolf Seitz wrote:

n 9/24/07, David Bernard [EMAIL PROTECTED] wrote:

Why not add it to the wiki or the main site (and other presentations)?
It's a good support for internal/customer show.



believe it or not, but nobody will stop you from doing this ;)

  gerolf


I suggest a list with the following information :

* authors
* original target (ex: javazone 2007), first presentation date
* wicket version (1.3.0)
* attachament (slides, src...)
* agenda/toc

/david

Xavier Hanin wrote:

On 9/22/07, Gerolf Seitz [EMAIL PROTECTED] wrote:

for those of you couldn't attend JavaZone 2007 (probably most of you)
and haven't already listened to the podcast, here we go:

http://www4.java.no/presentations/javazone/2007/podcast/5301.mp3


As a reminder, slides and eclipse project for the custom component

example

are here:
http://people.apache.org/~xavier/wicket/

Xavier

the rss-feed for all podcasts can be found here:

http://www4.java.no/web/show.do?page=141

Xavier, thank you again for stepping in...

  Gerolf





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to HTTPS?

2007-09-24 Thread David Bernard

Hi,

In my previous project, it was done by configuring (rewrite rules) the http 
front-end (apache, lighttpd,...).
It's an other solution, that avoid developper to deal certificate and all the 
ssl machinery.

/david

Daniel Frisk wrote:
I'm trying to add a check to the constructor on one of our pages (a 
credit card processing page) which should:

1. If protocol is HTTPS; continue as usual
2. Else redirect so that HTTPS is used to access the same page

I saw the sample in the wiki with the annotations that intercepted the 
request processing and etc but it seemed overly complicated for this 
tiny check, any ideas for a minimal implementation which could serve 
this purpose?


// Daniel Frisk
jalbum.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Refresh a page from an AjaxButton?

2007-09-17 Thread David Bernard

Why not use a regular Button and the onSumit() method of the form if you want 
to reload the page ?

/david

UPBrandon wrote:

I'm writing a Wicket app that makes pretty heavy use of the Wicket-Extensions
ModalWindow to present what is basically a dialog box where the user can
enter information into a form.  The form on each dialog box is submitted
with an AjaxButton and each panel has a feedback panel that is refreshed to
show validation errors.  Everything works fine and right now I am just
closing a the dialog when the form is submitted successfully.  However, what
I would like to do is have the entire page reload to reflect whatever
changes the form submit may have caused.  I know that I could add certain
page elements to the AjaxButton's AjaxRequestTarget but the effect of the
dialog could be wide spread.  Is there any way to have an AjaxButton
trigger a complete non-Ajax page refresh?

-Brandon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple CMS or Wiki

2007-09-08 Thread David Bernard

I started a wiki like application 2 month ago. Currently it's not ready for 
publish. But may be I could help you.
What do you want exactly :
* user write in wiki syntax or html (may be with a Wysiwyg)
* for wiki syntax
  * a renderer (convert a wiki syntax to html)
  * which wiki syntax scope : inline (bold, italic,...), image, ... link 
internal, external, ... macro like toc?
* do you want to allow and manage attachament
* do you need a way to store document, or is it already part of your 
application ?
* do you need meta-data : authors, version, title
= the widgets for edition, display, meta-data, attachement, help,...

/david

Tauren Mills wrote:

I'd like to add some simple CMS and/or wiki features to a wicket
application.  I don't need anything full featured by any means.  I'm
looking for pointers to any resources, code, libraries, blogs, or
anything else that would help jump start adding these features to my
application.

I'm aware of the wicketstuff kronos-cms project and am starting to
look into it now.  Also, via kronos-cms, I learned about the apache
jackrabbit project, but know nothing about it at this time.  It looks
like it may be pertinent.

Any other advice and suggestions is appreciated!

Tauren

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: First Day Disgust!

2007-09-08 Thread David Bernard

Welcome,

If you want to start a blank project, try:

$ mvn archetype:create -DarchetypeGroupId=org.apache.wicket
  -DarchetypeArtifactId=wicket-archetype-quickstart
  -DarchetypeVersion=1.3.0-beta3
  -DgroupId=com.mycompany
  -DartifactId=myproject
$ cd myproject
$ more pom.xml

then in this project try (copy/paste) the samples from the website.

/david

chickabee wrote:
Hi Wicketers, 


I tried wicket today and the example application was up and running on
tomcat in no time, so that was the good part, after that if I like to create
a sample application on my own then I found no easy way to start. 


Examples are good to browse through and tell about wicket capabilities,
however,  not so good from learning point of view, All of the examples are
glued together in one big jar file and it is just not quick enough to create
a bare-bone application quickly and easily,

I tried Quicket as mentioned in the readme file, however, Quickets is
nothing but waste of time, because it is glued with Hibernate and Spring and
both should not be there to start with. 


Not a good experience trying wicket so far, I guess it's the time to try out
some more simpler app frameworks, 


-Thumbs Down to Wicket!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket libraries

2007-09-06 Thread David Bernard

Hi,

May be, a solution for your case would be to use ivy ant tasks to manage/list 
the dependencies of wicket. I don't use Ivy, but it could use maven's 
repositories and pom.xml.

I'm not sur it help you, because I don't use it, like lot of, I like maven 2 (dependencies and conventions), and more when I switch to a ant project where I need to read it to understand where are 
things, what are there scope (test, compile,...) finding the right jars when I try Seam one year ago was a headhache... but it's off topic.


/david

Robo wrote:

Hello,

Ok, seems removing \wicket-velocity-1.3.0-beta3.jar\ from build path solved 
problem with velocity problem. But please explain me why removing package from build path 
solves the problem if nowhere in my Hello World code i call for any of the velocity 
packages. Is there some duplicities in packages or what?

As to Maven2. It seems that like you in some way force developers to Maven2. :-) In wicket inAction EA there is just mentioned that when using Ant you need to do some work about libraries ant Maven manages it for you. This is too little for serious docs. Please do look into Icefaces free docs. There is steb by step mentioned what libs one need to enable which feature and the libs are added as demo app more feature ritch. Developer needs to understand core functionalities and dependencies. Just After understandig this developer is able to set up Ant project, make project, Eclipse or Netbeans based project and if you want also Maven. :-) But many of the advices about libs was \Use Maven2\ like. If you use it, so use it but do not force me to use it. Explain in some part od book or docs what do I need to run which part of wicket to save my time to go into jars and solve dependencies troubles. Yes Maven solves you some problems with dependecies and also si suitable for small 

pr

 oject but at big projects it definitely fails. :-/

So please. I know you have lot of work with wicket, and as users can see you 
have a good aproach. But please do spend some time to at least write one 
chapter about libraries, neede dependencies and so on. If you have licensing 
problems just make one clear site with core libs link, dep libs link and 
explanation what feature they are enabling and so on. And make some quick start 
page in which you explainn dependecies on simple sample app :-)Do not take 
alibistic aproach of hiding everithing besides Maven. :-)

Off topic section:
We use Maven for more than one year, also Maven2, in the begining there was 
some WoW`s about how Maven Manages project. Really great. But as the project 
continued and wee needed to add many not so standard feature to project, like 
advanced autorization, very non standard libraries we were forced in the 
troubles wchich could be avoided when there was no Maven2. also the project 
layout is not the best for our taste. IMHO of cource. Rewriting project build 
to ANT took us 6 days, but from that time we saved us a lot of time and nerves 
of solving Maven troubles. From that time we just developed, exactly what we 
were paid for. Idea of Maven2 is very nice and usefull, but implementation is 
kind of tragedy :-/. If I would Alayster Crowley I`d like Maven. Because its 
black magic, but I`m just dump developer who is not even to able to hypnotize 
someone :-)). as we talked about Ant and Maven2 we really realized the good 
sides of Maven. but Ant has simple basic idea with few bilding bl

oc

 ks, which when you combine them wiselly works perfectly. YOU do no need to 
study Ant. Just use it. In Maven  wee need to study Maven, Study black Magic 
without success. :-) It remainds me of one Joke. Americans was looking for some 
pen, which could be used in space without troubles, They invested 1 000 000 $ 
in research and finally had one. Russians in the meantime used pencils. :-) (If 
you do not like Russians just switch the roles ;-) )

So we found Maven2 usefull with small to mid project with some commonly used 
libraries but here it stops. Once you set up good dependencies in Ant you well 
understand what library you use and why (maven shields you from this in some 
way) and yuo are able to solve troubles with build system fast. We do not 
really to care about looking for jars in google. Using Maven it is not that 
time saving. It is more confortable I agree, but not worth the time to solve 
Maven troubles.

There is lot of buzz about \Convention over configuration\, But if that 
convention is badly designed, like Maven project layout, our aproach is flexibility over 
convention. (Jsp is convention but then came grrat wicket wchich is typical flexibility 
over convention, or good convention over bad convention :-) ). But reality besides Rails 
and Wicket I did not see any good convention (over configuration).

EnD of off topic: Uff ;-)
Robert


- Originálna Správa -
Od: Jonathan Locke  
Komu:  
Poslaná: 06.09.2007 04:07 
Predmet: Re: Wicket libraries




not only would the download be bigger, but 

Re: Howto integrate wicket application into my website?

2007-09-05 Thread David Bernard

Per,

To use apache as frontal, use the proxy mod of apache
see http://jetty.mortbay.org/jetty5/faq/faq_s_200-General_t_apache.html

Security tips : I suggest you to change the configuration of jetty to only 
accept request from apache.

/david

Per Newgro wrote:

Hi *,

is it possible to integrate my wicket application running in a jetty / tomcat 
server into my index.html? It would be nice if the content i see in my 
browser with localhost:8081 could be displayed if i type localhost:8080 
which displays the index.html file of my standard apache server.


Thanks for your help
Per

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket problem with slf4j 1.4

2007-09-05 Thread David Bernard

Sorry, you're right, it's not removed.
I said it was removed, because I used it and I take a compilation error, and 
eclipse no more find them.
I don't understand.
Sorry about the noice.

/david

Matej Knopp wrote:

Removed? They added it in 1.4.

-Matej

On 9/5/07, David Bernard [EMAIL PROTECTED] wrote:

Hi,

The 'trace' log level is removed from the last version of slf4j.
In my project, I replaced trace(...) and is isTraceEnabled() by debug(...) and 
isDebugEnabled().
I also use logback :
* successor of log4j
* slf4j native interface
* allow configuration from xml
* allow test and run configuration

I run the webapp with maven mvn jetty:run and change into eclipse (under 
src/main/java for .java and .html) = reload/restart (after 60s).

I'm not a wicket developper, only a user but I expect it could help you.

/david

Tauren Mills wrote:

This might just be my ignorance, but it seems there are some issues
with SLF4J 1.4 used in Wicket, or at least wicket-phonebook.  I want
to find out what combination of logging jars should be used.

I have a project that I based on wicket-phonebook.  I'm using wicket
from trunk.  I have updated some of the jars and now have the
following in my build path:
nlog4j-1.2.25.jar
slf4j-api-1.4.2.jar
slf4j-log4j12-1.4.2.jar

After a recent wicket trunk update, I started getting errors in:
org.apache.wicket.util.thread.Task.run()

When I start my application and hit the home page, the
ModificationWatcher Task has an exception at line 103:

if (log.isTraceEnabled())

It appears that nlog4j-1.2.25 doesn't have the method
Logger.isTraceEnabled().  I tried to use a current log4j that does
have it, but got tons of exceptions when I ran the app in Jetty.  The
nlog4j site says that new developments are in the Logback project:
http://logback.qos.ch/download.html

I am not familiar with Logback.  Do others use it with slf4j?  What is
the recommended combination of jars when using the latest wicket from
trunk?  What are the wicket developers using?

Also, it seems that any changes I make to HTML files are not
automatically reloaded while the app is running in Eclipse.  I have to
restart the app to see the html changes. I'm assuming that is related
to this issue.

Thanks!
Tauren

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compressing javascript resources

2007-09-04 Thread David Bernard

Right to use it, you provide readers, writers, an ErrorReporter and options 
(line-break or not, munge or not, js warning or not,...).
But as Julien (authors of YUI-Compressor) wrote : the compressor is resource 
consumming and not made to run on-fly.

/David

Johan Compagner wrote:

thats a pretty nice one, it also compresses CSS. It does depend on rhino and
another jar
so its a total of 3 jars so it should be outside the wicket core or
extentions (a project by itself?)
also all the examples that i see are with the command line and input
filenames
i hope it has a interface where you can talk with it in java and with input
streams/readers

johan


On 9/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

On 9/1/07, Matej Knopp [EMAIL PROTECTED] wrote:

Well, I certainly didn't want to reinvent the wheel. But all existing
solutions I was able to find either relied on a third part library
(shrinksafe) or had license not compatible with ASL. So I just wrote a
simple stripper. I think it still helps a lot, I didn't want to build a
perfect stripper.

YUI's license is compatible, so

http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/
might work, right?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compressing javascript resources

2007-09-04 Thread David Bernard

I agree. But currently using a custom compressor for javascript and CSS need to 
change the source and replace JavascriptResourceReference by 
CustomCompressedResourceReference (or somthing else).
Except if support of CustomCompressor is integrated into existing core Resource.
https://issues.apache.org/jira/browse/WICKET-918

(note : minification could also be done for CSS)

/David


options (line-break or not, munge or not, js warning or not,...).
But as Julien (authors of YUI-Compressor) wrote : the compressor is
resource consumming and not made to run on-fly.

/David

Johan Compagner wrote:

thats a pretty nice one, it also compresses CSS. It does depend on rhino

and

another jar
so its a total of 3 jars so it should be outside the wicket core or
extentions (a project by itself?)
also all the examples that i see are with the command line and input
filenames
i hope it has a interface where you can talk with it in java and with

input

streams/readers

johan


On 9/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

On 9/1/07, Matej Knopp [EMAIL PROTECTED] wrote:

Well, I certainly didn't want to reinvent the wheel. But all existing
solutions I was able to find either relied on a third part library
(shrinksafe) or had license not compatible with ASL. So I just wrote a
simple stripper. I think it still helps a lot, I didn't want to build

a

perfect stripper.

YUI's license is compatible, so



http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/

might work, right?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compressing javascript resources

2007-09-04 Thread David Bernard

An other solution (stupid ?) :
* at build-time (of the war)
  * scan all the jars and source to find js and css
  * extract/minified/compress into a cache directory
  * include the cache directory into the webapp
* at runtime
  * when a resource is requested, it search into the cache directory before 
into the jar and select the better (original, minified, gzipped,...)

A possible advantage, is for user of frontal like Apache, lighttpd,... to serve 
those static resources

Johan Compagner wrote:

yeah but a one time hit shouldn't be to much of a problem..cache the result
The problem with wicket is that you don't know exactly where everything is
coming from..
They could be in all kinds of jars so if you want compression it should be
runtime else you need to go over
all the jars and code you use and repackage them.

On 9/4/07, David Bernard [EMAIL PROTECTED] wrote:

Right to use it, you provide readers, writers, an ErrorReporter and
options (line-break or not, munge or not, js warning or not,...).
But as Julien (authors of YUI-Compressor) wrote : the compressor is
resource consumming and not made to run on-fly.

/David

Johan Compagner wrote:

thats a pretty nice one, it also compresses CSS. It does depend on rhino

and

another jar
so its a total of 3 jars so it should be outside the wicket core or
extentions (a project by itself?)
also all the examples that i see are with the command line and input
filenames
i hope it has a interface where you can talk with it in java and with

input

streams/readers

johan


On 9/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

On 9/1/07, Matej Knopp [EMAIL PROTECTED] wrote:

Well, I certainly didn't want to reinvent the wheel. But all existing
solutions I was able to find either relied on a third part library
(shrinksafe) or had license not compatible with ASL. So I just wrote a
simple stripper. I think it still helps a lot, I didn't want to build

a

perfect stripper.

YUI's license is compatible, so



http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/

might work, right?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compressing javascript resources

2007-09-04 Thread David Bernard

I didn't suggest to change the url of resources, in the code we always I want 
.js. And the url to request the resource is the same.
I suggest to select the stream to return :
* select form cache, cache dir, jar,...
* select version (to allow management of version = -major.minor.bugfix.js) 
if several version are available
* select format : normal, minified, gzipped, minified+gzipped
* ...

The rules that manage the selection of the stream are configured at the 
Application/ResoursesSettings level.

/david

Johan Compagner wrote:

i don't think that will work very easily because the component will make
ResourceReferences to its internal css and js files
and will be outputted as shared resources. Then all those urls should also
be redirected.

johan


On 9/4/07, David Bernard [EMAIL PROTECTED] wrote:

An other solution (stupid ?) :
* at build-time (of the war)
   * scan all the jars and source to find js and css
   * extract/minified/compress into a cache directory
   * include the cache directory into the webapp
* at runtime
   * when a resource is requested, it search into the cache directory
before into the jar and select the better (original, minified, gzipped,...)

A possible advantage, is for user of frontal like Apache, lighttpd,... to
serve those static resources

Johan Compagner wrote:

yeah but a one time hit shouldn't be to much of a problem..cache the

result

The problem with wicket is that you don't know exactly where everything

is

coming from..
They could be in all kinds of jars so if you want compression it should

be

runtime else you need to go over
all the jars and code you use and repackage them.

On 9/4/07, David Bernard [EMAIL PROTECTED] wrote:

Right to use it, you provide readers, writers, an ErrorReporter and
options (line-break or not, munge or not, js warning or not,...).
But as Julien (authors of YUI-Compressor) wrote : the compressor is
resource consumming and not made to run on-fly.

/David

Johan Compagner wrote:

thats a pretty nice one, it also compresses CSS. It does depend on

rhino

and

another jar
so its a total of 3 jars so it should be outside the wicket core or
extentions (a project by itself?)
also all the examples that i see are with the command line and input
filenames
i hope it has a interface where you can talk with it in java and with

input

streams/readers

johan


On 9/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

On 9/1/07, Matej Knopp [EMAIL PROTECTED] wrote:

Well, I certainly didn't want to reinvent the wheel. But all

existing

solutions I was able to find either relied on a third part library
(shrinksafe) or had license not compatible with ASL. So I just wrote

a

simple stripper. I think it still helps a lot, I didn't want to

build

a

perfect stripper.

YUI's license is compatible, so



http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/

might work, right?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compressing javascript resources

2007-09-04 Thread David Bernard

I didn't a mistake, it's not a possible advantage.
But what is your opinion about a source stream selector ?

/david

Johan Compagner wrote:

you where talking about Apache and serving it as static resources 
So then the urls should he rewritten because /resources/  is mapped to
wicket

johan


On 9/4/07, David Bernard [EMAIL PROTECTED] wrote:

I didn't suggest to change the url of resources, in the code we always I
want .js. And the url to request the resource is the same.
I suggest to select the stream to return :
* select form cache, cache dir, jar,...
* select version (to allow management of version =
-major.minor.bugfix.js) if several version are available
* select format : normal, minified, gzipped, minified+gzipped
* ...

The rules that manage the selection of the stream are configured at the
Application/ResoursesSettings level.

/david

Johan Compagner wrote:

i don't think that will work very easily because the component will make
ResourceReferences to its internal css and js files
and will be outputted as shared resources. Then all those urls should

also

be redirected.

johan


On 9/4/07, David Bernard [EMAIL PROTECTED] wrote:

An other solution (stupid ?) :
* at build-time (of the war)
   * scan all the jars and source to find js and css
   * extract/minified/compress into a cache directory
   * include the cache directory into the webapp
* at runtime
   * when a resource is requested, it search into the cache directory
before into the jar and select the better (original, minified,

gzipped,...)

A possible advantage, is for user of frontal like Apache, lighttpd,...

to

serve those static resources

Johan Compagner wrote:

yeah but a one time hit shouldn't be to much of a problem..cache the

result

The problem with wicket is that you don't know exactly where

everything

is

coming from..
They could be in all kinds of jars so if you want compression it

should

be

runtime else you need to go over
all the jars and code you use and repackage them.

On 9/4/07, David Bernard [EMAIL PROTECTED] wrote:

Right to use it, you provide readers, writers, an ErrorReporter and
options (line-break or not, munge or not, js warning or not,...).
But as Julien (authors of YUI-Compressor) wrote : the compressor is
resource consumming and not made to run on-fly.

/David

Johan Compagner wrote:

thats a pretty nice one, it also compresses CSS. It does depend on

rhino

and

another jar
so its a total of 3 jars so it should be outside the wicket core or
extentions (a project by itself?)
also all the examples that i see are with the command line and input
filenames
i hope it has a interface where you can talk with it in java and

with

input

streams/readers

johan


On 9/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

On 9/1/07, Matej Knopp [EMAIL PROTECTED] wrote:

Well, I certainly didn't want to reinvent the wheel. But all

existing

solutions I was able to find either relied on a third part library
(shrinksafe) or had license not compatible with ASL. So I just

wrote

a

simple stripper. I think it still helps a lot, I didn't want to

build

a

perfect stripper.

YUI's license is compatible, so



http://www.julienlecomte.net/blog/2007/08/13/introducing-the-yui-compressor/

might work, right?

Eelco



-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compressing javascript resources

2007-09-03 Thread David Bernard

Hi,

I use a other approach for the same goal (http optimization), to avoid 
minification and compression at run-time do it at compile-time.
It's what I try do, :
* I first implement the yuicompressor-maven-plugin.
* now I need to develop the ResourceSelector that choose the rigth file to 
return :
  * original
  * minified/yuicompressed
  * original gzipped
  * minified/yuicompressed gzipped

For Javascript and CSS.


Ryan Sonnek wrote:

excellent!  Thanks Matej.  Let me know if you have any other ideas on this.
As soon as there's an abstraction in place, i'll be happy to create a
wicketstuff project with the dojo (and maybe YUI) compressors!

https://issues.apache.org/jira/browse/WICKET-918


On 9/1/07, Matej Knopp [EMAIL PROTECTED] wrote:

I don't see reason why not, you can create a RFE in jira.

-Matej

On 9/2/07, Ryan Sonnek [EMAIL PROTECTED] wrote:

Creating a pluggable interface for this would allow for non-ASL

solutions

to
be hosted through wicket-stuff projects.  The default implementation

could

stay as it is today.


On 9/1/07, Matej Knopp [EMAIL PROTECTED] wrote:

Well, I certainly didn't want to reinvent the wheel. But all existing
solutions I was able to find either relied on a third part library
(shrinksafe) or had license not compatible with ASL. So I just wrote a
simple stripper. I think it still helps a lot, I didn't want to build

a

perfect stripper.

If you know of a solution that doesn't mean another dependency and is
compatible with ASL, I have no objections.

-Matej

On 9/1/07, Ryan Sonnek [EMAIL PROTECTED] wrote:

I've been running my app through the YSlow firefox plugin, and have

been

*very* impressed on how wicket does the right thing most of the

time

(ex:
gzip css and javascript).  nice work guys!

While digging through the YSlow feedback, it suggested that the

javascript

should be minified.  This led me to the wicket JavascriptStripper,

and

after enabling it for my application, YSlow still reports that some
scripts
are not minified.

There seem to be a number of javascript compression tools out there,

and

I'm
wondering if this functionality could be pluggable in wicket.  I'm
interested in trying out a few different options to see their

results:

* JSMin - http://inconspicuous.org/projects/jsmin/jsmin.java
* Dojo Shrink Safe - http://dojotoolkit.org/docs/shrinksafe

My impression is that the Wicket JavascriptStripper is a great

starting

solution, but there are quite a few very advanced solutions out

there,

and

it would be great if wicket could leverage them instead of

re-inventing

the
wheel.  Has anyone looked into this in the past?





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



handle resource with several formats (minified, gzipped,...)

2007-08-29 Thread David Bernard

Hi,

To avoid runtime/on-the-fly compression (js minification/packing,... gzip 
compression) of static resources (!= dynamic),
I do it at compile time (done via the yuicompressor-maven-plugin) and provide 3 
formats (original, minified, minified+gzip)

But I need to choose the right at runtime.

if !settingsMinifiedSuffixes.isEmpty() {
  foreach minifiedSuffix {
if resource with minifiedSuffix exists {
  resource = resource with minifiedSuffix
}
  }
}
if gzipAllowed {
  if resource with gzip exists {
  resource = resource with gzip
}
  } else compress(resource)
  setHttpHeader(gzip)
}

In your opinion where is right (simplest/best) place to implement the Resource 
Selection Policy (may be later could be generalized with locale and style 
selection).
1/ When resource is requested
2/ When url of the resource is build
3/ In a filter
4/ ...

optionals requirements :
* define settings at Application level (init)
* no need to patch wicket source
* applied and compatible with existing Resource's implementation

What are your suggestions ?

Regards

/David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]