Re: [Wicket-user] How to build/run things in wicket-stuff?

2005-07-20 Thread Martijn Dashorst

Denis,

The projects in Wicket stuff are meant to create component jars (except 
the wicket-stuff project itself, which is a site generation project). 
There is work going on creating new distributions for each project, but 
that will take some time, as there are many projects and development on 
them continues (hibernate3, databinding packages).


So in the case of velocity panel, you'd run 'maven jar' and find a few 
seconds later a wicket-contrib-velocity-1.0.jar file in the target 
directory. This you can use in your own projects.


If you open the project in your IDE, then you can run the example(s) 
(which is the war type of thingy for) specific for that project. Maven 
typically supports only one artifact per project, so creating a war of 
this jar type of project is probably doomed. :-|


We are happy to hear better strategies for implementing these projects. 
Our main reasons for the current structure are that

o each project should be independend as far as possible,
o each project should create its own section on the web
o each project is maintained by someone with high interest in keeping 
it alive/progressing it, IT COULD BE YOU!
o one huge examples project would be a maintenance nightmare, think for 
instance about showing both hibernate2 and hibernate3 components in one 
project - so each project has its own examples interwoven into it.


Martijn


Denis Haskin wrote:

For those of us wicket/maven neophytes, can someone give some quick 
tips on how to bulid  run one or more of the items in wicket-stuff?  
I'd be happy to add it to the wiki if you do grin


I got wicket-contrib-velocity by using the maven command given at 
http://wicket-stuff.sourceforge.net/cvs-usage.html:


maven scm:checkout-project -Dmaven.scm.method=cvs 
-Dmaven.scm.cvs.module=wicket-stuff 
-Dmaven.scm.cvs.root=:pserver:[EMAIL PROTECTED]:/cvsroot/wicket-stuff 
-Dmaven.scm.checkout.dir=.


That only got me the wicket-stuff module, which I then ran maven on 
but it didn't seem to build much.


So then I tried pulling wicket-contrib-velocity (the one I'm mainly 
interested in) by doing a similar maven scm command but with 
module=wicket-contrib-velocity


I then built that by saying 'maven', it built me a war file in 
target... I then ran that with maven jetty:run-war, but the war file 
doesn't have the web.xml in it (althouhg there is one in this project).


Is that just an error?  Any recommendations?  I'm not really up to 
speed on maven, so I may be missing something obvious.


Thanks,

dwh


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Generating html markup from template.

2005-07-20 Thread Johan Compagner

where does an implemenation of IFilter really come from?
It has to be different for specific locale's?
So that you can have one markup file and filter it with X filters for X 
locales?


johan


Matej Knopp wrote:

Okay, small update.
New interface

public interface IFilter {
public abstract String filter(String source);
}

So I've something like this in my application:

ResourceStreamLocator locator;
IFilter filter;

public ResourceStreamLocator getResourceStreamLocator() {
  if(locator == null) {
filter = new IFilter() {
  public String filter(String source) {
return source.replaceAll(@foo.bar, new value);
  }
};
locator = new 
FilterResourceStreamLocator(getSettings().getResourceFinder(), filter);

}
  return locator;
}

So the result is replacing every @foo.bar instance in every loaded 
markup with 'new value'.

Do you think such/similiar functionality could get into wicket 1.1?
Replacing is done on fly, on every markup reload.

I know that the actual filtering is not optimizied, using Strings 
instead of string buffers/builders. But I don't see point in 
optimizing this because it won't happen periodicaly, only on markup 
reload.


Well, I'm going to get some sleep, it's 3:12 AM here :)

-Matej

Matej Knopp wrote:

I have done some basic stuff.

I have UrlFilterResourceStream class with function

  String filter(String source) {
...
  }

that can be used to process the markup files before the actual markup 
parsing.


All you have to do is add

ResourceStreamLocator locator;

public ResourceStreamLocator getResourceStreamLocator() {
  if(locator == null)
locator = new 
FilterResourceStreamLocator(getSettings().getResourceFinder());

  return locator;
}

It works well with cache, reloading works correctly too and locales 
shouldn't be not a problem.


The next step is to introducte an IFilter interface, so that is 
possible to take filtering out of the UrlFilterResourceStream class. 
And of course, implementing actual text substitution. I'm still not 
sure here. What I need is pretty simple, something like replacing 
$(foo.bar) with a string. I'm not sure if I need velocity/freemaker 
for this. It seems that regexp expressions will do this.


-Matej



Eelco Hillenius wrote:

That would be pretty useable. You probably can't use the default 
markup caching mechanism though, so we might want to make that more 
configurable 
https://sourceforge.net/tracker/index.php?func=detailaid=1235319group_id=119783atid=684978 



Juergen, is there anything more we can do here? We had a discussion 
about 18n text replacing on this list last week too, so it seems 
like a good idea to consider whether we can support this better...


Eelco


Matej Knopp wrote:

What I wanted to do was having a one markup (like Page_src.html) 
that would look like

html
  $(item1)
/html
and properties for different languages that could be used as model 
to generate Page_en, Page_sk, Page_de, etc. These pages would be 
generated statically from ide. But I don't want it anymore.


I'm going to try if it is possible to implement my own resource 
locator that would return a stream that would generate the correct 
page content (replacing things like $(item1)) on fly.


I know I can use wicket:component to i18n, but it doesn't seem to 
be able to do things like translation buttons label (the value 
attribute).


-Matej

Juergen Donnerstag wrote:


Matej,

did you look at the forminput example already? It shows you how to 
use

properties file to localize your apps.


I've tried some plugins from exlipse plugins site but I couldn't 
get any

of them running properly in eclipse 3.1.






not sure what you mean. An ecplise plugin which automatically
maintains the different markup files for you with input from
properties files?


So I just want to know if anyone have some experience with this 
to share.





wicket-stuff contains an example on using velocity, but as far as I
remember not in the context of I18N. Don't know if that is of any
help.

What I did some months ago and I don't know if it is still working
with HEAD, I created a kind of wicket based pre-processor which
created files page.html, page_en.html, page_de.html etc from a
template markup file and replaced wicket-preprocessor tags.
Wicket-preprocessor tags didn't use wicket:id, they simply used
w18n:id instead, thus separating the pre-processor from actual wicket
tags. But it was wicket-core which replaced the text to be localized.

Juergen




package esz.app.i18n;

import java.net.URL;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import wicket.util.resource.IResourceStream;
import wicket.util.resource.locator.AbstractResourceStreamLocator;
import wicket.util.resource.locator.ResourceStreamLocator;

public class ClassLoaderFilterResourceStreamLocator extends
AbstractResourceStreamLocator {

/** Logging */

Re: [Wicket-user] Another nested objects question

2005-07-20 Thread Eelco Hillenius

Nick Heudecker wrote:


Thanks.  I'd also have to wrap the entire section of markup that
presents the ListView in something so that I can set that to
visible/invisible, right?  What would I use, a MarkupContainer?

 



Using WebMarkupContainer would be the easiest/ cleanest option.

Eelco


On 7/19/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 


.
   




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 





---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] javascript tree-component

2005-07-20 Thread Jan Mikkelsen
Thanks Igor!

It worked like a charm.

New class:

public class HiddenTextField extends TextField {
public HiddenTextField(final String id) {
super(id);
}

public HiddenTextField(final String id, IModel model) {
super(id, model);
}

protected final void onComponentTag(final ComponentTag tag) {
checkComponentTag(tag, input);
checkComponentTagAttribute(tag, type, hidden);
super.onComponentTag(tag);
}
}

---
Form:
treeStateModel = new Model(new String());
add(new HiddenTextField(treeState, treeStateModel));

onSubmit:
String treeState = (String) treeStateModel.getObject(null);

...
function getTreeValues() {
var treeState = document.getElementById(treeState);
treeState.value = tree.getAllChecked();
document.frm.submit();
}

// --
/SCRIPT

form name=frm wicket:id=detailForm onSubmit=getTreeValues();
input wicket:id=treeState id=treeState type=hidden value=/
...

Jan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor
Vaynberg
Sent: 20. juli 2005 02:41
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] javascript tree-component

Mod textfield to work with input type=hidden instead of input
type=text and have your javascript update that value any time there is
a
change. Quick and dirty ;)

Igor


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan
Mikkelsen
Sent: Tuesday, July 19, 2005 6:31 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] javascript tree-component

Well, I have started using dhtmlxTree. I do need a solution this week.
What
I can't figure out is how to transfer tree state (checkboxes)  from
javascript to Wicket. I can get the state as a single string by calling
a
javascript function, but how do I transfer it to Wicket? A quick and
dirty
solution is fine :)

Jan



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from
IBM. Find simple to follow Roadmaps, straightforward articles,
informative
Webcasts and more! Get everything you need to get up to speed, fast.
http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user






---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Eelco Hillenius

Last week there was a discussion about making AbstractValidator thread safe.

Who is for this? It would mean breaking a lot of clients (dangerous 
break too, as it means changing overridable methods), and imho it would 
make the validators look a bit more ugly (every method has to be 
extended with a FormComponent argument). It would however make 
AbstractValidator thread safe, and it makes implementing IValidator from 
scratch maybe a bit easier (IValidator has to change too for this change 
to work).


I'm +0

Eelco


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Matej Knopp

+0 too.
It seems to be a little bit better by design, making it threadsafe. But 
the real benefits are not clear no me. The gained speed improvement is 
IMHO unmeasurable.


-Matej

Eelco Hillenius wrote:
Last week there was a discussion about making AbstractValidator thread 
safe.


Who is for this? It would mean breaking a lot of clients (dangerous 
break too, as it means changing overridable methods), and imho it would 
make the validators look a bit more ugly (every method has to be 
extended with a FormComponent argument). It would however make 
AbstractValidator thread safe, and it makes implementing IValidator from 
scratch maybe a bit easier (IValidator has to change too for this change 
to work).


I'm +0

Eelco


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] A crack at RAD.

2005-07-20 Thread Jonathan Carlson
I have some dynamic query filtering classes/interfaces that I need to
abstract out to work with either Cayenne or Hibernate.  It would be cool
to add that to Phil's component.

- Jonathan

 [EMAIL PROTECTED] 2005-07-20 2:21:11 AM 
very nice. 

just an idea: What you think about a search / filter bar. Input fields
etc. to limit (filter) the result set. A bar above all columns and
once you hit return or press a button the filters are applied.

Juergen

On 7/20/05, Phil Kulak [EMAIL PROTECTED] wrote:
 If anyone would like to read my little writup, possibly try out the
 demo app, and give me feedback, I'd apreciate it. I would have put
 this on the Wiki, but I wanted to include screenshots so that people
 wouldn't have to run the app to see what I was talking about. This
is
 in CVS as well, in wicket-contrib-data and then the Hibernate data
 source classes are at wicket-contrib-hibernate-3.0. Thanks!
 
 http://www.cs.uoregon.edu/~torok/GridPanelDocs/ 
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opclick 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user 



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click 
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com 
_


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Peter Veentjer - Anchor Men

Who is for this? It would mean breaking a lot of clients (dangerous
break too, as it means changing overridable methods), and imho it would
make the validators look a bit more ugly (every method has to be
extended with a FormComponent argument). 
__
It maybe is 'ugly' to carry the parameter around, but there current version is 
a lot uglier. The code is complicated to understand and it locks the complete 
system. So if there are a lot of users that use the validator.. the single 
instance (Validators ca be singletons) has to be locked by each client multiple 
times. And offcource.. there are a lot of methods that don`t make sense and 
have vague concurrency semantics. 
 
I would call the removal of the locking and better concurrency semantics a big 
improvement.
 
It would however make
AbstractValidator thread safe, and it makes implementing IValidator from
scratch maybe a bit easier (IValidator has to change too for this change
to work).
__
The IValidator doesn`t have to change. The interface remains the same, only the 
documentation of 'needs to be synchronized' has to be removed.  Btw I`m not 
going to use the current validators anyway. I`m developing a set of Validators 
that are more consistent and easier to use. Maybe my company is going to make 
it opensource so everyone can use them. 

I'm +0

I`m +100 *hopes nobody has the idea to vote against with a bigger number*

Eelco


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


winmail.dat

RE: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Erik van Oosten
+1

Wicket should not depend too much on the cleverness of the average
programmer, especially when we talk about making code thread safe. I
have seen this being underestimated too often already.

Regards,
Erik.




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Igor Vaynberg
+1 Ditto

Igor


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Erik van Oosten
 Sent: Wednesday, July 20, 2005 7:47 AM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] VOTE: make AbstractValidator threadsafe
 
 +1
 
 Wicket should not depend too much on the cleverness of the 
 average programmer, especially when we talk about making code 
 thread safe. I have seen this being underestimated too often already.
 
 Regards,
 Erik.
 
 
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration 
 Strategies from IBM. Find simple to follow Roadmaps, 
 straightforward articles, informative Webcasts and more! Get 
 everything you need to get up to speed, fast. 
 http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] A crack at RAD.

2005-07-20 Thread Phil Kulak
XDocs would be cool. I'm pretty bad with Maven though, so yea, someone
else would have to do that. Also, we'd need to figure out how to get
stuff out of sandbox packages. I haven't done it because there's
some of Eelco's functionality that I didn't reproduce, but I also
couldn't figure out the use cases, so I don't know how important said
functionality is.

I also wouldn't mind saying goodbye to Hibernate2 support. I tried
making an IDataSource for Hibernate2, but the API is a lot more
limited and it looks like it would be tricky, if not impossible. Also,
that way I can focus on an EJB3 IDataSource.

Jonathan, I think something like your QueryFilter interface could work
well. The only thing that seems like it could be tricky with filters
is all the string query manipulation we'd have to add for Hibernate. I
originally tried using criteria queries to avoid that problem, but
then adding an ordering becomes difficult if it uses a join. I think
though, that if we add filters, we're going to have to figure out how
to use criteria queries, or risk rewriting the whole API with a
slightly different syntax.

On 7/20/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
 I have some dynamic query filtering classes/interfaces that I need to
 abstract out to work with either Cayenne or Hibernate.  It would be cool
 to add that to Phil's component.
 
 - Jonathan
 
  [EMAIL PROTECTED] 2005-07-20 2:21:11 AM 
 very nice.
 
 just an idea: What you think about a search / filter bar. Input fields
 etc. to limit (filter) the result set. A bar above all columns and
 once you hit return or press a button the filters are applied.
 
 Juergen
 
 On 7/20/05, Phil Kulak [EMAIL PROTECTED] wrote:
  If anyone would like to read my little writup, possibly try out the
  demo app, and give me feedback, I'd apreciate it. I would have put
  this on the Wiki, but I wanted to include screenshots so that people
  wouldn't have to run the app to see what I was talking about. This
 is
  in CVS as well, in wicket-contrib-data and then the Hibernate data
  source classes are at wicket-contrib-hibernate-3.0. Thanks!
 
  http://www.cs.uoregon.edu/~torok/GridPanelDocs/
 
 
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration
 Strategies
  from IBM. Find simple to follow Roadmaps, straightforward articles,
  informative Webcasts and more! Get everything you need to get up to
  speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __
 
 __
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 
 Katun Corporation -- www.katun.com
 _
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Replacing messaging strategy in AbstractValidator

2005-07-20 Thread Brad Pardee
Hi Igor,

Thanks for the info!  Looks like I should have done
more investigation of the mailing lists and how
Localizers/overriding StringResourceLoader works. (I'm
a newbie, thats my excuse) 

I think your stuff combined with being able to locally
override the resourceKey (see
https://sourceforge.net/tracker/?func=detailatid=684978aid=1240458group_id=119783)
would be a good thing.  It looks like their doing this
in 1.1, although the current version of
AbstractValidator doesn't seem to use the local
version of resourceKey if its been set.  If this is
done, RequiredValidator should be made non-singleton
and maybe setResourceKey should return IValidator so
you can chain.

-Brad

Hi Brad,

 For my application, I wanted to use a central
properties file 
 for the validation messages. 

I was looking to do this exact same thing. My version
is here:

http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg01977.html


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] A crack at RAD.

2005-07-20 Thread Igor Vaynberg
I might be wrong but I do not think the criteria api support 2nd level cache
when retrieving multiple objects which is a must for something like this.

Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Phil Kulak
 Sent: Wednesday, July 20, 2005 8:34 AM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] A crack at RAD.
 
 XDocs would be cool. I'm pretty bad with Maven though, so 
 yea, someone else would have to do that. Also, we'd need to 
 figure out how to get stuff out of sandbox packages. I 
 haven't done it because there's some of Eelco's functionality 
 that I didn't reproduce, but I also couldn't figure out the 
 use cases, so I don't know how important said functionality is.
 
 I also wouldn't mind saying goodbye to Hibernate2 support. I 
 tried making an IDataSource for Hibernate2, but the API is a 
 lot more limited and it looks like it would be tricky, if not 
 impossible. Also, that way I can focus on an EJB3 IDataSource.
 
 Jonathan, I think something like your QueryFilter interface 
 could work well. The only thing that seems like it could be 
 tricky with filters is all the string query manipulation we'd 
 have to add for Hibernate. I originally tried using criteria 
 queries to avoid that problem, but then adding an ordering 
 becomes difficult if it uses a join. I think though, that if 
 we add filters, we're going to have to figure out how to use 
 criteria queries, or risk rewriting the whole API with a 
 slightly different syntax.
 
 On 7/20/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
  I have some dynamic query filtering classes/interfaces that 
 I need to 
  abstract out to work with either Cayenne or Hibernate.  It would be 
  cool to add that to Phil's component.
  
  - Jonathan
  
   [EMAIL PROTECTED] 2005-07-20 2:21:11 AM 
  very nice.
  
  just an idea: What you think about a search / filter bar. 
 Input fields 
  etc. to limit (filter) the result set. A bar above all columns and 
  once you hit return or press a button the filters are applied.
  
  Juergen
  
  On 7/20/05, Phil Kulak [EMAIL PROTECTED] wrote:
   If anyone would like to read my little writup, possibly 
 try out the 
   demo app, and give me feedback, I'd apreciate it. I would 
 have put 
   this on the Wiki, but I wanted to include screenshots so 
 that people 
   wouldn't have to run the app to see what I was talking about. This
  is
   in CVS as well, in wicket-contrib-data and then the 
 Hibernate data 
   source classes are at wicket-contrib-hibernate-3.0. Thanks!
  
   http://www.cs.uoregon.edu/~torok/GridPanelDocs/
  
  
   ---
   SF.Net email is sponsored by: Discover Easy Linux Migration
  Strategies
   from IBM. Find simple to follow Roadmaps, straightforward 
 articles, 
   informative Webcasts and more! Get everything you need to 
 get up to 
   speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration 
 Strategies 
  from IBM. Find simple to follow Roadmaps, straightforward articles, 
  informative Webcasts and more! Get everything you need to get up to 
  speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 __
  This email has been scanned by the MessageLabs Email 
 Security System.
  For more information please visit http://www.messagelabs.com/email 
  
 __
  
  
 __
  This email and any files transmitted with it are confidential and 
  intended solely for the use of the individual or entity to 
 whom they 
  are addressed. If you have received this email in error 
 please notify 
  the system manager.
  
  Katun Corporation -- www.katun.com
  
 _
  
  
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration 
 Strategies 
  from IBM. Find simple to follow Roadmaps, straightforward articles, 
  informative Webcasts and more! Get everything you need to get up to 
  speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 ---
 

RE: [Wicket-user] A crack at RAD.

2005-07-20 Thread Jonathan Carlson
I really don't know Hibernate, (I'm not sure what 2nd level cache is)
but I don't think that this would be possible without using the Query
Criteria.  At least it would be very ugly as I think we'd have to
generate dynamic query strings ourselves.



 [EMAIL PROTECTED] 2005-07-20 10:50:38 AM 
I might be wrong but I do not think the criteria api support 2nd level
cache
when retrieving multiple objects which is a must for something like
this.

Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Phil Kulak
 Sent: Wednesday, July 20, 2005 8:34 AM
 To: wicket-user@lists.sourceforge.net 
 Subject: Re: [Wicket-user] A crack at RAD.
 
 XDocs would be cool. I'm pretty bad with Maven though, so 
 yea, someone else would have to do that. Also, we'd need to 
 figure out how to get stuff out of sandbox packages. I 
 haven't done it because there's some of Eelco's functionality 
 that I didn't reproduce, but I also couldn't figure out the 
 use cases, so I don't know how important said functionality is.
 
 I also wouldn't mind saying goodbye to Hibernate2 support. I 
 tried making an IDataSource for Hibernate2, but the API is a 
 lot more limited and it looks like it would be tricky, if not 
 impossible. Also, that way I can focus on an EJB3 IDataSource.
 
 Jonathan, I think something like your QueryFilter interface 
 could work well. The only thing that seems like it could be 
 tricky with filters is all the string query manipulation we'd 
 have to add for Hibernate. I originally tried using criteria 
 queries to avoid that problem, but then adding an ordering 
 becomes difficult if it uses a join. I think though, that if 
 we add filters, we're going to have to figure out how to use 
 criteria queries, or risk rewriting the whole API with a 
 slightly different syntax.
 
 On 7/20/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
  I have some dynamic query filtering classes/interfaces that 
 I need to 
  abstract out to work with either Cayenne or Hibernate.  It would be

  cool to add that to Phil's component.
  
  - Jonathan
  
   [EMAIL PROTECTED] 2005-07-20 2:21:11 AM 
  very nice.
  
  just an idea: What you think about a search / filter bar. 
 Input fields 
  etc. to limit (filter) the result set. A bar above all columns and

  once you hit return or press a button the filters are applied.
  
  Juergen
  
  On 7/20/05, Phil Kulak [EMAIL PROTECTED] wrote:
   If anyone would like to read my little writup, possibly 
 try out the 
   demo app, and give me feedback, I'd apreciate it. I would 
 have put 
   this on the Wiki, but I wanted to include screenshots so 
 that people 
   wouldn't have to run the app to see what I was talking about.
This
  is
   in CVS as well, in wicket-contrib-data and then the 
 Hibernate data 
   source classes are at wicket-contrib-hibernate-3.0. Thanks!
  
   http://www.cs.uoregon.edu/~torok/GridPanelDocs/ 
  
  
   ---
   SF.Net email is sponsored by: Discover Easy Linux Migration
  Strategies
   from IBM. Find simple to follow Roadmaps, straightforward 
 articles, 
   informative Webcasts and more! Get everything you need to 
 get up to 
   speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opclick 
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net 
   https://lists.sourceforge.net/lists/listinfo/wicket-user 
  
  
  
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration 
 Strategies 
  from IBM. Find simple to follow Roadmaps, straightforward articles,

  informative Webcasts and more! Get everything you need to get up to

  speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net 
  https://lists.sourceforge.net/lists/listinfo/wicket-user 
  
  

__
  This email has been scanned by the MessageLabs Email 
 Security System.
  For more information please visit http://www.messagelabs.com/email

  

__
  
  

__
  This email and any files transmitted with it are confidential and 
  intended solely for the use of the individual or entity to 
 whom they 
  are addressed. If you have received this email in error 
 please notify 
  the system manager.
  
  Katun Corporation -- www.katun.com 
  

_
  
  
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration 
 Strategies 
  from IBM. Find simple to follow Roadmaps, straightforward articles,

  informative Webcasts and more! Get everything you need to get up to

  

RE: [Wicket-user] A crack at RAD.

2005-07-20 Thread Jonathan Carlson
Oops, I should have clarified...  I was referring to the dynamic query
filtering and ordering.  As far as I can tell, that might require the
Query Criteria stuff.

 [EMAIL PROTECTED] 2005-07-20 10:58:22 AM 
I really don't know Hibernate, (I'm not sure what 2nd level cache is)
but I don't think that this would be possible without using the Query
Criteria.  At least it would be very ugly as I think we'd have to
generate dynamic query strings ourselves.



 [EMAIL PROTECTED] 2005-07-20 10:50:38 AM 
I might be wrong but I do not think the criteria api support 2nd level
cache
when retrieving multiple objects which is a must for something like
this.

Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Phil Kulak
 Sent: Wednesday, July 20, 2005 8:34 AM
 To: wicket-user@lists.sourceforge.net 
 Subject: Re: [Wicket-user] A crack at RAD.
 
 XDocs would be cool. I'm pretty bad with Maven though, so 
 yea, someone else would have to do that. Also, we'd need to 
 figure out how to get stuff out of sandbox packages. I 
 haven't done it because there's some of Eelco's functionality 
 that I didn't reproduce, but I also couldn't figure out the 
 use cases, so I don't know how important said functionality is.
 
 I also wouldn't mind saying goodbye to Hibernate2 support. I 
 tried making an IDataSource for Hibernate2, but the API is a 
 lot more limited and it looks like it would be tricky, if not 
 impossible. Also, that way I can focus on an EJB3 IDataSource.
 
 Jonathan, I think something like your QueryFilter interface 
 could work well. The only thing that seems like it could be 
 tricky with filters is all the string query manipulation we'd 
 have to add for Hibernate. I originally tried using criteria 
 queries to avoid that problem, but then adding an ordering 
 becomes difficult if it uses a join. I think though, that if 
 we add filters, we're going to have to figure out how to use 
 criteria queries, or risk rewriting the whole API with a 
 slightly different syntax.
 
 On 7/20/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
  I have some dynamic query filtering classes/interfaces that 
 I need to 
  abstract out to work with either Cayenne or Hibernate.  It would
be

  cool to add that to Phil's component.
  
  - Jonathan
  
   [EMAIL PROTECTED] 2005-07-20 2:21:11 AM 
  very nice.
  
  just an idea: What you think about a search / filter bar. 
 Input fields 
  etc. to limit (filter) the result set. A bar above all columns and

  once you hit return or press a button the filters are applied.
  
  Juergen
  
  On 7/20/05, Phil Kulak [EMAIL PROTECTED] wrote:
   If anyone would like to read my little writup, possibly 
 try out the 
   demo app, and give me feedback, I'd apreciate it. I would 
 have put 
   this on the Wiki, but I wanted to include screenshots so 
 that people 
   wouldn't have to run the app to see what I was talking about.
This
  is
   in CVS as well, in wicket-contrib-data and then the 
 Hibernate data 
   source classes are at wicket-contrib-hibernate-3.0. Thanks!
  
   http://www.cs.uoregon.edu/~torok/GridPanelDocs/ 
  
  
   ---
   SF.Net email is sponsored by: Discover Easy Linux Migration
  Strategies
   from IBM. Find simple to follow Roadmaps, straightforward 
 articles, 
   informative Webcasts and more! Get everything you need to 
 get up to 
   speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opclick 
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net 
   https://lists.sourceforge.net/lists/listinfo/wicket-user 
  
  
  
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration 
 Strategies 
  from IBM. Find simple to follow Roadmaps, straightforward
articles,

  informative Webcasts and more! Get everything you need to get up
to

  speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net 
  https://lists.sourceforge.net/lists/listinfo/wicket-user 
  
  

__
  This email has been scanned by the MessageLabs Email 
 Security System.
  For more information please visit http://www.messagelabs.com/email


  

__
  
  

__
  This email and any files transmitted with it are confidential and 
  intended solely for the use of the individual or entity to 
 whom they 
  are addressed. If you have received this email in error 
 please notify 
  the system manager.
  
  Katun Corporation -- www.katun.com 
  

_
  
  
  ---
  SF.Net 

RE: [Wicket-user] Replacing messaging strategy in AbstractValidator

2005-07-20 Thread Igor Vaynberg
Brad,
You are right, the resourceKey() func in the AbstractValidator doesn't yet
take the custom key into account. Im sure this will be taken care of in the
near future, the validators are still being worked on.
See the mailing list for details.

Igor


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Brad Pardee
 Sent: Wednesday, July 20, 2005 8:38 AM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Replacing messaging strategy in 
 AbstractValidator
 
 Hi Igor,
 
 Thanks for the info!  Looks like I should have done more 
 investigation of the mailing lists and how 
 Localizers/overriding StringResourceLoader works. (I'm a 
 newbie, thats my excuse) 
 
 I think your stuff combined with being able to locally 
 override the resourceKey (see
 https://sourceforge.net/tracker/?func=detailatid=684978aid=1
 240458group_id=119783)
 would be a good thing.  It looks like their doing this in 
 1.1, although the current version of AbstractValidator 
 doesn't seem to use the local version of resourceKey if its 
 been set.  If this is done, RequiredValidator should be made 
 non-singleton and maybe setResourceKey should return 
 IValidator so you can chain.
 
 -Brad
 
 Hi Brad,
 
  For my application, I wanted to use a central properties file  for 
 the validation messages.
 
 I was looking to do this exact same thing. My version
 is here:
 
 http://www.mail-archive.com/wicket-user@lists.sourceforge.net
 /msg01977.
 html
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration 
 Strategies from IBM. Find simple to follow Roadmaps, 
 straightforward articles, informative Webcasts and more! Get 
 everything you need to get up to speed, fast. 
 http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Eelco Hillenius

Phil Kulak wrote:


I'm +1 only because while we break validation for this, I may be able
to push through my setResourceKey(String) change. 



You allready did; implemented this two days ago :)


If it's not
currently thread-safe, why are all the validators singletons?
 



afaik, that's only RequiredValidator. Pretty wrong though. Oops.

Another reason to fix this. I'm from +0 to +1.

Eelco


On 7/20/05, Erik van Oosten [EMAIL PROTECTED] wrote:
 


+1

Wicket should not depend too much on the cleverness of the average
programmer, especially when we talk about making code thread safe. I
have seen this being underestimated too often already.

Regards,
   Erik.




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

   




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 





---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] A crack at RAD.

2005-07-20 Thread Eelco Hillenius

Igor Vaynberg wrote:


I know it is significantly easier to do this using the criteria api, but I
think it would be better to invest more time and come up with an approach
that can work on hql since ejb3ql is almost exactly the same and so you
would get ejb3 support for free.

 



And I would be /very/ interested in EJB3 support.

Eelco


Im currently using something like this:

public interface QlConstraint {
boolean shouldUse();

/** add ql to the query */
void onAddQl(StringBuilder hql);

/** bind parameters */
void onAddParams(Query q);
}

My dao gets a list of these and loops over them. Its not completely fool
proof yet but it works for simpler quieries.

Igor
 





---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Replacing messaging strategy in AbstractValidator

2005-07-20 Thread Eelco Hillenius

Still have to commit, but it does now.

Eelco

Igor Vaynberg wrote:


Brad,
You are right, the resourceKey() func in the AbstractValidator doesn't yet
take the custom key into account. Im sure this will be taken care of in the
near future, the validators are still being worked on.
See the mailing list for details.

Igor


 


-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Brad Pardee

Sent: Wednesday, July 20, 2005 8:38 AM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Replacing messaging strategy in 
AbstractValidator


Hi Igor,

Thanks for the info!  Looks like I should have done more 
investigation of the mailing lists and how 
Localizers/overriding StringResourceLoader works. (I'm a 
newbie, thats my excuse) 

I think your stuff combined with being able to locally 
override the resourceKey (see

https://sourceforge.net/tracker/?func=detailatid=684978aid=1
240458group_id=119783)
would be a good thing.  It looks like their doing this in 
1.1, although the current version of AbstractValidator 
doesn't seem to use the local version of resourceKey if its 
been set.  If this is done, RequiredValidator should be made 
non-singleton and maybe setResourceKey should return 
IValidator so you can chain.


-Brad

   


Hi Brad,

 

For my application, I wanted to use a central properties file  for 
the validation messages.
   


I was looking to do this exact same thing. My version
 


is here:
   


http://www.mail-archive.com/wicket-user@lists.sourceforge.net
 


/msg01977.
   


html
 


---
SF.Net email is sponsored by: Discover Easy Linux Migration 
Strategies from IBM. Find simple to follow Roadmaps, 
straightforward articles, informative Webcasts and more! Get 
everything you need to get up to speed, fast. 
http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



   






---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 





---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Converters

2005-07-20 Thread Nick Heudecker
Hi,

I'd like to have dates in my application formatted as -MM-DD. 
I've been able to get it working for submitted dates, but displayed
dates are still being returned as DD/MM/YY.  How do I properly setup
the converter for this?

Also, I'm having a problem with BigDecimals and OGNL.  If the field
that contains the BigDecimal is null, OGNL is still trying to convert
it and throwing a java.lang.NumberFormatException.  How can I tell
OGNL to ignore the value if it's blank?

Thanks.


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Eelco Hillenius

How does this look (see attachement)?

Eelco
/*
 * $Id: AbstractValidator.java,v 1.27 2005/04/03 16:29:53 jonathanlocke Exp $
 * $Revision: 1.27 $ $Date: 2005/04/03 16:29:53 $
 * 
 * ==
 * Licensed under the Apache License, Version 2.0 (the License); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.markup.html.form.validation;

import java.util.HashMap;
import java.util.Map;

import wicket.Localizer;
import wicket.markup.html.form.FormComponent;
import wicket.model.IModel;
import wicket.model.Model;
import wicket.util.lang.Classes;

/**
 * Base class for form component validators. This class is thread-safe and therefore it is
 * safe to share validators across sessions/threads.
 * p
 * Error messages can be registered on a component by calling one of the error(FormComponent ...)
 * overloads. The error message will be retrieved using the Localizer for the form
 * component. Normally, this localizer will find the error message in a string resource
 * bundle (properties file) associated with the page in which this validator is contained.
 * The key that is used to get the message can be set explicity by calling setResourceKey.
 * If that key is not explicitly set, it default to the pattern:
 * code[form-name].[component-name].[validator-class]/code.
 * For example:
 * p
 * MyForm.name.RequiredValidator=A name is required.
 * p
 * Error message string resources can contain optional ognl variable interpolations from
 * the component, such as:
 * p
 * editBook.name.LengthValidator='${input}' is too short a name.
 * p
 * Available variables for interpolation are:
 * ul
 * li${input} - The user's input/li
 * li${name} - The name of the component/li
 * /ul
 * but specific validator subclasses may add more values.
 * /p
 * @author Jonathan Locke
 * @author Eelco Hillenius
 */
public abstract class AbstractValidator implements IValidator
{
	/**
	 * Any set resource key. When it is not set, the validator uses it's default
	 * message key.
	 */
	private String resourceKey;

	/**
	 * Sets an error on the component being validated using the map returned by
	 * messageModel() for variable interpolations.
	 * p
	 * See class comments for details about how error messages are loaded and formatted.
	 * @param formComponent form component
	 */
	public void error(FormComponent formComponent)
	{
		error(formComponent, messageModel(formComponent));
	}

	/**
	 * Returns a formatted validation error message for a given component. The error
	 * message is retrieved from a message bundle associated with the page in which this
	 * validator is contained using the given resource key. The resourceModel is used for
	 * variable interpolation.
	 * @param formComponent form component
	 * @param resourceKey The resource key to use
	 * @param resourceModel The model for variable interpolation
	 */
	public void error(FormComponent formComponent, final String resourceKey,
			final IModel resourceModel)
	{
		// Return formatted error message
		Localizer localizer = formComponent.getLocalizer();
		String message = localizer.getString(resourceKey, formComponent, resourceModel);
		formComponent.error(message);
	}

	/**
	 * Sets an error on the component being validated using the given map for variable
	 * interpolations.
	 * @param formComponent form component
	 * @param resourceKey The resource key to use
	 * @param map The model for variable interpolation
	 */
	public void error(FormComponent formComponent, final String resourceKey, final Map map)
	{
		error(formComponent, resourceKey, Model.valueOf(map));
	}

	/**
	 * Sets an error on the component being validated using the given map for variable
	 * interpolations.
	 * @param formComponent form component
	 * @param map The model for variable interpolation
	 */
	public void error(FormComponent formComponent, final Map map)
	{
		error(formComponent, getResourceKey(formComponent), Model.valueOf(map));
	}

	/**
	 * Explicitly set the resource key that should be used.
	 * WARNING: as resourceKey() is overrable, setting this parameter does not guarantee
	 * that extending validators honor using it.
	 * @param resourceKey the resource key
	 */
	public final void setResourceKey(String resourceKey)
	{
		this.resourceKey = resourceKey;
	}

	/**
	 * Returns the explicitly set resource key or null when it was not set explicitly.
	 * @return the explicitly set resource key or null
	 */
	protected final String getResourceKey()
	{
		return resourceKey;
	}

	/**
	 * Gets the resource 

Re: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Eelco Hillenius

One thing though. I'm strongly thinking about making

protected String getResourceKey(FormComponent formComponent)

final. This means you can't provide it algoritmicly, but you can call one of 
the error methods with the key you want, or you can even implement IValidator 
directly.

The reason why I want this, is that otherwise you can set the resourceKey, but 
as any subclass can override the method, there is no way it is guaranteed it is 
actually used.

Agreed?

Eelco


Eelco Hillenius wrote:


How does this look (see attachement)?

Eelco



/*
* $Id: AbstractValidator.java,v 1.27 2005/04/03 16:29:53 jonathanlocke Exp $
* $Revision: 1.27 $ $Date: 2005/04/03 16:29:53 $
* 
* ==

* Licensed under the Apache License, Version 2.0 (the License); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* 
* http://www.apache.org/licenses/LICENSE-2.0
* 
* Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package wicket.markup.html.form.validation;

import java.util.HashMap;
import java.util.Map;

import wicket.Localizer;
import wicket.markup.html.form.FormComponent;
import wicket.model.IModel;
import wicket.model.Model;
import wicket.util.lang.Classes;

/**
* Base class for form component validators. This class is thread-safe and 
therefore it is
* safe to share validators across sessions/threads.
* p
* Error messages can be registered on a component by calling one of the 
error(FormComponent ...)
* overloads. The error message will be retrieved using the Localizer for the 
form
* component. Normally, this localizer will find the error message in a string 
resource
* bundle (properties file) associated with the page in which this validator is 
contained.
* The key that is used to get the message can be set explicity by calling 
setResourceKey.
* If that key is not explicitly set, it default to the pattern:
* code[form-name].[component-name].[validator-class]/code.
* For example:
* p
* MyForm.name.RequiredValidator=A name is required.
* p
* Error message string resources can contain optional ognl variable 
interpolations from
* the component, such as:
* p
* editBook.name.LengthValidator='${input}' is too short a name.
* p
* Available variables for interpolation are:
* ul
* li${input} - The user's input/li
* li${name} - The name of the component/li
* /ul
* but specific validator subclasses may add more values.
* /p
* @author Jonathan Locke
* @author Eelco Hillenius
*/
public abstract class AbstractValidator implements IValidator
{
/**
 * Any set resource key. When it is not set, the validator uses it's 
default
 * message key.
 */
private String resourceKey;

/**
 * Sets an error on the component being validated using the map 
returned by
 * messageModel() for variable interpolations.
 * p
 * See class comments for details about how error messages are loaded 
and formatted.
 * @param formComponent form component
 */
public void error(FormComponent formComponent)
{
error(formComponent, messageModel(formComponent));
}

/**
 * Returns a formatted validation error message for a given component. 
The error
 * message is retrieved from a message bundle associated with the page 
in which this
 * validator is contained using the given resource key. The 
resourceModel is used for
 * variable interpolation.
 * @param formComponent form component
 * @param resourceKey The resource key to use
 * @param resourceModel The model for variable interpolation
 */
public void error(FormComponent formComponent, final String resourceKey,
final IModel resourceModel)
{
// Return formatted error message
Localizer localizer = formComponent.getLocalizer();
String message = localizer.getString(resourceKey, 
formComponent, resourceModel);
formComponent.error(message);
}

/**
 * Sets an error on the component being validated using the given map 
for variable
 * interpolations.
 * @param formComponent form component
 * @param resourceKey The resource key to use
 * @param map The model for variable interpolation
 */
public void error(FormComponent formComponent, final String 
resourceKey, final Map map)
{
error(formComponent, resourceKey, Model.valueOf(map));
}

/**

[Wicket-user] HTML can't go in the wiki

2005-07-20 Thread Jonathan Carlson
I have written up some rough HTML examples of how I think RAD List and
RAD Edit components could (should?) work together.  The examples are in
HTML and use tags that aren't allowed by the Wiki so I can't put it
there.  Can I put my HTML somewhere else?  It will be linked to by a
page on the Wiki.

- Jonathan

__
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com 
_


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTML can't go in the wiki

2005-07-20 Thread Nick Heudecker
Do you need to escape them with the HTML entities?

On 7/20/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
 I have written up some rough HTML examples of how I think RAD List and
 RAD Edit components could (should?) work together.  The examples are in
 HTML and use tags that aren't allowed by the Wiki so I can't put it
 there.  Can I put my HTML somewhere else?  It will be linked to by a
 page on the Wiki.
 
 - Jonathan
 
 __
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 
 Katun Corporation -- www.katun.com
 _
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RAD component integration

2005-07-20 Thread Eelco Hillenius
Will look at it tomorrow. Just one thing I had to say... there's 
drag-n-drop functionality popping up everywhere! Check out the very cool 
Qoozdoo example: 
http://qooxdoo.sourceforge.net/build/public/test/user/Drag_And_Drop_2.html


Eelco


Jonathan Carlson wrote:


Congrats to Phil on the unveiling of his GridView panel.

Please look at the attached HTML file.  Are there other/better ways to
easily relate persistent objects in HTML?  That is, other than using
bookmarks?  This is the best/simplest idea that I can think of so far
given that HTML doesn't have nice drag-n-drop capability.

I think bookmarked instances are important for our generic RAD
components to support so we can mix-and-match RAD panels between
different developers.  RAD edit panels can put bookmarked instances into
dropdowns for easily creating relationshipse between objects.

Thoughts?  Brick bats?  Go for it?

- Jonathan


 




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.1

2005-07-20 Thread Nick Heudecker
Not sure if my vote counts, but I'm fine upgrading.

On 7/20/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Lots of fixes and improvements this week. That's good. It getting harder
 to maintain the 1.0 branch though. The plan was not to do any API
 breaking fixes in that, but with the validator changes of today that
 gets impossible.
 
 Who /needs/ the 1.0 to be supported? My hope is that as you'll have some
 API breaks anyway, you might as well do the full upgrade to 1.1. Saves
 us a lot of work (that we can better spend at fixing issues and
 honouring requests), and gives you JavaScript/CSS functionality! And it
 doesn't break much more.
 
 So, if you absolutely need the 1.0 branch to be supported, please speak
 up now :) Otherwise, we'll be focussing on 1.1. instead.
 
 Eelco
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] HTML can't go in the wiki

2005-07-20 Thread Phil Kulak
Yea, that was my problem.

On 7/20/05, Nick Heudecker [EMAIL PROTECTED] wrote:
 Do you need to escape them with the HTML entities?
 
 On 7/20/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
  I have written up some rough HTML examples of how I think RAD List and
  RAD Edit components could (should?) work together.  The examples are in
  HTML and use tags that aren't allowed by the Wiki so I can't put it
  there.  Can I put my HTML somewhere else?  It will be linked to by a
  page on the Wiki.
 
  - Jonathan
 
  __
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error please notify
  the system manager.
 
  Katun Corporation -- www.katun.com
  _
 
 
  ---
  SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
  from IBM. Find simple to follow Roadmaps, straightforward articles,
  informative Webcasts and more! Get everything you need to get up to
  speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: make AbstractValidator threadsafe

2005-07-20 Thread Johan Compagner

is the resourcekey for such a validator always the same?
Because now you have extracted out the formcomponent but introduced the 
resourcekey.as a variable



Eelco Hillenius wrote:

How does this look (see attachement)?

Eelco


/*
 * $Id: AbstractValidator.java,v 1.27 2005/04/03 16:29:53 jonathanlocke Exp $
 * $Revision: 1.27 $ $Date: 2005/04/03 16:29:53 $
 * 
 * ==

 * Licensed under the Apache License, Version 2.0 (the License); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.markup.html.form.validation;

import java.util.HashMap;
import java.util.Map;

import wicket.Localizer;
import wicket.markup.html.form.FormComponent;
import wicket.model.IModel;
import wicket.model.Model;
import wicket.util.lang.Classes;

/**
 * Base class for form component validators. This class is thread-safe and 
therefore it is
 * safe to share validators across sessions/threads.
 * p
 * Error messages can be registered on a component by calling one of the 
error(FormComponent ...)
 * overloads. The error message will be retrieved using the Localizer for the 
form
 * component. Normally, this localizer will find the error message in a string 
resource
 * bundle (properties file) associated with the page in which this validator is 
contained.
 * The key that is used to get the message can be set explicity by calling 
setResourceKey.
 * If that key is not explicitly set, it default to the pattern:
 * code[form-name].[component-name].[validator-class]/code.
 * For example:
 * p
 * MyForm.name.RequiredValidator=A name is required.
 * p
 * Error message string resources can contain optional ognl variable 
interpolations from
 * the component, such as:
 * p
 * editBook.name.LengthValidator='${input}' is too short a name.
 * p
 * Available variables for interpolation are:
 * ul
 * li${input} - The user's input/li
 * li${name} - The name of the component/li
 * /ul
 * but specific validator subclasses may add more values.
 * /p
 * @author Jonathan Locke
 * @author Eelco Hillenius
 */
public abstract class AbstractValidator implements IValidator
{
/**
 * Any set resource key. When it is not set, the validator uses it's 
default
 * message key.
 */
private String resourceKey;

/**
 * Sets an error on the component being validated using the map 
returned by
 * messageModel() for variable interpolations.
 * p
 * See class comments for details about how error messages are loaded 
and formatted.
 * @param formComponent form component
 */
public void error(FormComponent formComponent)
{
error(formComponent, messageModel(formComponent));
}

/**
 * Returns a formatted validation error message for a given component. 
The error
 * message is retrieved from a message bundle associated with the page 
in which this
 * validator is contained using the given resource key. The 
resourceModel is used for
 * variable interpolation.
 * @param formComponent form component
 * @param resourceKey The resource key to use
 * @param resourceModel The model for variable interpolation
 */
public void error(FormComponent formComponent, final String resourceKey,
final IModel resourceModel)
{
// Return formatted error message
Localizer localizer = formComponent.getLocalizer();
String message = localizer.getString(resourceKey, 
formComponent, resourceModel);
formComponent.error(message);
}

/**
 * Sets an error on the component being validated using the given map 
for variable
 * interpolations.
 * @param formComponent form component
 * @param resourceKey The resource key to use
 * @param map The model for variable interpolation
 */
public void error(FormComponent formComponent, final String 
resourceKey, final Map map)
{
error(formComponent, resourceKey, Model.valueOf(map));
}

/**
 * Sets an error on the component being validated using the given map 
for variable
 * interpolations.
 * @param formComponent form component
 * @param map The model for variable interpolation
 */
public void error(FormComponent 

Re: [Wicket-user] Wicket 1.1

2005-07-20 Thread Francis Amanfo

+1 for 1.1

- Original Message - 
From: Eelco Hillenius [EMAIL PROTECTED]

To: Wicket User List wicket-user@lists.sourceforge.net
Sent: Wednesday, July 20, 2005 22:55
Subject: [Wicket-user] Wicket 1.1


Lots of fixes and improvements this week. That's good. It getting harder 
to maintain the 1.0 branch though. The plan was not to do any API 
breaking fixes in that, but with the validator changes of today that 
gets impossible.


Who /needs/ the 1.0 to be supported? My hope is that as you'll have some 
API breaks anyway, you might as well do the full upgrade to 1.1. Saves 
us a lot of work (that we can better spend at fixing issues and 
honouring requests), and gives you JavaScript/CSS functionality! And it 
doesn't break much more.


So, if you absolutely need the 1.0 branch to be supported, please speak 
up now :) Otherwise, we'll be focussing on 1.1. instead.


Eelco


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user






---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user