Re: Cache TextTemplateResourceReferences

2012-03-01 Thread Peter Ertl
oops, I did not read carefully  :-P

it's 'resource' not 'response' so just erase my last post ...


Am 01.03.2012 um 15:31 schrieb Peter Ertl:

> just one little addition...
> 
> instead of
> 
>   response.setCacheDuration
> 
> use
> 
>  response.enableCaching(Duration., WebResponse.CacheScope.)
> 
> 
> 
> Am 01.03.2012 um 09:08 schrieb Martin Grigorov:
> 
>> Hi,
>> 
>> I see this is problematic indeed...
>> Here is how you can achieve this:
>> 
>> class MyPackageTTRR extends TextTemplateResourceReference {
>> 
>> @Override
>> public IResource getResource() {
>>   ResourceStreamResource resource = (ResourceStreamResource) resource;
>>   resource.setCacheDuration(Duration.xyz);
>>   return resource;
>> }
>> }
>> 
>> On Wed, Feb 29, 2012 at 7:52 PM, exaptis  wrote:
>>> Hi,
>>> 
>>> i've been following this post in order to generate dynamic JS/CSS files (
>>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>>> ).
>>> 
>>> Now I'm expiring white page "flickers" on page changes inside the browser,
>>> due to the fact that TextTemplateResourceReferences are not versioned
>>> (-ver-.) or sent with Cache-Headers (per default
>>> they are delivered with Cache: no-cache). As soon as we have uncached CSS or
>>> JS files FF/IE/Chrome/Safari seem to reload the whole page instead of
>>> applying the cached files and this leads to these annoying page "flickers".
>>> 
>>> So i'm searching for a solution to be able to cache
>>> TextTemplateResourceReferences by enabling the version and setting the cache
>>> headers, but I haven't found a solution yet.
>>> 
>>> I'm using Wicket 1.5.3.
>>> 
>>> From a friend of mine I got the tip to check IStaticCacheableResources and
>>> subclass TextTemplateResourceReference in order to return
>>> IStaticCacheableResources, but I didn't have the time yet to test it out.
>>> http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket-core/1.5.0/wicket-core-1.5.0-javadoc.jar!/org/apache/wicket/request/resource/caching/IStaticCacheableResource.html
>>> http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket-core/1.5.0/wicket-core-1.5.0-javadoc.jar!/org/apache/wicket/request/resource/caching/IStaticCacheableResource.html
>>> 
>>> Any help on this would be really great, as I'm quite new to wicket and
>>> haven't found a good tutorial yet which explains how caching for resources
>>> is properly applied.
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: 
>>> http://apache-wicket.1842946.n4.nabble.com/Cache-TextTemplateResourceReferences-tp4432342p4432342.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> 
>> 
>> -- 
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 


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



Re: Cache TextTemplateResourceReferences

2012-03-01 Thread Peter Ertl
just one little addition...

instead of

   response.setCacheDuration

use

  response.enableCaching(Duration., WebResponse.CacheScope.)



Am 01.03.2012 um 09:08 schrieb Martin Grigorov:

> Hi,
> 
> I see this is problematic indeed...
> Here is how you can achieve this:
> 
> class MyPackageTTRR extends TextTemplateResourceReference {
> 
>  @Override
>  public IResource getResource() {
>ResourceStreamResource resource = (ResourceStreamResource) resource;
>resource.setCacheDuration(Duration.xyz);
>return resource;
>  }
> }
> 
> On Wed, Feb 29, 2012 at 7:52 PM, exaptis  wrote:
>> Hi,
>> 
>> i've been following this post in order to generate dynamic JS/CSS files (
>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>> https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html
>> ).
>> 
>> Now I'm expiring white page "flickers" on page changes inside the browser,
>> due to the fact that TextTemplateResourceReferences are not versioned
>> (-ver-.) or sent with Cache-Headers (per default
>> they are delivered with Cache: no-cache). As soon as we have uncached CSS or
>> JS files FF/IE/Chrome/Safari seem to reload the whole page instead of
>> applying the cached files and this leads to these annoying page "flickers".
>> 
>> So i'm searching for a solution to be able to cache
>> TextTemplateResourceReferences by enabling the version and setting the cache
>> headers, but I haven't found a solution yet.
>> 
>> I'm using Wicket 1.5.3.
>> 
>> From a friend of mine I got the tip to check IStaticCacheableResources and
>> subclass TextTemplateResourceReference in order to return
>> IStaticCacheableResources, but I didn't have the time yet to test it out.
>> http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket-core/1.5.0/wicket-core-1.5.0-javadoc.jar!/org/apache/wicket/request/resource/caching/IStaticCacheableResource.html
>> http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket-core/1.5.0/wicket-core-1.5.0-javadoc.jar!/org/apache/wicket/request/resource/caching/IStaticCacheableResource.html
>> 
>> Any help on this would be really great, as I'm quite new to wicket and
>> haven't found a good tutorial yet which explains how caching for resources
>> is properly applied.
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Cache-TextTemplateResourceReferences-tp4432342p4432342.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Controlling URL of static cacheable resources

2012-01-18 Thread Peter Ertl
I you are really pedantic you put a a caching front-end proxy before your 
actual application server.

By default wicket package resources (css/js/images) are delivered with a cache 
expiry of one year. By using fingerprinted filenames (through 
IResourceCachingStrategy) this will work flawlessly when resources are 
outdated. This is the default behavior and will also work in a cluster.

Your front end proxy should be setup to cache these resources (I personally 
recommend nginx). Your java app server will not even be hit when requesting 
resources like .css and .js once they got loaded into the cache. Servers like 
nginx are by far more efficient in serving these kind of resources than any 
java app server.

Unless you want to host facebook.com this setup should be more than sufficient.

No need to twiddle around with filenames and 'static/'

Cheers 
Peter

Am 17.01.2012 um 14:52 schrieb Chris Colman:

> Maybe I am getting pedantic as I was thinking in terms of speed of
> operation for a server that's getting hammered with thousands of hits
> per hour.
> 
> It's quicker to test the first few chars of a URL string for a match
> with 'startsWith' than it is to iterate through to almost the end of
> each URL string to see if it 'contains' a substring. Any URL will fail
> to match on comparison of the first character if they don't have a 'w'
> at the beginning which makes startsWith a 'fast fail' test for most URLs
> it processes.
> 
> I think that's probably why the Servlet Spec chooses to do filter and
> servlet path matching via a 'starts with' strategy without support for
> wildcards except at the very end of a pattern.
> 
> Many of the URLs requested are very long and I try to avoid string
> parsing of lots of thousands of long strings wherever I can - there's
> already enough of that going on without adding to the work load.
> 
>> -Original Message-
>> From: Martin Grigorov [mailto:mgrigo...@apache.org]
>> Sent: Tuesday, 17 January 2012 7:08 PM
>> To: users@wicket.apache.org
>> Subject: Re: Controlling URL of static cacheable resources
>> 
>> Hi Chris,
>> 
>> With IResourceCachingStrategy you can pre/suf-fix the resource name
> with
>> "my.namespace.static", for example.
>> This way your filter will be able to recognize it. It is the same as
> adding
>> the /static/ segment. Just at different place.
>> 
>> On Mon, Jan 16, 2012 at 10:49 PM, Chris Colman
>> >> wrote:
>> 
>>> ** **
>>> 
>>> I'm trying to make static resources have a distinguishable part of
> their
>>> URL near the beginning of the URL to enable easy configuration of
> third
>>> party filters that need to ignore requests for static resources and
> just
>>> proceed along the filter chain.
>>> 
>>> ** **
>>> 
>>> I've looked up the operation of
>>> 
>> org.apache.wicket.request.resource.caching.IResourceCachingStrategy#dec
> orat
>> eUrl
>>> but it appears that it only has the ability to make changes near the
> end
>> of
>>> the resource URL after all the major segments of the URL have already
>> been
>>> set ie., after this part
>>> 
>>> ** **
>>> 
>>> /wicket/resource/org.apache.wicket rest of pathname.ClassName
>>> 
>>> ** **
>>> 
>>> What I am trying to do is get all static resources to end up with a
>>> distinguishable URL that starts off something like:
>>> 
>>> ** **
>>> 
>>> /wicket/resource/static/pathname.ClassName
>>> 
>>> ** **
>>> 
>>> so I can configure a filter to ignore /wicket/resource/static/*
>>> 
>>> ** **
>>> 
>>> In BasicResourceReferenceHandler.mapHandler() perhaps after adding
> the
>>> resource identifier segment:
>>> 
>>> ** **
>>> 
>>> segments.add(getContext().getResourceIdentifier());
>>> 
>>> ** **
>>> 
>>> it could append an extra segment for static resources:
>>> 
>>> ** **
>>> 
>>> final IResource resource = reference.getResource();
>>> 
>>> ** **
>>> 
>>> // if static resource
>>> 
>>> if (resource instanceof IStaticCacheableResource)
>>> 
>>> {
>>> 
>>> segments.add("static");
>>> 
>>> }
>>> 
>>> ** **
>>> 
>>> And so end up with /wicket/resource/static/org.apache.wicket ...
>>> 
>>> ** **
>>> 
>>> ** **
>>> 
>>> ** **
>>> 
>>> I also observed that Wicketstuff resources don't use the /wicket
>>> namespace prefix. They just start out at 
>>> 
>>> ** **
>>> 
>>> /resources/org.name.project.MyClass.script.js
>>> 
>>> ** **
>>> 
>>> So they'd need a separate ignore entry in the filter.
>>> 
>>> ** **
>>> 
>>> ** **
>>> 
>>> Yours sincerely,
>>> 
>>> ** **
>>> 
>>> Chris Colman
>>> 
>>> 
>>> 
>>> Pagebloom Team Leader,
>>> 
>>> Step Ahead Software
>>> 
>>> 
>>> 
>>> pagebloom - your business & your website growing together
>>> 
>>> ** **
>>> 
>>> **Sydney**: (+61 2) 9656 1278 Canberra: (+61 2) 6100 2120
>>> 
>>> 
>>> Email: chr...@stepahead.com.au 
>>> 
>>> Website:
>>> 
>>> http://www.pagebloom.com
>>> 
>>> http://develop.stepaheadsoftware.com
>>> 
>>> 
>>> 
>>> ** *

Re: Mapped resource reference and urlFor()

2011-12-14 Thread Peter Ertl
Try to do the real work in the IResource#respond() (accessing the database and 
retrieving the image) and make calling the constructor cheap, then you should 
not have any bottlenecks at all.

Am 14.12.2011 um 18:59 schrieb Bertrand Guay-Paquet:

> Hi,
> 
> I am using resource references for the first time to implement fetching 
> images from a DB. The URLs will be of the following form:
> "/resources/dbImages/DB_ID.png" where DB_ID is an identifier to retrieve the 
> image from the DB.
> 
> I'm using the article at 
> http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ as a guide 
> and have a couple of questions.
> 
> 1. What is the purpose of the equals() override in the class ImageResource? I 
> don't understand the explanation given in the article... Also, I put a 
> breakpoint in my own resource class' equals() method and it never hits!
> 
> 2. Can I use part of the "resources" namespace or is that asking for trouble 
> since Wicket can use it however it likes?
> 
> 3. When using getRequestCycle().urlFor(new MyResourceReference(), 
> imageParameters), the following happens:
> at line 216 in ResourceMapper#addCachingDecoration(Url, PageParameters) :
>final IResource resource = resourceReference.getResource();
> 
> with a comment right above that says "// TODO is calling getResource() a 
> potential performance bottleneck?"
> 
> I am concerned that each time a url to my image resource reference is 
> created, the DB will be hit, simply for getting the Url! It will then maybe 
> be hit a second time afterwards if the client doesn't have the image in 
> cache. Am I completely off-base here? Is there another way to manage 
> resources so this doesn't happen?
> 
> Thanks,
> Bertrand
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: A lesson learned about wicket

2011-12-14 Thread Peter Ertl
Hi Martin,

trying to give you a qualified opinion on your post...

Am 14.12.2011 um 09:12 schrieb Martin Makundi:

> Hi!
> 
> Today I have learned about a huge misconception I have had about wicket 1.4.
> 
> I have actually been thinking that it is an MVC framework.
> But it is practically not. Why? Wicket's request cycle and
> serialization process makes effortless MVC design almost impossible.

Struts is an 'MVC framework' but I can't remember that it made anything 
'effortless'.

Or asking differently: Is there _any_ MVC framework where things are effortless 
(™)? We would like to learn from that framework so we can improve :-)

> It seems like wicket is just an "MVC proxy", via IModels.

IModel just mediates between between M and VC. Basically you don't have to 
tweak your Model M so it fits into VC. Probably IModel should be renamed into 
IModelAdapterForPresentationLayer but that much typing would really not help 
anybody.

> Maybe it's just my mistake, but maybe it is also a design issue in
> wicket. Don't know yet.
> 
> Nevertheless, I am trying out a new approach where model and wicket
> are more strictly decoupled: wicket will only render what is managed
> in a non-visual model that has a some sort of "facade" representation
> which can be iterated and rendered.
> 
> So it will be:
> 
> Wicket (View) <-> Facade <-> (Model, Controller)

Wicket (View) <-> Controller -> Facade (using interface IModel) + direct model 
access -> Model (Data)

> Until now I have been wronlgy assuming that wicket can manage the
> lifecycle of Model, View, Controller, but it truly becomes a mess with
> serialization issues and complex logic.

By putting your stuff into WebApplication, WebSession and Request you have the 
typical life cycles of an web application. Putting stuff into pages and 
transferring them to other pages by reference can even give you 
conversation-style scope. Also you can use stuff like 'Weld' where Igor wrote a 
nice article about integration into Wicket. So what exactly is the problem?

If you don't like serialization you basically use something like 
LoadableDetachableModel. Serialization is needed to persist state across 
request over a stateless protocol like HTTP. It's not there to bully our users 
:-)

If you can't serialize you need to restore state on your own using for example 
LoadableDetachableModel.

> 
> My 2cents ;)
> 

4 cent now :-)

If you need help you are always welcome to ask!

Best regards
Peter

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


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



Re: Caching Imagages, CSS, JS in Wicket 1.5.3

2011-11-30 Thread Peter Ertl
the effects of the caching strategy can been for example on package resources 
(e.g. javascript, css, images) …

e.g. start wicket-examples and load the 

  "pub - Localization"

page (the page with the different beers :-)

From looking at the html source you see url's like this:



part of the url is the fingerprint which is provided by the deployment caching 
strategy (= MessageDigestResourceVersion) since the sample runs with config = 
deployment.

the code that sets the strategies can been seen in the method

   org.apache.wicket.settings.def.ResourceSettings#getCachingStrategy()


you also see in the sample that the beer image, which is an 
org.apache.wicket.markup.html.image.Image works with different locales. Just 
switch the country and see that the fingerprints changes for the same resource 
url with different locale qualifiers in the query string.

If you want to implement own resource types that should use the caching 
strategy they should implement 
org.apache.wicket.request.resource.caching.IStaticCacheableResource (read the 
javadoc)

also you should construct urls using wicket's urlFor(…) so the caching strategy 
gets applied to the url.

if you just want to use wicket's default resource types (package resources, 
etc.) you don't have to do anything since caching should work transparently.

Cheers
Peter


Am 30.11.2011 um 14:21 schrieb chris.schaefer:

> yes we also tested with the default strategy, it does not change anything.
> and 
> yes we reviews the link about caching already.
> 
> no we have not found any working example for wicket 1.5. and caching, but
> reviewed most of the samples and git sources i think. which example would be
> the working one ? 
> 
> thanks.
> chris
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Caching-Imagages-CSS-JS-in-Wicket-1-5-3-tp4121068p4122947.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 



Re: Caching Imagages, CSS, JS in Wicket 1.5.3

2011-11-30 Thread Peter Ertl
> 
> and we have set: /getResourceSettings().setCachingStrategy(strat); /during
> application init.
> 

You don't have to. There's a default strategy during development and deployment 
that should work in most cases.

Basically you have "wicket-examples" which are part of the wicket distribution 
and provide sample of working caching.

here's a little more general information on caching in 1.5: 
https://cwiki.apache.org/WICKET/caching-in-wicket-15.html

Cheers
Peter

Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread Peter Ertl
Nice post, Eric!

Wicket people are a humorous folk and always appreciate good entertainment :-)

Am 17.11.2011 um 22:02 schrieb anant.a...@gmail.com:

> First ofc all I do not see any need to convince you you can take it or leave 
> it. 1 there is an awesome set of examples if you search for wicket examples, 
> also there are a lot of other extensions or plug ins in wicket extensions , 
> wicket stuff, wi query j query that support all ajax functionality. This 
> forum as you noticed is great to get place to get answers. As far as not 
> having as extensive of documentation wicket is relatively newer so obviously 
> it will take a bit.
> --Original Message--
> From: geraldkw
> To: users@wicket.apache.org
> ReplyTo: users@wicket.apache.org
> Subject: Re: Apache Wicket is a Flawed Framework
> Sent: Nov 17, 2011 12:05 PM
> 
> "This is not an april fool's day, it is just an opinion of an inexperienced
> developer. "
> 
> This illustrates one of the traditional logical fallacies. If you can't
> effectively attack the argument, attack the speaker.
> 
> My biggest problem with Wicket is that I haven't found any documentation on
> the web that really lets me get a solid grasp on the key concepts. I read a
> lot of poorly written "documentation", weak examples and forum posts dealing
> with something that is only vaguely related to my goals, maybe learn a
> fragment of useful info, and then suffer while trying to apply it.
> 
> I haven't looked a Wicket in Action or other Wicket Books, but I have not
> heard good things. Also, this is the Internet Age and this is web
> programming. I have no problem finding documentation on other web
> programming languages/frameworks like I do with Wicket. 
> 
> If I am wrong, point me to some solid learning materials, and you stand a
> chance of changing my mind.
> 
> geraldkw
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081206.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 


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



Re: integrating CDI into Wicket

2011-11-16 Thread Peter Ertl
+1 very nice, igor :-)

Am 16.11.2011 um 17:33 schrieb Igor Vaynberg:

> using @javax.inject.Inject is perfectly fine. the rest (required, dont
> proxy, blah) can be done using qualifier annotations
> 
> @javax.inject.Inject @org.apache.wicket.ioc.Dependency(required=true,
> proxy=false)
> 
> -igor
> 
> 
> On Wed, Nov 16, 2011 at 6:36 AM, Peter Ertl  wrote:
> 
>>> - why we don't use jsr330 @javax.inject.Inject since both Spring and
>>> Guice support it. With CDI I think javax.enterprise.inject.Inject is
>> used which is yet another …
>> 
>> I would not try to support @javax.inject.Inject which means using the
>> lowest common denominator of all these injection technologies.
>> 
>> We still could but then it would be the second-best choice...
>> 
>> For instance @javax.inject.Inject does not support optional injection like
>> guice @Inject(optional=true) does. Or @SpringBean(required=true). Or
>> control if we want to create a proxy for the injected bean or not, and so
>> on...
>> 
>> I would favor the usage of one common wicket-specific(!) injection
>> annotation (e.g. @WicketInject ) so we can add options to it which might be
>> implemented differently depending on the framework (guice/spring/cdi).
>> 
>> So swapping one technologie for another will not affect the code of your
>> wicket application (except the initialization part).
>> 
>> my 2%
>> 
>> Cheers
>> Peter
>> 
>> Am 16.11.2011 um 10:20 schrieb Martin Grigorov:
>> 
>>> speaking of moving it to Apache..
>>> 
>>> currently we have some inconsistencies between Spring and Guice
>>> integrations and users ask from time to time :
>>> - why we don't use jsr330 @javax.inject.Inject since both Spring and
>>> Guice support it. With CDI I think javax.enterprise.inject.Inject is
>>> used which is yet another ...
>>> - is it possible to not proxy the injected object (we have a ticket
>>> with patch for Spring for that but not for Guice)
>>> 
>>> now with CDI I see more:
>>> - why Injector.get().inject(me) doesn't work ?
>>> --- because it needs BeanManager, but since it is reachable from
>>> ServletContext then it should be OK
>>> --- because it needs the class - OK, use me.getClass() for that
>>> - why Spring/Guice doesn't support @PostConstruct ?
>>> 
>>> So my question is: should we try to make them consistent with each
>>> other or we should provide minimal integration and give the user the
>>> possibility to use the full power of his favorite DI framework ?
>>> 
>>> On Wed, Nov 16, 2011 at 10:52 AM, Igor Vaynberg 
>> wrote:
>>>> sure
>>>> 
>>>> -igor
>>>> 
>>>> On Wed, Nov 16, 2011 at 12:49 AM, Martijn Dashorst <
>>>> martijn.dasho...@gmail.com> wrote:
>>>> 
>>>>> On Tue, Nov 15, 2011 at 7:00 PM, Igor Vaynberg <
>> igor.vaynb...@gmail.com>
>>>>> wrote:
>>>>>> if you want to learn how to use CDI with Wicket i just wrote a short
>> blog
>>>>>> about it:
>>>>>> 
>>>>>> https://www.42lines.net/2011/11/15/integrating-cdi-into-wicket/
>>>>> 
>>>>> Can we use it for the documentation of the CDI project (when we
>>>>> migrate it to apache)?
>>>>> 
>>>>> Martijn
>>>>> 
>>>>> --
>>>>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>>>> 
>>>>> -
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: integrating CDI into Wicket

2011-11-16 Thread Peter Ertl
> - why we don't use jsr330 @javax.inject.Inject since both Spring and
> Guice support it. With CDI I think javax.enterprise.inject.Inject is used 
> which is yet another …

I would not try to support @javax.inject.Inject which means using the lowest 
common denominator of all these injection technologies.

We still could but then it would be the second-best choice...

For instance @javax.inject.Inject does not support optional injection like 
guice @Inject(optional=true) does. Or @SpringBean(required=true). Or control if 
we want to create a proxy for the injected bean or not, and so on...

I would favor the usage of one common wicket-specific(!) injection annotation 
(e.g. @WicketInject ) so we can add options to it which might be implemented 
differently depending on the framework (guice/spring/cdi).

So swapping one technologie for another will not affect the code of your wicket 
application (except the initialization part).

my 2%

Cheers
Peter

Am 16.11.2011 um 10:20 schrieb Martin Grigorov:

> speaking of moving it to Apache..
> 
> currently we have some inconsistencies between Spring and Guice
> integrations and users ask from time to time :
> - why we don't use jsr330 @javax.inject.Inject since both Spring and
> Guice support it. With CDI I think javax.enterprise.inject.Inject is
> used which is yet another ...
> - is it possible to not proxy the injected object (we have a ticket
> with patch for Spring for that but not for Guice)
> 
> now with CDI I see more:
> - why Injector.get().inject(me) doesn't work ?
> --- because it needs BeanManager, but since it is reachable from
> ServletContext then it should be OK
> --- because it needs the class - OK, use me.getClass() for that
> - why Spring/Guice doesn't support @PostConstruct ?
> 
> So my question is: should we try to make them consistent with each
> other or we should provide minimal integration and give the user the
> possibility to use the full power of his favorite DI framework ?
> 
> On Wed, Nov 16, 2011 at 10:52 AM, Igor Vaynberg  
> wrote:
>> sure
>> 
>> -igor
>> 
>> On Wed, Nov 16, 2011 at 12:49 AM, Martijn Dashorst <
>> martijn.dasho...@gmail.com> wrote:
>> 
>>> On Tue, Nov 15, 2011 at 7:00 PM, Igor Vaynberg 
>>> wrote:
 if you want to learn how to use CDI with Wicket i just wrote a short blog
 about it:
 
 https://www.42lines.net/2011/11/15/integrating-cdi-into-wicket/
>>> 
>>> Can we use it for the documentation of the CDI project (when we
>>> migrate it to apache)?
>>> 
>>> Martijn
>>> 
>>> --
>>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: An extensive RIA technology comparison matrix including Wicket

2011-10-26 Thread Peter Ertl
the fact that the so called "comparison" is hosted at

  vaadin.com

reduces the amount of usefulness significantly for me…

:-)

Am 26.10.2011 um 20:02 schrieb shetc:

> https://vaadin.com/comparison



Re: how to get HttpServletRequest in wicket 1.5

2011-09-14 Thread Peter Ertl
@Martin:

yeah, switching from protected to public should at most yield a warning in an 
overloaded class. Igor didn't like it. Maybe my English confused him and he 
thought about going from public to protected?!

Would be great if we could change this in 1.5.

What you think?



Am 14.09.2011 um 13:17 schrieb Martin Grigorov:

> On Wed, Sep 14, 2011 at 2:07 PM, Peter Ertl  wrote:
>> 
>> Am 14.09.2011 um 09:32 schrieb nhsoft.yhw:
>> 
>>> inputStream = packageResource.getCacheableResourceStream().getInputStream();
>> 
>> I think this needs some clarification...
>> 
>> PackageResource has these methods for getting a stream:
>> 
>>  (1)  protected IResourceStream getResourceStream()
>> 
>> and
>> 
>>  (2) public IResourceStream getCacheableResourceStream()
>> 
>> the intention is:
>> 
>> -  (1) locates the default resource without taking any client preferences 
>> into account.
>> 
>> -  (2) is there to get a client-specific resoure stream that is supposed to 
>> be immutable for the lifetime of the application and should be cached.
>> 
>> the sooner (1) locates the resource stream based on
>> 
>> - anchor class
>> - name
>> - locale
>> - style
>> - variation
>> 
>> as specified in the constructor(!) of PackageResource. So for example when 
>> using CssResourceReference (which is a descendant of 
>> PackageResourceReference) like that in your page:
>> 
>>  private static final PackageResourceReference CSS = new 
>> CssResourceReference(MyPage.class, "mycss", Locale.ENGLISH, "style1", 
>> "variation1");
>> 
>> these parameters will be applied to PackageResource when resolving the 
>> reference and yield:
>> 
>> - anchor class = MyPage.class
>> - name = "mycss"
>> - locale = Locale.ENGLISH
>> - style = "style1"
>> - variation = "variation1"
>> 
>> and getResourceStream (1) will locate the resource based on the above 
>> criteria.
>> 
>> In contrary getCacheableResourceStream (2) will override the values for 
>> locale and style with the values of the current session.
>> 
>> - anchor class = MyPage.class
>> - name = "mycss"
>> - Session.getLocale() if not empty, otherwise Locale.ENGLISH
>> - Session.getStyle() if not empty, otherwise "style1"
>> - variation = "variation1"
>> 
>> So (1) returns the default stream and (2) returns the stream fitting the 
>> client's preferences.
>> 
>> Unfortunately I realized it too late that (1) which was 'public' in 1.4 is 
>> now 'protected' in 1.5. It's too late to change this without breaking the 
>> API. This can change in 1.6 to 'public' again unless things change 
>> completely (don't think so :-)
> I think 'protected' -> 'public' is not a problem.
> The opposite ('public' -> 'protected') is not allowed in 1.5.x.
>> 
>> So In case you need to access (1) but miss the 'public' I can suggest the 
>> following workaround / kludge.
>> 
>> public class MyPackageResource extends PackageResource
>> {
>>public MyPackageResource(Class scope, String name, Locale locale, 
>> String style,
>>String variation)
>>{
>>super(scope, name, locale, style, variation);
>>}
>> 
>>// change access to public here
>>public IResourceStream getResourceStream()
>>{
>>return super.getResourceStream();
>>}
>> }
>> 
>> If you only need to open a stream of a package located file use this instead 
>> - no need for PackageResource in that case at all:
>> 
>>  InputStream is = MyPage.class.getResourceAsStream("mycss.css")
>> 
>> 
>> Cheers
>> Peter
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: how to get HttpServletRequest in wicket 1.5

2011-09-14 Thread Peter Ertl

Am 14.09.2011 um 09:32 schrieb nhsoft.yhw:

> inputStream = packageResource.getCacheableResourceStream().getInputStream();

I think this needs some clarification...

PackageResource has these methods for getting a stream:

 (1)  protected IResourceStream getResourceStream()

and 

 (2) public IResourceStream getCacheableResourceStream()

the intention is:

-  (1) locates the default resource without taking any client preferences into 
account.

-  (2) is there to get a client-specific resoure stream that is supposed to be 
immutable for the lifetime of the application and should be cached.

the sooner (1) locates the resource stream based on

- anchor class
- name
- locale
- style
- variation

as specified in the constructor(!) of PackageResource. So for example when 
using CssResourceReference (which is a descendant of PackageResourceReference) 
like that in your page:

  private static final PackageResourceReference CSS = new 
CssResourceReference(MyPage.class, "mycss", Locale.ENGLISH, "style1", 
"variation1");

these parameters will be applied to PackageResource when resolving the 
reference and yield:

- anchor class = MyPage.class
- name = "mycss"
- locale = Locale.ENGLISH
- style = "style1"
- variation = "variation1"

and getResourceStream (1) will locate the resource based on the above criteria.

In contrary getCacheableResourceStream (2) will override the values for locale 
and style with the values of the current session.

- anchor class = MyPage.class
- name = "mycss"
- Session.getLocale() if not empty, otherwise Locale.ENGLISH
- Session.getStyle() if not empty, otherwise "style1"
- variation = "variation1"

So (1) returns the default stream and (2) returns the stream fitting the 
client's preferences.

Unfortunately I realized it too late that (1) which was 'public' in 1.4 is now 
'protected' in 1.5. It's too late to change this without breaking the API. This 
can change in 1.6 to 'public' again unless things change completely (don't 
think so :-)

So In case you need to access (1) but miss the 'public' I can suggest the 
following workaround / kludge.

public class MyPackageResource extends PackageResource
{
public MyPackageResource(Class scope, String name, Locale locale, 
String style,
String variation)
{
super(scope, name, locale, style, variation);
}

// change access to public here
public IResourceStream getResourceStream()
{
return super.getResourceStream();
}
}

If you only need to open a stream of a package located file use this instead - 
no need for PackageResource in that case at all:

  InputStream is = MyPage.class.getResourceAsStream("mycss.css")


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



Re: Sorting Feedback Messages

2011-08-24 Thread Peter Ertl
here's the related ticket:

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


Am 25.08.2011 um 00:47 schrieb Peter Ertl:

> igor, you mean the sorting criteria or supporting java.io.Serializable for 
> info(), warn(), error(), success() ?
> 
> 1.5 accepts Serializable for these methods already...
> 
> So one more nice feature when you upgrade to 1.5 :-)
> 
> Am 25.08.2011 um 00:31 schrieb Igor Vaynberg:
> 
>> there is a long standing issue in jira to address this. something to
>> queue for 1.6
>> 
>> -igor
>> 
>> 
>> On Wed, Aug 24, 2011 at 3:24 PM, Peter Ertl  wrote:
>>> seems like this works only for error(Serializable)
>>> 
>>> the required methods for info() and warn() accepting serializable are 
>>> missing
>>> 
>>> changing these in 1.4 would mean an api break
>>> 
>>> however you can add any kind of message easily with
>>> 
>>>  Session.get().getFeedbackMessages().add(new FeedbackMessage(reporter, 
>>> message, level))
>>> 
>>> ...
>>> 
>>> Am 25.08.2011 um 00:18 schrieb Peter Ertl:
>>> 
>>>> actually the message property for FeedbackMessage is of type 
>>>> java.io.Serializable, not java.lang.String. So you can can add your own 
>>>> custom error message class instead of a plain string.
>>>> 
>>>> e.g. inside your page
>>>> 
>>>> error(new MessageWithSortCriteria("foobar", 4711))
>>>> 
>>>> with
>>>> 
>>>> public class MessageWithSortCriteria implements Serializable
>>>> {
>>>> public MessageWithSortCriteria(String message, int sortOrder)
>>>> {
>>>> }
>>>> 
>>>> // ...
>>>> }
>>>> 
>>>> this useless sample is just to give you an impression :-)
>>>> 
>>>> then use a message sorter as Martin said that uses the attribute if 
>>>> present...
>>>> 
>>>> only thing you have to care about is that toString() is overridden and 
>>>> returns a user-readable string for rendering messages to the screen.
>>>> 
>>>> Am 23.08.2011 um 20:39 schrieb Christian Huber:
>>>> 
>>>>> Yes, as i wrote this would be the way to impose a custom sorting on 
>>>>> messages but at the moment the FilterMessage class does not provide 
>>>>> dedicated fields that could be used for a sorting metric. So i was 
>>>>> wondering if there are plans to provide such a thing or if we will be 
>>>>> bound to incooperate this kind of information into the messages 
>>>>> themselves.
>>>>> 
>>>>> The Sanity Resort <http://sanityresort.blogspot.com/>
>>>>> 
>>>>> Am 23.08.2011 19:21, schrieb Martin Grigorov:
>>>>>> I think 
>>>>>> org.apache.wicket.markup.html.panel.FeedbackPanel.setSortingComparator(Comparator)
>>>>>> is for that
>>>>>> 
>>>>>> On Tue, Aug 23, 2011 at 8:10 PM, Christian Huber  
>>>>>> wrote:
>>>>>>> Hi,
>>>>>>> 
>>>>>>> I was wondering if there is a way to have feedback messages show up in
>>>>>>> certain order. Like, when you have multiple messages for the user you 
>>>>>>> might
>>>>>>> want to have the most general one (e.g. success/failure) at the top and
>>>>>>> other detail messages shown below.
>>>>>>> 
>>>>>>> From what I have seen so far it looks like this is not possible (at 
>>>>>>> least
>>>>>>> not with 1.4.18)
>>>>>>> 
>>>>>>> As a default messages are rendered in the order they have been 
>>>>>>> provided, so
>>>>>>> usually you can just collect the messages you want to display and then 
>>>>>>> add
>>>>>>> them at the end of your request in the desired order. But there can be
>>>>>>> circumstances where this is not feasible or at least pretty anoying.
>>>>>>> 
>>>>>>> I have seen that a FeedbackPanel can be given a comparator to sort the
>>>>>>> messages but the feedback messages only provide a level field to 
>>>>>>> distinguish
>>>>>>>

Re: Sorting Feedback Messages

2011-08-24 Thread Peter Ertl
igor, you mean the sorting criteria or supporting java.io.Serializable for 
info(), warn(), error(), success() ?

1.5 accepts Serializable for these methods already...

So one more nice feature when you upgrade to 1.5 :-)

Am 25.08.2011 um 00:31 schrieb Igor Vaynberg:

> there is a long standing issue in jira to address this. something to
> queue for 1.6
> 
> -igor
> 
> 
> On Wed, Aug 24, 2011 at 3:24 PM, Peter Ertl  wrote:
>> seems like this works only for error(Serializable)
>> 
>> the required methods for info() and warn() accepting serializable are missing
>> 
>> changing these in 1.4 would mean an api break
>> 
>> however you can add any kind of message easily with
>> 
>>   Session.get().getFeedbackMessages().add(new FeedbackMessage(reporter, 
>> message, level))
>> 
>> ...
>> 
>> Am 25.08.2011 um 00:18 schrieb Peter Ertl:
>> 
>>> actually the message property for FeedbackMessage is of type 
>>> java.io.Serializable, not java.lang.String. So you can can add your own 
>>> custom error message class instead of a plain string.
>>> 
>>> e.g. inside your page
>>> 
>>>  error(new MessageWithSortCriteria("foobar", 4711))
>>> 
>>> with
>>> 
>>> public class MessageWithSortCriteria implements Serializable
>>> {
>>>  public MessageWithSortCriteria(String message, int sortOrder)
>>>  {
>>>  }
>>> 
>>> // ...
>>> }
>>> 
>>> this useless sample is just to give you an impression :-)
>>> 
>>> then use a message sorter as Martin said that uses the attribute if 
>>> present...
>>> 
>>> only thing you have to care about is that toString() is overridden and 
>>> returns a user-readable string for rendering messages to the screen.
>>> 
>>> Am 23.08.2011 um 20:39 schrieb Christian Huber:
>>> 
>>>> Yes, as i wrote this would be the way to impose a custom sorting on 
>>>> messages but at the moment the FilterMessage class does not provide 
>>>> dedicated fields that could be used for a sorting metric. So i was 
>>>> wondering if there are plans to provide such a thing or if we will be 
>>>> bound to incooperate this kind of information into the messages themselves.
>>>> 
>>>> The Sanity Resort <http://sanityresort.blogspot.com/>
>>>> 
>>>> Am 23.08.2011 19:21, schrieb Martin Grigorov:
>>>>> I think 
>>>>> org.apache.wicket.markup.html.panel.FeedbackPanel.setSortingComparator(Comparator)
>>>>> is for that
>>>>> 
>>>>> On Tue, Aug 23, 2011 at 8:10 PM, Christian Huber  
>>>>> wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> I was wondering if there is a way to have feedback messages show up in
>>>>>> certain order. Like, when you have multiple messages for the user you 
>>>>>> might
>>>>>> want to have the most general one (e.g. success/failure) at the top and
>>>>>> other detail messages shown below.
>>>>>> 
>>>>>> From what I have seen so far it looks like this is not possible (at least
>>>>>> not with 1.4.18)
>>>>>> 
>>>>>> As a default messages are rendered in the order they have been provided, 
>>>>>> so
>>>>>> usually you can just collect the messages you want to display and then 
>>>>>> add
>>>>>> them at the end of your request in the desired order. But there can be
>>>>>> circumstances where this is not feasible or at least pretty anoying.
>>>>>> 
>>>>>> I have seen that a FeedbackPanel can be given a comparator to sort the
>>>>>> messages but the feedback messages only provide a level field to 
>>>>>> distinguish
>>>>>> between info, debug, errror etc. To impose a proper priority order one 
>>>>>> would
>>>>>> need a metric orthogonal to message levels preferrably represented by a
>>>>>> primitive (double would give the biggest freedom here).
>>>>>> 
>>>>>> The Component class could be extended to provide additional methods like
>>>>>> Component#info(String message, double priority) and messages which do not
>>>>>> have a priority get assigned a default value specified in the Application
>>>>>> class (could be 0 in the sta

Re: Sorting Feedback Messages

2011-08-24 Thread Peter Ertl
seems like this works only for error(Serializable)

the required methods for info() and warn() accepting serializable are missing

changing these in 1.4 would mean an api break

however you can add any kind of message easily with

   Session.get().getFeedbackMessages().add(new FeedbackMessage(reporter, 
message, level))

...

Am 25.08.2011 um 00:18 schrieb Peter Ertl:

> actually the message property for FeedbackMessage is of type 
> java.io.Serializable, not java.lang.String. So you can can add your own 
> custom error message class instead of a plain string.
> 
> e.g. inside your page
> 
>  error(new MessageWithSortCriteria("foobar", 4711))
> 
> with 
> 
> public class MessageWithSortCriteria implements Serializable
> {
>  public MessageWithSortCriteria(String message, int sortOrder)
>  {
>  }
> 
> // ...
> }
> 
> this useless sample is just to give you an impression :-)
> 
> then use a message sorter as Martin said that uses the attribute if present...
> 
> only thing you have to care about is that toString() is overridden and 
> returns a user-readable string for rendering messages to the screen.
> 
> Am 23.08.2011 um 20:39 schrieb Christian Huber:
> 
>> Yes, as i wrote this would be the way to impose a custom sorting on messages 
>> but at the moment the FilterMessage class does not provide dedicated fields 
>> that could be used for a sorting metric. So i was wondering if there are 
>> plans to provide such a thing or if we will be bound to incooperate this 
>> kind of information into the messages themselves.
>> 
>> The Sanity Resort <http://sanityresort.blogspot.com/>
>> 
>> Am 23.08.2011 19:21, schrieb Martin Grigorov:
>>> I think 
>>> org.apache.wicket.markup.html.panel.FeedbackPanel.setSortingComparator(Comparator)
>>> is for that
>>> 
>>> On Tue, Aug 23, 2011 at 8:10 PM, Christian Huber  
>>> wrote:
>>>> Hi,
>>>> 
>>>> I was wondering if there is a way to have feedback messages show up in
>>>> certain order. Like, when you have multiple messages for the user you might
>>>> want to have the most general one (e.g. success/failure) at the top and
>>>> other detail messages shown below.
>>>> 
>>>> From what I have seen so far it looks like this is not possible (at least
>>>> not with 1.4.18)
>>>> 
>>>> As a default messages are rendered in the order they have been provided, so
>>>> usually you can just collect the messages you want to display and then add
>>>> them at the end of your request in the desired order. But there can be
>>>> circumstances where this is not feasible or at least pretty anoying.
>>>> 
>>>> I have seen that a FeedbackPanel can be given a comparator to sort the
>>>> messages but the feedback messages only provide a level field to 
>>>> distinguish
>>>> between info, debug, errror etc. To impose a proper priority order one 
>>>> would
>>>> need a metric orthogonal to message levels preferrably represented by a
>>>> primitive (double would give the biggest freedom here).
>>>> 
>>>> The Component class could be extended to provide additional methods like
>>>> Component#info(String message, double priority) and messages which do not
>>>> have a priority get assigned a default value specified in the Application
>>>> class (could be 0 in the standard implementation).
>>>> 
>>>> Would this be a useful/sensible addition? Is such a thing planned for 
>>>> future
>>>> releases or maybe already available and I just did not see it?
>>>> 
>>>> One workaround/hack to implement this with the current version could be to
>>>> prefix all messages with a numeric string and use a Comparator to parse 
>>>> this
>>>> string and sort accordingly.
>>>> 
>>>> Cheers, Chris
>>>> 
>>>> --
>>>> The Sanity Resort<http://sanityresort.blogspot.com/>
>>>> 
>>> 
>>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Sorting Feedback Messages

2011-08-24 Thread Peter Ertl
actually the message property for FeedbackMessage is of type 
java.io.Serializable, not java.lang.String. So you can can add your own custom 
error message class instead of a plain string.

e.g. inside your page

  error(new MessageWithSortCriteria("foobar", 4711))

with 

public class MessageWithSortCriteria implements Serializable
{
  public MessageWithSortCriteria(String message, int sortOrder)
  {
  }

 // ...
}

this useless sample is just to give you an impression :-)

then use a message sorter as Martin said that uses the attribute if present...

only thing you have to care about is that toString() is overridden and returns 
a user-readable string for rendering messages to the screen.

Am 23.08.2011 um 20:39 schrieb Christian Huber:

> Yes, as i wrote this would be the way to impose a custom sorting on messages 
> but at the moment the FilterMessage class does not provide dedicated fields 
> that could be used for a sorting metric. So i was wondering if there are 
> plans to provide such a thing or if we will be bound to incooperate this kind 
> of information into the messages themselves.
> 
> The Sanity Resort 
> 
> Am 23.08.2011 19:21, schrieb Martin Grigorov:
>> I think 
>> org.apache.wicket.markup.html.panel.FeedbackPanel.setSortingComparator(Comparator)
>> is for that
>> 
>> On Tue, Aug 23, 2011 at 8:10 PM, Christian Huber  
>> wrote:
>>> Hi,
>>> 
>>> I was wondering if there is a way to have feedback messages show up in
>>> certain order. Like, when you have multiple messages for the user you might
>>> want to have the most general one (e.g. success/failure) at the top and
>>> other detail messages shown below.
>>> 
>>> From what I have seen so far it looks like this is not possible (at least
>>> not with 1.4.18)
>>> 
>>> As a default messages are rendered in the order they have been provided, so
>>> usually you can just collect the messages you want to display and then add
>>> them at the end of your request in the desired order. But there can be
>>> circumstances where this is not feasible or at least pretty anoying.
>>> 
>>> I have seen that a FeedbackPanel can be given a comparator to sort the
>>> messages but the feedback messages only provide a level field to distinguish
>>> between info, debug, errror etc. To impose a proper priority order one would
>>> need a metric orthogonal to message levels preferrably represented by a
>>> primitive (double would give the biggest freedom here).
>>> 
>>> The Component class could be extended to provide additional methods like
>>> Component#info(String message, double priority) and messages which do not
>>> have a priority get assigned a default value specified in the Application
>>> class (could be 0 in the standard implementation).
>>> 
>>> Would this be a useful/sensible addition? Is such a thing planned for future
>>> releases or maybe already available and I just did not see it?
>>> 
>>> One workaround/hack to implement this with the current version could be to
>>> prefix all messages with a numeric string and use a Comparator to parse this
>>> string and sort accordingly.
>>> 
>>> Cheers, Chris
>>> 
>>> --
>>> The Sanity Resort
>>> 
>> 
>> 


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



Re: CSS, JS resource file handle issues?

2011-08-08 Thread Peter Ertl
Well, I _did_ follow the development ;-)

Just made me wonder just from looking at 'open...' that there's no close.

Maybe we need to do this:


// otherwise open the url and proceed
URLConnection connection = url.openConnection();
// ---
connection.setDoInput(false);
// ---

final long milliseconds;

try
{
if (connection instanceof JarURLConnection)
{
JarURLConnection jarUrlConnection = 
(JarURLConnection)connection;
URL jarFileUrl = 
jarUrlConnection.getJarFileURL();
URLConnection jarFileConnection = 
jarFileUrl.openConnection();
// ---
jarFileConnection.setDoInput(false);
// ---
// get timestamp from JAR
milliseconds = 
jarFileConnection.getLastModified();
}
else
{
// get timestamp from URL
milliseconds = connection.getLastModified();
}



Am 08.08.2011 um 11:11 schrieb Martin Grigorov:

> Please try to follow the development.
> The first close was removed with
> https://issues.apache.org/jira/browse/WICKET-3895 which will be
> released with RC6, so this is not the problem here. In RC5.1 there
> were two calls of close() and this caused some problems in WebLogic
> container. Calling second close on
> weblogic.utils.zip.SafeZipFileInputStream causes NPE.
> 
> Maybe current trunk is not correct but here is how I see it: a
> Connection is opened for the URL, then a check is made whether this
> Connection is JarURLConnection and then #openConnection is called in
> the jar's URL. At the end only the first connection is closed which
> automatically should close the inner connection.
> 
> If this is not correct then we need to close the inner (jar url's)
> connection quietly. No need to dump exceptions while trying to close
> the connections used only to get the last mtime.
> 
> On Mon, Aug 8, 2011 at 11:56 AM, Peter Ertl  wrote:
>> Well, there is no close statement for URLConnection!
>> 
>> Just looking at a method named 'open' makes me automatically search for the 
>> equivalent 'close' statement.
>> 
>> Am 07.08.2011 um 20:03 schrieb Peter Ertl:
>> 
>>> in Connection#getLastModified(String url), line 69 there's an
>>> 
>>>   URLConnection jarFileConnection = 
>>> jarFileUrl.openConnection();
>>> 
>>> without a close() statement...
>>> 
>>> could that be the reason?
>>> 
>>> Am 06.08.2011 um 00:21 schrieb rush66:
>>> 
>>>> As per your suggestion I grabbed the project from SVN and compiled the
>>>> snapshot. Sadly there was no change in my results.  Is there a bug that is
>>>> already filed for this?
>>>> 
>>>> 
>>>> 
>>>> --
>>>> View this message in context: 
>>>> http://apache-wicket.1842946.n4.nabble.com/CSS-JS-resource-file-handle-issues-tp3701938p3722413.html
>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>> 
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>> 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: CSS, JS resource file handle issues?

2011-08-08 Thread Peter Ertl
Well, there is no close statement for URLConnection!

Just looking at a method named 'open' makes me automatically search for the 
equivalent 'close' statement.

Am 07.08.2011 um 20:03 schrieb Peter Ertl:

> in Connection#getLastModified(String url), line 69 there's an
> 
>   URLConnection jarFileConnection = 
> jarFileUrl.openConnection();
> 
> without a close() statement...
> 
> could that be the reason?
> 
> Am 06.08.2011 um 00:21 schrieb rush66:
> 
>> As per your suggestion I grabbed the project from SVN and compiled the
>> snapshot. Sadly there was no change in my results.  Is there a bug that is
>> already filed for this?   
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/CSS-JS-resource-file-handle-issues-tp3701938p3722413.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: CSS, JS resource file handle issues?

2011-08-07 Thread Peter Ertl
in Connection#getLastModified(String url), line 69 there's an

URLConnection jarFileConnection = 
jarFileUrl.openConnection();

without a close() statement...

could that be the reason?

Am 06.08.2011 um 00:21 schrieb rush66:

> As per your suggestion I grabbed the project from SVN and compiled the
> snapshot. Sadly there was no change in my results.  Is there a bug that is
> already filed for this?   
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/CSS-JS-resource-file-handle-issues-tp3701938p3722413.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Static Files (CSS, JPG) not Found by Wicket in HTML

2011-07-27 Thread Peter Ertl
> Actually you just have to use "css/styles.css" and Wicket will
> "relativize" it for you.
> There is a special IMarkupFilter for that.

but only if wrap it inside  

this will not work for resources in src/main/webapp but only for package 
resources

without  the markup will just be rendered as-is and wicket will 
not even touch it. this is the standard behavior for static html with hrefs.

Am 27.07.2011 um 15:40 schrieb Martin Grigorov:

> On Wed, Jul 27, 2011 at 3:54 PM, Peter Ertl  wrote:
>> if your login page is mounted to path '/login/authenticate' and the 
>> application is deployed to web application context '/myapp' your page will 
>> be available at
>> 
>> /myapp/login/authenticate
>> 
>> and the css in src/main/webapp/styles.css must be referenced from your page 
>> via
>> 
>> 1) ../../css/styles.css
>> 
>> or
>> 
>> 2) /myapp/css/styles.css
>> 
>> 1) is bad since the IDE is not capable of tracking the resources referenced 
>> from your markup. also changing your page mount can easily break your page.
> Actually you just have to use "css/styles.css" and Wicket will
> "relativize" it for you.
> There is a special IMarkupFilter for that.
>> 2) is bad since changing the deployment context name will break your app. 
>> also you need to know the deploment context name.
>> 
>> when using resources in packages all these issues will not affect you at all.
>> 
>> the 'magic' you talk about is probably not using . In that case 
>> the link is unchanged (wicket does not even touch that link) and will work 
>> when you mount your pages to urls being not deeper than one level
>> 
>> e.g. /login, /logout, /foobar
>> 
>> it will not work with nested urls or url's that contain indexed parameters
>> 
>> e.g. /user/id/123
>> 
>> Am 27.07.2011 um 14:31 schrieb Peter Karich:
>> 
>>> Am 27.07.2011 14:21, schrieb Peter Ertl:
>>>> You can put your resources in src/main/webapp but I would not recommend to 
>>>> do so (they will work by using an absolute path with the correct web app 
>>>> context) but it's quite ugly *imho*
>>> 
>>> no, you can just reference them via css/style.css eg. if you have
>>> src/main/webapp/css
>>> and wicket will do the magic for you...
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Static Files (CSS, JPG) not Found by Wicket in HTML

2011-07-27 Thread Peter Ertl
I was assuming you use maven

'src/main/java'

and 

'src/main/webapp'

see 
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

If you don't use maven you have to choose the corresponding directory in your 
build / IDE environment...

Am 27.07.2011 um 15:08 schrieb eugenebalt:

> Guys, I tried creating new folders under src/, naming them main/ and then
> webapp/ under main/, with img and css subdirectories, but that didn't work
> either, I don't know why. It was supposed to find it automatically.
> 
> But anyway, I don't want to reorganize my project structure. It's an
> existing NetBeans project and I have dependencies in it, e.g. web.xml.
> 
> So my question, how can I get Wicket to display my static resources
> referenced in HTML based on my *existing* structure, which I described in
> the first post? What is the Java code for that?
> 
> I need to be able to reference img src="[img]" for example.
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Static-Files-CSS-JPG-not-Found-by-Wicket-in-HTML-tp3697146p3698424.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Static Files (CSS, JPG) not Found by Wicket in HTML

2011-07-27 Thread Peter Ertl
put the images in an package and use wicket:link properly ... no need to mount 
at all

Am 27.07.2011 um 14:45 schrieb Dmitriy Ivanov:

> Miroslav, is there way to achive some kind of "whole package mounting"
> without explicit mounting of each image?
> 
> 2011/7/27 Miroslav F. 
> 
>> Use structure:
>> .src
>> .java
>> ..com
>> ...myapp
>> ...[HTML & Java go here]
>> ...img
>> ...css
>> ...somethink else you would like
>> 
>> In img dir put Images.class, in css put Styles.class and so on, for
>> example:
>> package com.myapp.images;
>> public class Images{
>> }
>> 
>> Then in WebApplication.init() do:
>> mountSharedResource("/img/myimage.jpg", new ResourceReference(Images.class,
>> "myimage.jpg").getSharedResourceKey());
>> 
>> and in html file do:
>> 
>> 
>> No need to do something else in html.
>> 
>> Hope this helps.
>> 
>> Miro
>> 
>> 
>> 
>> 
>>> -Original Message-
>>> From: eugenebalt [mailto:eugeneb...@yahoo.com]
>>> Sent: Wednesday, 27. July 2011 00:04
>>> To: users@wicket.apache.org
>>> Subject: Static Files (CSS, JPG) not Found by Wicket in HTML
>>> 
>>> My project structure looks like this:
>>> 
>>> .src
>>> .java
>>> ..com
>>> ...myapp
>>> ...[HTML & Java go here]
>>> 
>>> .web
>>> .img
>>> .css
>>> .WEB-INF
>>> 
>>> 
>>> In my HTML, when I reference "img/image.jpg" or
>>> "css/main.css", these files are not found. I also tried
>>> "/img/image.jpg" and "/css/main.css" and that doesn't work either.
>>> 
>>> Thanks
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/Static-Files-CSS-JP
>> G-not-Found-by-Wicket-in-HTML-tp3697146p3697146.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> -- 
> WBR, Джонсон.


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



Re: Static Files (CSS, JPG) not Found by Wicket in HTML

2011-07-27 Thread Peter Ertl
if your login page is mounted to path '/login/authenticate' and the application 
is deployed to web application context '/myapp' your page will be available at

/myapp/login/authenticate

and the css in src/main/webapp/styles.css must be referenced from your page via

1) ../../css/styles.css

or 

2) /myapp/css/styles.css

1) is bad since the IDE is not capable of tracking the resources referenced 
from your markup. also changing your page mount can easily break your page.
2) is bad since changing the deployment context name will break your app. also 
you need to know the deploment context name.

when using resources in packages all these issues will not affect you at all.

the 'magic' you talk about is probably not using . In that case 
the link is unchanged (wicket does not even touch that link) and will work when 
you mount your pages to urls being not deeper than one level

e.g. /login, /logout, /foobar

it will not work with nested urls or url's that contain indexed parameters

e.g. /user/id/123

Am 27.07.2011 um 14:31 schrieb Peter Karich:

> Am 27.07.2011 14:21, schrieb Peter Ertl:
>> You can put your resources in src/main/webapp but I would not recommend to 
>> do so (they will work by using an absolute path with the correct web app 
>> context) but it's quite ugly *imho*
> 
> no, you can just reference them via css/style.css eg. if you have
> src/main/webapp/css
> and wicket will do the magic for you...
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Static Files (CSS, JPG) not Found by Wicket in HTML

2011-07-27 Thread Peter Ertl
You can put your resources in src/main/webapp but I would not recommend to do 
so (they will work by using an absolute path with the correct web app context) 
but it's quite ugly *imho*

My suggestion is:

Put them somewhere in your package hierarchy below src/main/java where it fits 
best.

Caveat:
When the package is not below in inside the package of the page referring to 
it, e.g. 'com.mycompany.pages.login.LoginPage' refers to 
'com.mycompany.global.css#styles.css' you need to enable parent resources with

IResourceSettings#setParentFolderPlaceholder(...)

(read the javadoc for detailed explanation)

You also you need to wrap your html references with 

e.g.





If you miss to enable parent resources the CSS href will get crippled by the 
browser (sic) and not work at all.

Alternatively you can refer to resources from java using e.g.

  IHeaderResponse#renderCSSReference

in the appropriate places of your code. For that to work you usually need an 
'anchor' class that resides in the same package as the resource to refer to it.

cheers
Peter


Am 27.07.2011 um 12:44 schrieb Miroslav F.:

> Use structure:
> .src
> .java
> ..com
> ...myapp
> ...[HTML & Java go here]
> ...img
> ...css
> ...somethink else you would like
> 
> In img dir put Images.class, in css put Styles.class and so on, for example:
> package com.myapp.images;
> public class Images{
> }
> 
> Then in WebApplication.init() do:
> mountSharedResource("/img/myimage.jpg", new ResourceReference(Images.class,
> "myimage.jpg").getSharedResourceKey());
> 
> and in html file do:
> 
> 
> No need to do something else in html.
> 
> Hope this helps.
> 
> Miro
> 
> 
> 
> 
>> -Original Message-
>> From: eugenebalt [mailto:eugeneb...@yahoo.com] 
>> Sent: Wednesday, 27. July 2011 00:04
>> To: users@wicket.apache.org
>> Subject: Static Files (CSS, JPG) not Found by Wicket in HTML
>> 
>> My project structure looks like this:
>> 
>> .src
>> .java
>> ..com
>> ...myapp
>> ...[HTML & Java go here]
>> 
>> .web
>> .img
>> .css
>> .WEB-INF
>> 
>> 
>> In my HTML, when I reference "img/image.jpg" or 
>> "css/main.css", these files are not found. I also tried 
>> "/img/image.jpg" and "/css/main.css" and that doesn't work either.
>> 
>> Thanks
>> 
>> 
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Static-Files-CSS-JP
> G-not-Found-by-Wicket-in-HTML-tp3697146p3697146.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: How to Catch WebApplication's Destroy()?

2011-07-26 Thread Peter Ertl
1. I would recommend to use a connection pool, e.g. 'bonecp', 'c3p0' or 'dbcp' 
instead of a single connection. Using a single connection that stays connected 
to the db is a bad thing. You usually have to restart your web application when 
the database gets restarted (or goes offline for some time).
2. You can manage the lifetime of your pool using a web application factory, 
too. Use org.apache.wicket.protocol.http.IDestroyableWebApplicationFactory 
instead of org.apache.wicket.protocol.http.IWebApplicationFactory to handle 
destruction of the resource in method 
IDestroyableWebApplicationFactory#destroy().

Am 26.07.2011 um 08:21 schrieb Martin Grigorov:

> org.apache.wicket.Application.onDestroy()
> 
> On Tue, Jul 26, 2011 at 4:34 AM, eugenebalt  wrote:
>> To clarify, this is not per-request, it should be per-application.
>> 
>> I have a static Connection object in my WebApplication, and it's used for
>> all transactions in the app. I construct it initially in the init(), and was
>> just wondering where to close the Connection at the end of the app.
>> 
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/How-to-Catch-WebApplication-s-Destroy-tp3694556p3694614.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: new user registration email verification

2011-06-29 Thread Peter Ertl
Very nicely explained...

In the special case when you need the confirmation link to register for a new 
user account I would additionally recommend the following:

- Let the user enter the initial password for the account when he requests it

- Send the link with the token like Daniel explained

- When processing the confirmation link with the random UUID token, let the 
user re-enter his password on link confirmation page

This will prevent the hijacking of the confirmation link in the mail since it's 
useless without the password. IMHO this will cause the least possible annoyance 
for the user (he needs to set his initial password anyway)


Am 29.06.2011 um 21:05 schrieb Daniel Neugebauer:

> It's like you already said in your first mail. For one of our websites the 
> behaviour is:
> 
> 1) generate some kind of a random, unique token
>   s.th. like UUID.randomUUID().toString()
> 
> 2) register token to user in database
> 
> 3) email link including the token to the user
>   (use a readily available email library)
> 
> For your application to process the link, the link should end in a 
> bookmarkable page with a short URL (so it doesn't take too much space in the 
> email). If you append the token like you usually do (depending on the 
> UrlCodingStrategy used), the page can get the token by accessing the 
> PageParameters. If you have multiple types of opt-ins/confirmations (user 
> accounts, newsletters etc.) then you could use one page to process all tokens 
> and let it decide which additional page should be instantiated and redirected 
> to after token verification depending on the token type you saved in your 
> database.
> 
> On our website we check the token for the correct pattern using a regular 
> expression and then get the user's email address/data from the database and 
> let the user confirm his address by re-entering it and continue with an 
> account setup wizard. However, such a double-safety should rarely be 
> necessary. We could as well confirm the account right away (or immediately 
> show/redirect to the wizard instead); once you have the token you know what 
> user is intended to be accessed so you can do whatever you want.
> 
> Also make sure your tokens will time out after a week or so. You may also 
> want to count token requests/validations and block users in case the number 
> gets too high (get the client IP address by accessing the servlet request and 
> record it somewhere). Maybe we are just a bit too cautious but our 
> application hosts quite some data, so it can't be wrong. :)
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Strange problem with DateTextField

2011-06-21 Thread Peter Ertl
Hi Vitor,

I could not reproduce your problem. Try the following things...

- change the boolean in PatternDateConverter to 'false' to not respect the 
client time zone. does this change the faulty behavior?
- what locale are you using in your application? try 'log.info("locale = " + 
Session.get().getLocale())' to see the current value used for date conversion
- does the behavior depend on the browser? try firefox, chrome, ie, etc. to 
check this



Am 21.06.2011 um 23:16 schrieb Vitor Granzinoli Vellozo:

> 
> 
> Wicketers,
> 
> 
> 
> I found a problem with DateTextField, when a date comes like 11/10/2010
> (dd/MM/) to be showed at
> 
> a page, and it shows 10/10/2010, it shows a date decreased. The same
> ocurrs if the date is 12/10/2010.
> 
> 
> 
> It ocurrs with dates near 10/10/2010. I also fixed dates manually and it
> doesn't change, it's very strange
> 
> and I need you help.
> 
> 
> 
> Below, the code:
> 
> 
> 
> DateTextField dateTF = new DateTextField("finalDate", new
> PropertyModel(someObject.getFinalDate(), "finalDate"), new
> PatternDateConverter("dd/MM/", true));
> 
> dateTF.add(new DatePicker());
> 
> add(dateTF);
> 
> 
> 
> 
> 
> Some idea about?
> 
> 
> 
> Thanks a lot
> 
> Vitor
> 
> 
> 


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



Re: Any news on "1.5 - mapping different error pages for specific errors"

2011-06-16 Thread Peter Ertl
Though I would prefer the method Martin suggested there's also the possibility 
of customizing web.xml:

http://docs.codehaus.org/display/JETTY/How+to+Create+Custom+Error+Pages

Am 16.06.2011 um 13:54 schrieb Martin Grigorov:

> See 
> org.apache.wicket.request.cycle.AbstractRequestCycleListener.onException(RequestCycle,
> Exception), org.apache.wicket.Application.getRequestCycleListeners()
> and org.apache.wicket.request.handler.RenderPageRequestHandler
> and 
> https://cwiki.apache.org/confluence/display/WICKET/RequestCycle+in+Wicket+1.5
> 
> 
> On Thu, Jun 16, 2011 at 2:50 PM, nino martinez wael
>  wrote:
>> Sure.. Basically I want to map different runtime exceptions to
>> different pages, preserving the exception for usage in the consumer
>> page of course.
>> 
>> Like explained here:
>> 
>> http://apache-wicket.1842946.n4.nabble.com/1-5-mapping-different-error-pages-for-specific-errors-td3511899.html
>> 
>> 2011/6/16 Jorge Rodrigez :
>>> If you spare a bit of your precious time to explain the problem in more
>>> details then we may have an idea.
>>> 
>>> On Thu, Jun 16, 2011 at 2:33 PM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>> 
 Does anybody have an idea howto implement this?
 
 regards Nino
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Deploiment problem of wicket application with Jboss 5.1

2011-06-15 Thread Peter Ertl
Google Translate tells me:

'Espace insuffisant sur le disque' -> 'Not enough space on disk'

So did you check your free disk space?


Am 15.06.2011 um 15:32 schrieb Thomas Franconville:

> Hi all,
> 
> I am deploying my wicket application as an EAR with maven using JMX 
> deploiment of JBoss.
> When I use the web application, the directory 
> [Jboss_home]/default/tmp/vfs-nested.tmp is growing until saturated the 
> hardrive (several gigabytes !), duplicating all the jar and war in the ear.
> When the disk is saturated, I have this stack
> 
> 2011-06-15 11:06:41,220 INFO  [STDOUT] (ModificationWatcher Task) ERROR - 
> Task   - Unhandled exception thrown by user code in task 
> ModificationWatcher
> java.lang.RuntimeException: Failed to read zip file: 
> org.jboss.virtual.plugins.context.zip.ZipFileWrapper@1d295de - 
> D:\Workspaces\UbiAnt\HemisEAR\target\Hemis.ear
>at 
> org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:628)
>at 
> org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:773)
>at 
> org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:817)
>at 
> org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:191)
>at 
> org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:684)
>at 
> org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:165)
>at 
> org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
>at org.jboss.virtual.VirtualFile.findChild(VirtualFile.java:457)
>at 
> org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.resolveVirtualFile(VirtualFileURLConnection.java:106)
>at 
> org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getVirtualFile(VirtualFileURLConnection.java:118)
>at 
> org.jboss.virtual.plugins.vfs.VirtualFileURLConnection.getInputStream(VirtualFileURLConnection.java:93)
>at org.apache.wicket.util.io.Connections.close(Connections.java:127)
>at 
> org.apache.wicket.util.io.Connections.getLastModified(Connections.java:87)
>at 
> org.apache.wicket.util.resource.UrlResourceStream.lastModifiedTime(UrlResourceStream.java:233)
>at 
> org.apache.wicket.markup.MarkupResourceStream.lastModifiedTime(MarkupResourceStream.java:149)
>at 
> org.apache.wicket.util.watch.ModificationWatcher$1.run(ModificationWatcher.java:153)
>at org.apache.wicket.util.thread.Task$1.run(Task.java:115)
>at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.IOException: Espace insuffisant sur le disque
>at java.io.FileOutputStream.writeBytes(Native Method)
>at java.io.FileOutputStream.write(FileOutputStream.java:260)
>at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
>at org.jboss.virtual.VFSUtils.copyStream(VFSUtils.java:941)
>at org.jboss.virtual.VFSUtils.copyStreamAndClose(VFSUtils.java:901)
>at 
> org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries(ZipEntryContext.java:562)
>at 
> org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:619)
>... 17 more
> 
> My environnement is:
> JBoss 5.1
> Wicket 1.5-RC4.2
> Jdk 1.6
> I am still in development mode.
> When I am working with the war with Jetty, I have no problem.
> 
> Is somebody can explain me what happen and give me any clue to go forward.
> 
> Thanks
> 
> Thomas
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: [Vote] New Wicket Version Numbering

2011-04-02 Thread Peter Ertl
I just released "Hello, World!" v9.0 for the ultimate price 
of just $500. Who is interested?
 
Am 02.04.2011 um 03:11 schrieb Bruno Borges:

> Of course it is the best. It has no software error-prone... :-)
> 
> No GC problems, no heap calculations.
> 
> =)
> 
> Bruno Borges
> www.brunoborges.com.br
> +55 21 76727099
> 
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
> 
> 
> 
> On Fri, Apr 1, 2011 at 9:47 PM, Chris Colman
> wrote:
> 
>> I poon you all with my Atari 7800!
>> 
>> Ok, so it doesn't have a keyboard, let alone a JVM, but the version
>> number is so much bigger - it just has to be the best!
>> 
>>> -Original Message-
>>> From: msj121 [mailto:msj...@gmail.com]
>>> Sent: Saturday, 2 April 2011 8:56 AM
>>> To: users@wicket.apache.org
>>> Subject: Re: [Vote] New Wicket Version Numbering
>>> 
>>> I mean XP is letters... That is pretty amazing, there isn't even a
>> number,
>>> and even roman numerals, is there a 'P' in roman numerals?
>>> 
>>> --
>>> View this message in context: http://apache-
>>> wicket.1842946.n4.nabble.com/Vote-New-Wicket-Version-Numbering-
>>> tp3420887p3421249.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: PackageResourceReference, MetaInfStaticResourceReference and timestamps

2011-03-24 Thread Peter Ertl
looks like a refactoring-nightmare ...

Am 24.03.2011 um 12:23 schrieb Martin Grigorov:

> On Thu, Mar 24, 2011 at 12:13 PM, Martijn Dashorst <
> martijn.dasho...@gmail.com> wrote:
> 
>> On Thu, Mar 24, 2011 at 12:02 PM, James Carman
>>  wrote:
>>> Yes, but you would have to change how you refer to them, right?
>> 
>> Not sure how that would work out, haven't tried it. Isn't this also a
>> tomcat specific optimization as well?
>> 
> It is by Servlet 3.0 specification.
> 
> My recent research shows that Wicket+Wro4j is the best approach.
> 
> wro.xml:
> 
>/css/context.css
>classpath:/com/mycompany/components/Component1.css
>classpath:/com/mycompany/components/Component2.css
>classpath:/com/mycompany/components/Component3.css
> 
> 
> Don't use ResourceReference but just put
> 
> 
> in the page that uses these components.
> 
> 
> 
> 
>> Martijn
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 


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



Re: PackageResourceReference, MetaInfStaticResourceReference and timestamps

2011-03-24 Thread Peter Ertl
You can attach a front-end proxy like nginx or apache that caches resources 
delivered by your wicket application so subsequent requests will be served from 
the proxy cache with maximum speed.


Am 24.03.2011 um 09:01 schrieb Martin Grigorov:

> Hi,
> 
> On Thu, Mar 24, 2011 at 7:17 AM, Attila Király 
> wrote:
> 
>> 2011/3/24 hok 
>>> 
>>> 2. In the Servlet 3.0 specification it's possible to have static
>> resources
>>> under META-INF/resources and I noticed that wicket has
>>> MetaInfStaticResourceReference, which is better for serving static
>>> resources. In my case for some components I have css files which are
>> loaded
>>> like:
>>> 
>>>   response.renderCSSReference(new
>> PackageResourceReference(getClass(),
>>> getClass().getSimpleName() + ".css"));
>>> 
>>> So, it should be better to move all those css files under
>>> META-INF/resources. However, this somehow contradicts with the wicket
>>> philosophy of having everything in one place and requires maintaining a
>>> parallel package folder structure under META-INF/resources. Do you think
>>> it's worth it?
>>> 
>> 
>> Hi,
>> 
>> In my tests I found that Tomcat 7 serves static files from
>> META-INF/resources directory 2-3 times faster than wicket. So if
>> performance
>> is important I think it is worth it. I am pragmatic about it: maybe it is
>> bad to not hold everything in the same directory but this is a feature that
>> fits wicket pretty well (bundling static files in jars) so it would be
>> worse
>> to not use it.
>> 
>> Attila
>> 
> With the new CachingResourceStreamLocator the serving should be faster now.
> See https://issues.apache.org/jira/browse/WICKET-3511.
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 


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



Re: Resource loading

2011-03-10 Thread Peter Ertl
alternatively use:

   AnyClass.class.getResourceAsStream(...)


Am 10.03.2011 um 19:20 schrieb Martin Grigorov:

> You can also use:
> AnyClassInSrcMainJava.class.getClassLoader().getResource("modules.properties")
> 
> On Thu, Mar 10, 2011 at 4:29 PM, Marek Šabo  wrote:
> 
>> Hi all,
>> 
>> I have a question regarding resource loading in general (sorry for little
>> OT). What code should I use to load a property file which is located in
>> src/main/resources folder (maven directory structure)? I tried various
>> snippets and the only one working for me under both tomcat (standalone) and
>> jetty (mvn jetty:run) is to load it like this (e.g. from Application class):
>> 
>> URL url =
>> Thread.currentThread().getContextClassLoader().getResource("modules.properties");
>> 
>> I extracted this from log4j loading code - is this the only way or are
>> there other ways of doing this? The point being that files from resources
>> folder vary in different places when running mvn jetty:run, deploying war or
>> just running jar archive.
>> 
>> Regards,
>> 
>> Marek
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 


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



Re: [VOTE] WICKET-3218 - Component#onInitialize is broken for Pages

2011-03-10 Thread Peter Ertl
-1 on removing add() from ctor, too

it will piss of a huge load of wicket developers for a tiny and questionable 
benefit.

things like this made me drop tapestry btw (thanks for the really big laugh, 
martijn :-)

we don't want users to leave because we make decisions from within the ivory 
tower.


Am 10.03.2011 um 14:07 schrieb Maarten Billemont:

>> [drama]
>> 
>> So to summarize my rant:
>> 
>> -1 for removing the ability to use add inside a constructor.
>> +0 for improving the handling of oninitialize
>> +1 for improving the documentation on the lifecycle of components and
>> the event chain called during processing [2]
> 
> I assume that means you don't care if 3218 is marked as won't fix and 
> onInitialize remains overridable by those that choose to use it.
> 
> Documentation is a good enough alternative when there is an unresolved issue 
> that only occurs in rare cases.  So yes, document it, and let those that want 
> to use onInitialize do so.
> 
> I never claimed using constructors will make your webapps eat your young.  I 
> simply outlined the pros and cons of each approach and argued the design 
> advantages of not touching your components from outside wicket lifecycle 
> methods.
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: German umlauts in Wicket-Message Tag

2011-03-03 Thread Peter Ertl
if you read my last post carefully you will see that using umlauts in markup 
attributes does work

Am 03.03.2011 um 07:35 schrieb MattyDE:

> Okay, i know what you all mean. But what i have misappropriated from you, is
> my own implementation of an IStringResourceLoader so iam not loading any
> String-Ressources from Property Files. Iam using a Database-Logic to
> translate the application.
> 
> So iam still disappointed not to use ANY tag and ANY character inside the
> key=" " brackets.
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/German-umlauts-in-Wicket-Message-Tag-tp3331297p3332827.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: German umlauts in Wicket-Message Tag

2011-03-02 Thread Peter Ertl
Umlauts work great in HTML in you use encoding UTF-8

Don't forget 

 

in your markup to make the IDE respect it.

an additional

  

at the beginning of the markup will not hurt.

Eventually set the encoding of your project files in your IDE to be UTF-8, too.

Set wickets default request / response encoding to UTF-8.

Properties files can either be XML or raw text files. For example IDEA supports 
converting umlauts into escape sequences compatible with ISO-8859-1 which is 
the default encoding for .properties. So I can use .properties files there and 
type umlauts without caring.

No need to use entities for umlauts like

ä   
&ssharp;

and such.

If you take care of all these little things it just works.


Am 02.03.2011 um 16:05 schrieb Manfred Bergmann:

> Yep, right.
> Using special characters in keys is not a good idea and makes localisation
> harder. Fully sufficuient if you use umlauts on the value side.
> 
> 
> Manfred
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/German-umlauts-in-Wicket-Message-Tag-tp3331297p3331642.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Modal widow slow?

2011-01-12 Thread Peter Ertl
What's a "modal widow" ? *lol*maybe an exclusive woman whose husband died?


Am 12.01.2011 um 20:06 schrieb Martin Makundi:

> I have a table with lots of editable cells.
> 
> The editable cells have lots of hidden controls (inputs,selects,etc.)
> and the table loads very slow.
> 
> Browsers seem to need to digest also the invisible elements.
> 
> Yes, I tried also table-less layout with same result.
> 
> The idea is that when a user clicks a cell, it shows the editor fast.
> 
> Now I am planning to speed-up the table loading by removing the
> editors. But this will mean that I need a ajax editor and I am
> worrying that clicking the table cell and waiting for the editor to
> pop up will be slow (or annoyingly slow).
> 
> **
> Martin
> 
> 2011/1/12 James Carman :
>> I'm asking because I had that sort of trouble with IE a while back
>> when I was trying to load a modal window on a page with lots of ajax
>> links in a table.
>> 
>> On Wed, Jan 12, 2011 at 1:54 PM, Martin Makundi
>>  wrote:
>>> Any "normal" browser. Putting browser on steroids or having firbre
>>> network is not really an option ;)
>>> 
>>> **
>>> Martin
>>> 
>>> 2011/1/12 James Carman :
 What browser?
 
 On Wed, Jan 12, 2011 at 1:46 PM, Martin Makundi
  wrote:
> Hi!
> 
> Has anybody noticed that Wicket ajax ModalWindow is bit slow to load,
> or is it just me?
> 
> Has anybody tried to overcome it by switching to another
> implementation/styling or is it totally dependent on the content of
> the modal window?
> 
> **
> Martin
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: IResourceSettings.setUseTimestampOnResources(true) and performance

2010-12-29 Thread Peter Ertl
1.4 is not affected - timestamps on resources are currently only available in 
wicket 1.5

Am 29.12.2010 um 15:49 schrieb mf:

> 
> What about Version 1.4.15?  I got this message for each request. I think i
> slows down, too?
> 
> 
> DEBUG | 29.12. 13:31:55 | cannot convert url:
> jar:file:/D:/eclipse_jee_helios/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mytest/WEB-INF/lib/wicket-1.4.15.jar!/org/apache/wicket/markup/html/wicket-event.js
> to file (URI is not hierarchical), falling back to the inputstream for
> polling | UrlResourceStream.() |
> org.apache.wicket.util.resource.UrlResourceStream 
> class org.apache.wicket.ajax.WicketAjaxReference,
> org/apache/wicket/ajax/wicket-ajax.js
> DEBUG | 29.12. 13:31:55 | Attempting to locate resource
> 'org/apache/wicket/ajax/wicket-ajax.js' on path [folders = [], webapppaths:
> []] | ResourceStreamLocator.locateByResourceFinder() |
> org.apache.wicket.util.resource.locator.ResourceStreamLocator 
> DEBUG | 29.12. 13:31:55 | Attempting to locate resource
> 'org/apache/wicket/ajax/wicket-ajax.js' using classloader WebappClassLoader
>  delegate: false
>  repositories:
>/WEB-INF/classes/
> --> Parent Classloader:
> -- 
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/IResourceSettings-setUseTimestampOnResources-true-and-performance-tp3057946p3167187.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: IResourceSettings.setUseTimestampOnResources(true) and performance

2010-11-24 Thread Peter Ertl
fixed in trunk for 1.5

Am 24.11.2010 um 22:39 schrieb Peter Ertl:

> Thanks!
> 
> Am 24.11.2010 um 22:10 schrieb hok:
> 
>> 
>> https://issues.apache.org/jira/browse/WICKET-3194
>> https://issues.apache.org/jira/browse/WICKET-3194 
>> -- 
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/IResourceSettings-setUseTimestampOnResources-true-and-performance-tp3057946p3058085.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: IResourceSettings.setUseTimestampOnResources(true) and performance

2010-11-24 Thread Peter Ertl
Thanks!

Am 24.11.2010 um 22:10 schrieb hok:

> 
> https://issues.apache.org/jira/browse/WICKET-3194
> https://issues.apache.org/jira/browse/WICKET-3194 
> -- 
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/IResourceSettings-setUseTimestampOnResources-true-and-performance-tp3057946p3058085.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: IResourceSettings.setUseTimestampOnResources(true) and performance

2010-11-24 Thread Peter Ertl
Can you file an JIRA issue and attach a quickstart to reproduce this case?

That would help analyzing your mentioned issue tremendously...

Am 24.11.2010 um 20:27 schrieb hok:

> 
> Hello,
> I had a problem with slow loading of pages and response to ajax requests.
> After some debugging I traced the problem to be that wicket constantly
> tries: 
> 
> DEBUG - UrlResourceStream  - cannot convert url:
> jar:file:/C:/Users/hok/.m2/repository/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3.jar!/org/apache/wicket/markup/html/wicket-event.js
> to file (URI is not hierarchical), falling back to the inputstream for
> polling
> DEBUG - ResourceStreamLocator  - Attempting to locate resource
> 'org/apache/wicket/markup/html/wicket-event_en_US.js' on path [folders = [],
> webapppaths: []]
> DEBUG - ResourceStreamLocator  - Attempting to locate resource
> 'org/apache/wicket/markup/html/wicket-event_en_US.js' using classloader
> sun.misc.launcher$appclassloa...@cac268
> 
> and this happens because that by default (or at least I think so) wicket
> adds timestamp on the resources -
> ResourceSettings.setUseTimestampOnResources(true) and every resource is read
> from the jar files on every request. When a resource is in a jar file a
> java.lang.IllegalArgumentException: URI is not hierarchical is thrown in the
> UrlResourceStream constructor and a lot of attempts are made to load the jar
> file through different loaders. In my case this led to a slow response
> times.
> After disabling timestamp on resources
> (ResourceSettings.setUseTimestampOnResources(false)) the problem disappears
> and the performance is fine. However in the javadoc of
> setUseTimestampOnResources:
> 
> Enabling timestamps on resources will inject the last modification time of
> the resource into the filename (the name will look something like
> 'style-ts1282915831000.css' where the large number is the last modified date
> in milliseconds and '-ts' is a prefix to avoid conflicts with filenames that
> already contain a number before their extension. * 
> 
> Since browsers and proxies use the filename of the resource as a cache key
> the changed filename will not hit the cache and the page gets rendered with
> the changed file.
> 
> In this case this useful functionality is lost. Is it possible to have "the
> best of both worlds"? Thanks.
> -- 
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/IResourceSettings-setUseTimestampOnResources-true-and-performance-tp3057946p3057946.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: upload in IE

2010-11-16 Thread Peter Ertl
Please file an JIRA issue...

Wicket should handle this independent of the browser, at least starting from 
1.5.x

Am 16.11.2010 um 23:58 schrieb Nitnatsnok:

> 
> // To strip full path for stupid MSIE browsers
> String fileName =
> org.apache.commons.io.FilenameUtils.getName(upload.getClientFileName());
> 
> -- 
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/upload-in-IE-tp3045562p3045860.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Send an object to page

2010-11-03 Thread Peter Ertl
> That's one more reason why I use UUID's for my object ids.  They're
> harder to spoof.


Security by obscurity :-) 

Checking the URL is not an option ... any web app claiming to be secure must do 
that no what what the surrogate database key looks like *imho*

Also, if the userID is the id of the currently logged in user why not just 
store it in your wicket session when logging on to make it inaccessible for the 
client and prevent spoof altogether?

Am 02.11.2010 um 05:29 schrieb James Carman:

> On Mon, Nov 1, 2010 at 11:30 PM, Jeremy Thomerson
>  wrote:
>>> 
>> And, of course, it opens you up to doing more security checks i.e., you
>> have editUserProfile.html?userID=123 - now you have to check that the signed
>> in person is allowed to edit whatever user they are trying to edit (since
>> they can twiddle the URL).
>> 
> 
> That's one more reason why I use UUID's for my object ids.  They're
> harder to spoof.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Wicket 1.5-m1 - Redirect from AJAX doesn't work.

2010-09-15 Thread Peter Ertl
Can you file an JIRA issue please?


Am 15.09.2010 um 13:26 schrieb monzonj:

> 
> Hi,
> 
> I would like to point out that I've tried with Wicket 1.4.10 and it works
> fine. So, it's a bug on Wicket 1.5
> -- 
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-m1-Redirect-from-AJAX-doesn-t-work-tp2540344p2540352.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Wicket 1.5 adding a resource used from css?

2010-09-14 Thread Peter Ertl
Did you put 'border-radius.htc' in the same package where this CSS is located?

How your refer to the CSS from your page? Do you use wicket:link or 
response.renderCSSReference(...) ?

Can you paste your code to some pastebin and post the link here?


Am 14.09.2010 um 09:10 schrieb nino martinez wael:

> .title {
>   width:98%; margin:5px auto; padding:5px;
>   border: 1px solid #d7d7d7;
>   background-color: #f0f0f0;
>   -moz-border-radius: 11px;
>   -webkit-border-radius: 11px;
>   border-radius: 11px;
>   behavior: url(border-radius.htc);
> }
>   }


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



Re: Wicket 1.5 adding a resource used from css?

2010-09-14 Thread Peter Ertl
-- I would not recommend tailing slashes for resources names.

-- The mount path is not a prefix to the resource but a full path, you probably 
want this instead:

getRootRequestMapperAsCompound().add(new 
ResourceMapper("/resources/border-radius.htc", new 
PackageResourceReference(WallpagerParentPage.class, "border-radius.htc")))

-- If 'border-radius.htc' is included from a stylesheet in the same package 
where WallpagerParentPage.class is located it's sufficient to put 
border-radius.htc in the same package and refer it like this from CSS:

stylesheet inside WallpaperParentPage.class package:

 .

behavior:url(border-radius.htc)

 .


In this case you don't even need to mount the resource at all.

-- You should avoid to use '..' for url's inside CSS ... it probably will not 
work!




Am 14.09.2010 um 11:49 schrieb Peter Ertl:

> 
> Am 14.09.2010 um 11:11 schrieb Martin Grigorov:
> 
>> On Tue, Sep 14, 2010 at 10:22 AM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>> 
>>> Yeah it is simple, doing this:
>>>   @Override
>>>  protected void init() {
>>>  super.init();
>>>  addComponentInstantiationListener(new
>>> GuiceComponentInjector(this,
>>>  getGuiceInjector()));
>>>   ResourceMapper htcResourceMapper = new
>>> ResourceMapper("/resources/",
>>>  new
>>> PackageResourceReference(WallboardParentPage.class,
>>>  "border-radius.htc"));
>>>  getRootRequestMapperAsCompound().add(htcResourceMapper);
>>>  }
>>> And when I hit this url:
>>> http://localhost:8080/resources/border-radius.htc or
>>> 
>> I think the url should be http://localhost:8080/resources/
>> This is what you gave as mountPath
>> 
>> See ResourceMapperTest
>> 
>>> http://localhost:8080/wicket/resources/border-radius.htc
>>> 
>>> I get a 404, and this comes in the log:
>>> 
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> DEBUG org.mortbay.log - call filter wicket.WicketWarp
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No
>>> suitable RequestHandler found. URL=resources/border-radius.htc
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> DEBUG org.mortbay.log - call servlet default
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> DEBUG org.mortbay.log -
>>> 
>>> RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> DEBUG org.mortbay.log -
>>> 
>>> RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> DEBUG org.mortbay.log -
>>> 
>>> RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> DEBUG org.mortbay.log -
>>> 
>>> resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc
>>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>>> DEBUG org.mortbay.log - RESPONSE /resources/border-radius.htc  404
>>> 10:18:48.626 [25516...@qtp-11596093-0] DEBUG org.mortbay.log - EOF
>>> 
>>> 
>>> 2010/9/14 Martin Grigorov :
>>>> I had to tell you that ResourceMapper is available only in 1.5-m2.1
>>>> (currently voted)
>>>> 
>>>> The usage is quite simple:
>>>> 
>>>> MyApp#init() {
>>>> super.init();
>>>> getRootRequestMapperAsCompound().add(new ResourceMapper("mount/path",
>>>> resourceReference));
>>>> }
>>>> 
>>>> On Tue, Sep 14, 2010 at 9:52 AM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>> 
>>>>> How do I do it with resou

Re: Wicket 1.5 adding a resource used from css?

2010-09-14 Thread Peter Ertl

Am 14.09.2010 um 11:11 schrieb Martin Grigorov:

> On Tue, Sep 14, 2010 at 10:22 AM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
> 
>> Yeah it is simple, doing this:
>>@Override
>>   protected void init() {
>>   super.init();
>>   addComponentInstantiationListener(new
>> GuiceComponentInjector(this,
>>   getGuiceInjector()));
>>ResourceMapper htcResourceMapper = new
>> ResourceMapper("/resources/",
>>   new
>> PackageResourceReference(WallboardParentPage.class,
>>   "border-radius.htc"));
>>   getRootRequestMapperAsCompound().add(htcResourceMapper);
>>   }
>> And when I hit this url:
>> http://localhost:8080/resources/border-radius.htc or
>> 
> I think the url should be http://localhost:8080/resources/
> This is what you gave as mountPath
> 
> See ResourceMapperTest
> 
>> http://localhost:8080/wicket/resources/border-radius.htc
>> 
>> I get a 404, and this comes in the log:
>> 
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> DEBUG org.mortbay.log - call filter wicket.WicketWarp
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> ERROR o.a.w.request.cycle.RequestCycle - Unable to execute request. No
>> suitable RequestHandler found. URL=resources/border-radius.htc
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> DEBUG org.mortbay.log - call servlet default
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> DEBUG org.mortbay.log -
>> 
>> RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc.gz
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> DEBUG org.mortbay.log -
>> 
>> RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> DEBUG org.mortbay.log -
>> 
>> RESOURCE=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> DEBUG org.mortbay.log -
>> 
>> resource=file:/D:/nino/develop/netdesign/projects/internalcomponents/Applications/WallBoard/trunk/wallboard-web/src/main/webapp/resources/border-radius.htc
>> 10:16:47.362 [25516...@qtp-11596093-0 - /resources/border-radius.htc]
>> DEBUG org.mortbay.log - RESPONSE /resources/border-radius.htc  404
>> 10:18:48.626 [25516...@qtp-11596093-0] DEBUG org.mortbay.log - EOF
>> 
>> 
>> 2010/9/14 Martin Grigorov :
>>> I had to tell you that ResourceMapper is available only in 1.5-m2.1
>>> (currently voted)
>>> 
>>> The usage is quite simple:
>>> 
>>> MyApp#init() {
>>> super.init();
>>> getRootRequestMapperAsCompound().add(new ResourceMapper("mount/path",
>>> resourceReference));
>>> }
>>> 
>>> On Tue, Sep 14, 2010 at 9:52 AM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>> 
 How do I do it with resourcemapper..?
 
 Im wondering if I am giving the wrong path for the resource somehow?
 
 2010/9/14 Martin Grigorov :
> I am not sure right now what is wrong with this case but you can also
 mount
> the resource with ResourceMapper at any path you want.
> File a bug for this failing case.
> 
> On Tue, Sep 14, 2010 at 9:10 AM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
> 
>> Hi
>> 
>> I've been wondering how I can add a resource used from the css (I
>> cant
>> seem to remember how to do it).. This is what I have :
>> 
>> public class WicketApplication extends WebApplication {
>>   /**
>>* Constructor
>>*/
>>   public WicketApplication() {
>>   }
>> 
>>   @Override
>>   protected void init() {
>>   super.init();
>>   addComponentInstantiationListener(new
>> GuiceComponentInjector(this,
>>   getGuiceInjector()));
>> 
>>   getSharedResources().add(
>>   "border-radius.htc",
>>   new
>> PackageResourceReference(WallboardParentPage.class,
>> 
>> "border-radius.htc").getResource());
>>   }
>> CSS:
>> .title {
>>   width:98%; margin:5px auto; padding:5px;
>>   border: 1px solid #d7d7d7;
>>   background-color: #f0f0f0;
>>   -moz-border-radius: 11px;
>>   -webkit-border-radius: 11px;
>>   border-radius: 11px;
>>   behavior: url(border-radius.htc);
>> }
>>   }
>> 
>> And when I goto this url, I can see the htc:
>>>

Re: Wicket UI Architect / guru needed (Silicon Valley)

2010-08-27 Thread Peter Ertl
Sorry for my recent posting! 

Didn't want to post into the group :-)

Please excuse!

Cheers
Peter


Am 27.08.2010 um 20:27 schrieb Jennifer Loesch:

> 
> Hi Peter, 
> 
> Quite possibly, are you authorized to work in the US? 
> 
> To answer your question, yes, on my father's side.
> Jennifer Loesch
> Technical Recruiter
> 
> 
> 
> Albin Engineering Services Inc. 
> 3350 Scott Blvd, Suite 27
> Santa Clara, CA 95054 
> ph : 408-733-AESI (2374) x37
> fax : 408-739-AESI (2374)
> jennifer.loe...@aesi.com
> www.aesi.com
> 
>  
> 
> 
> Peter Ertl 
> 08/27/2010 11:23 AM
> Please respond to
> users@wicket.apache.org
> 
> To
> users@wicket.apache.org
> cc
> Subject
> Re: Wicket UI Architect / guru needed (Silicon Valley)
> 
> 
> 
> 
> 
> Jennifer,
> 
> is remote work an option?
> 
> Best regards
> Peter Ertl
> 
> P.S.: Are you German? Your name looks like you are.
> 
> I live in Germany. 
> Am 27.08.2010 um 18:10 schrieb Jennifer Loesch:
> 
> > 
> > Wicket UI Architect/Developer 
> > Our Client, a well-known IT company in Silicon Valley, has decided to use 
> > Wicket to develop an advanced advertising platform that will ultimately be 
> > utilized by video-streaming companies—the Verizons and Comcasts as well as 
> > Hollywood and Netflix type firms.  Our Client sees this project as so 
> > significant that it may become one of the key pillars of the firm in the 
> > coming years.
> > Our Client has put together a small R&D team to develop middleware to 
> > address this challenge.  The ideal candidate will have at least 10 years of 
> > software coding experience which includes 5 years of developing modern 
> > complex web UIs, an enterprise middleware background and a willingness to 
> > do product development that goes beyond UI implementation.  At least one 
> > year of Wicket development/architecting is mandatory.
> > 
> > The developer must be able to work in a fast-paced, Agile environment, 
> > write clean and solid code and teach/advise other engineers. If you enjoy 
> > collaborating with a small, entrepreneurial team working on a high 
> > visibility project, this opportunity is for you!
> > 
> > Developers will work contractually, with an initial commitment of 6 months. 
> >  Compensation included full health benefits.
> > 
> > When we approached Jonathan Locke, he immediately recommended posting on 
> > this email list, with his blessing!
> > 
> > To candidate for the position, please contact immediately:
> > 
> > Jennifer Loesch, 408 919 5237, jennifer.loe...@aesi.com
> > 
> > 
> > 
> > Jennifer Loesch
> > Technical Recruiter
> > 
> > 
> > 
> > Albin Engineering Services Inc. 
> > 3350 Scott Blvd, Suite 27
> > Santa Clara, CA 95054 
> > ph : 408-733-AESI (2374) x37
> > fax : 408-739-AESI (2374)
> > jennifer.loe...@aesi.com
> > www.aesi.com
> > 
> > 
> > 
> 
> 
> 



Re: Wicket UI Architect / guru needed (Silicon Valley)

2010-08-27 Thread Peter Ertl
Jennifer,

is remote work an option?

Best regards
Peter Ertl

P.S.: Are you German? Your name looks like you are.

I live in Germany. 
Am 27.08.2010 um 18:10 schrieb Jennifer Loesch:

> 
> Wicket UI Architect/Developer 
> Our Client, a well-known IT company in Silicon Valley, has decided to use 
> Wicket to develop an advanced advertising platform that will ultimately be 
> utilized by video-streaming companies—the Verizons and Comcasts as well as 
> Hollywood and Netflix type firms.  Our Client sees this project as so 
> significant that it may become one of the key pillars of the firm in the 
> coming years.
> Our Client has put together a small R&D team to develop middleware to address 
> this challenge.  The ideal candidate will have at least 10 years of software 
> coding experience which includes 5 years of developing modern complex web 
> UIs, an enterprise middleware background and a willingness to do product 
> development that goes beyond UI implementation.  At least one year of Wicket 
> development/architecting is mandatory.
> 
> The developer must be able to work in a fast-paced, Agile environment, write 
> clean and solid code and teach/advise other engineers. If you enjoy 
> collaborating with a small, entrepreneurial team working on a high visibility 
> project, this opportunity is for you!
> 
> Developers will work contractually, with an initial commitment of 6 months.  
> Compensation included full health benefits.
> 
> When we approached Jonathan Locke, he immediately recommended posting on this 
> email list, with his blessing!
> 
> To candidate for the position, please contact immediately:
> 
> Jennifer Loesch, 408 919 5237, jennifer.loe...@aesi.com
> 
> 
> 
> Jennifer Loesch
> Technical Recruiter
> 
> 
> 
> Albin Engineering Services Inc. 
> 3350 Scott Blvd, Suite 27
> Santa Clara, CA 95054 
> ph : 408-733-AESI (2374) x37
> fax : 408-739-AESI (2374)
> jennifer.loe...@aesi.com
> www.aesi.com
> 
> 
> 



Re: How to show any type of exception in feedbackpanel or in popup window

2010-08-25 Thread Peter Ertl
put that around the code in your page that causes the exception:

try
{
   databaseMethodThatThrows();
}
catch(DatabaseException x)
{
  error(e.getMessage);
}


Am 25.08.2010 um 22:46 schrieb nino martinez wael:

> you could catch them in the request cycle?
> 
> 2010/8/25 arunarapole 
> 
>> 
>> Hi
>> 
>> 
>> I have a Exception called Violation of UNIQUE KEY constraint
>> 'UQ__usr__FE76F85348BAC3E5'. Cannot insert duplicate key in object abc
>> table
>> 
>> above Exception i have to display in same page  feedbackpanel  or in popup
>> window .
>> 
>> If any one knows about please post me your ideas
>> 
>> Thank you
>> 
>> Aruna
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/How-to-show-any-type-of-exception-in-feedbackpanel-or-in-popup-window-tp2338841p2338841.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Peter Ertl
matej: So the new convention is that named parameters are always query string 
parameters?


Am 24.08.2010 um 02:13 schrieb Matej Knopp:

> Hi,
> 
> see the replies below
> 
> 2010/8/23 Major Péter :
>> Hi!
>> 
>> As I'm testing wicket 1.5-SNAPSHOT, I'm seeing some strange behaviors:
>> With 1.4 I've used to have url's like:
>> showuser/id/1234
>> now when I open simply the page without params, I will see the following
>> URL:
>> showuser?[0-9]+
> 
> The number after ? is page id. Since wicket is a stateful framework
> (by default) we need to track page instances.
> 
>> When I looked at the JavaDoc of the new MountMapper (which is the
>> replacement for mountBookmarkablePage), I saw that I'm having this URL,
>> because my page is not stateless.
> 
> In a way, yes. Stateless pages generally do not have page ids in URL.
> 
>> Q1: with 1.4 this was possible, because the URL contained the pagemap
>> instance number, or is there something else?
>> Q2: (a little n00b question) how can I find out which component makes my
>> page stateful?
> 
> Usually it is a component that returns false in isStateless or
> generates a stateful listener interface URL.
> 
>> 
>> when I try to hit the URL now:
>> showuser/id/1234
>> then I'm going to have indexed parameters and not named parameter with
>> 'id' name. Q3: Why is that?
> 
> Because it's not a named paramerer (by default). The URL in question
> will have two indexed parameters. id and 1234.
> Big problem in 1.4 was that there was no distinction between indexed
> parameters (part of path) and named parameters (usually part query
> string). So it was difficult to build URLs such as
> showpage/13?sort=asc
> 
> 1.5 fixes this by defining URL scheme like this:
> 
> /page/mount/path/indexed-param0/indexed-param1?named1=value1&name2=value2
> 
> Btw. you should be able to mount the url in question as
> showuser/id/{user-id}
> 
> wicket should then make user-id a named parameter.
> 
>> if I have a page with URL in browser:
>> showuser?8&id=123
>> and I rewrite the id to 124, then I'm going to still see the page for
>> 123, which is really disturbing! Q4: is there a solution for this to
>> work? Or should I make my page stateless to be able to do this?? (How?)
> 
> It is still the same page instance. Obviously in your case you take
> the page parameters into account only in page constructor. So when you
> later change the id value (but leave page id the same) nothing
> changes.
> 
> However if  you for example override page onBeforeRender() and call
> getPageParameters() there the id parameter will have proper value.
> 
>> 
>> Also how could I make Wicket to use by default the /id/1234 format
>> instead of ?3&id=1234 for link creation??
> 
> You can either set id and 1234 as indexed parameters or mount the page
> as /showuser/id/{user-id}
> 
> -Matej
> 
>> 
>> Thanks for your help.
>> 
>> Best Regards,
>> Peter Major
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Roles.clone

2010-08-04 Thread Peter Ertl
getRoles() is considered to access the roles read-only so the caller only gets 
a non-critical copy of the internal roles collection.

Am 04.08.2010 um 13:39 schrieb Josef:

> Hello.
> Quite new to the wicket world, and reading through code on some
> projects. So , excuse me for some beginners question farther on.
> 
> One thing i can't find is why would anyone do a clone like:
> 
>   @Override
>   public Roles getRoles() {
>   return (Roles) roles.clone();
>   }
> 
> when writing your own Session (extends AuthenticatedWebSession )
> Why is that?
> 
> Regards
> JA
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Jetty, HSQLDB and automatic scanning

2010-05-27 Thread Peter Ertl
maybe you should properly shutdown hsqldb in Application#onDestroy() ...

Am 27.05.2010 um 19:00 schrieb Igor Vaynberg:

> you can add a servlet context listener that looks for the lock file
> and nukes it.
> 
> alternatively you can use the Start class that comes with wicket
> quickstart archetype/project that does what mvn jetty:run but with the
> added benefit of allowing hotswapping, and in that class you can add
> the code to nuke the lock file.
> 
> -igor
> 
> On Thu, May 27, 2010 at 9:57 AM, Jakub Skoczen  wrote:
>> Hi Everyone,
>> 
>> First of all - this question is not directly concerned with Wicket,
>> sorry for that. But, I did came across this problem when developing a
>> small Wicket web app, so I thought someone else here may have had a
>> similar issue. So here it is: I got tired with the slow
>> write/compile/deploy process and I switched to using jetty:run (with
>> scanning interval set to 10s) and incrementally compiling the classes.
>> Unfortunately, right after jetty detects changes to the compiled class
>> and tries to redeploy the app I get the following HSQLDB exception:
>> 
>> java.sql.SQLException: The database is already in use by another
>> process: org.hsqldb.persist.niolockf...@7c137657[...] is presumably
>> locked by another process.
>> 
>> HSQLDB is run using the in-process mode and the following exception is
>> thrown both when using memory and file backend. It obviously looks
>> like HSQLDB is not releasing the lock during the auto redeployment,
>> maybe Jetty is locking up the thread somehow? Anyways, any ideas will
>> be greatly appreciated.
>> --
>> 
>> Cheers,
>> Jakub
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org


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



Re: A web site developed with Wicket

2010-03-20 Thread Peter Ertl
After using CSS for layout things for two years my summary is:

  "Use tables for layout, CSS for the rest"

It it simple, it works, and it doesn't break in each new version of IE

Am 18.03.2010 um 08:39 schrieb nino martinez wael:

> CSS are the way to do stuff, but usually IE smashes it somehow. My rule are
> to develop for firefox, patch for IE. And so far it's worked very well.
> 
> However there are somethings that are really painfull todo with css. Like
> round corners, this is where I came up with wicketstuff artwork two
> integrations for js libs that helps making graphics like round corners.
> 
> regards
> 
> 2010/3/18 voltron 
> 
>> Thank you for feedback. I used CSS positioning instead of tables, but it is
>> real pain :)
>> 
>> 
>> 
>> 
>> 
>> 
>> From: Daniel Toffetti 
>> To: users@wicket.apache.org
>> Sent: Thu, March 18, 2010 1:46:37 AM
>> Subject: Re: A web site developed with Wicket
>> 
>> voltron  yahoo.com> writes:
>>> Hello,
>>> 
>>> http://www.nofailtime.com/appmonitor is a web application
>>> developed with wicket framework.
>>> 
>>> .
>>> 
>>> I would be happy if you try the site and give feedback. You
>>> can login the site with account;
>>> username = demo
>>> password = demo
>>> 
>>> Thanks,
>> 
>>   It looks great, I like specially the menu. Some panels (Login,
>> Subscription
>> Update) seem to be somewhat to the right of the screen, it would be better
>> if
>> they were centered.
>>   And I get a 1 centimeter wide vertical padding both to the left and to
>> the
>> right, don't know if this is intentional, it doesn't look good but perhaps
>> it's
>> just me.
>>   Could not crash it yet, tested with Firefox 3.6 / Windows XP on a 17"
>> CRT
>> (non-wide format).
>> 
>> Cheers,
>> 
>> Daniel
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
>> 


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



Re: [OT] Wicket changed my life !

2010-02-19 Thread Peter Ertl
Wicket put the "suck" out of web development for me :-)

Am 19.02.2010 um 08:14 schrieb Josh Kamau:

> Me too!!
> 
> On Fri, Feb 19, 2010 at 9:57 AM, Ashika Umanga Umagiliya <
> auma...@biggjapan.com> wrote:
> 
>> I love Wicket !
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: Help with Wicket Adoption Numbers

2010-01-12 Thread Peter Ertl
Struts Club?!

That's disgusting :-(

Am 11.01.2010 um 22:57 schrieb Jonathan Locke:

> 
> 
> that's because it's the number one rule!  nobody talks about Struts Club.
> 
> 
> igor.vaynberg wrote:
>> 
>> here is an interesting tidbit
>> 
>> wicket is on the front page of nabble
>> 
>> http://old.nabble.com/
>> 
>> sorted by activity. we are there along maven, jquery, cxf, tomcat,
>> etc. how is the adoption on those?
>> 
>> -igor
>> 
>> On Thu, Jan 7, 2010 at 6:19 PM, Lester Chua  wrote:
>>> Thanks for the links.
>>> I have already submitted them as part of the evaluation process.
>>> 
>>> I'll take a look at the IBM links from scott.
>>> 
>>> Regards,
>>> 
>>> Lester
>>> 
>>> Steve Swinsburg wrote:
 
 On the wiki there are some pages to help your cause:
 http://cwiki.apache.org/WICKET/websites-based-on-wicket.html
 http://cwiki.apache.org/WICKET/products-based-on-wicket.html
 
 as well as blogs talking about Wicket, and lots more useful PR info:
 http://cwiki.apache.org/WICKET/index.html
 
 All the best!
 
 cheers,
 Steve
 
 
 
 On 08/01/2010, at 11:43 AM, Lester Chua wrote:
 
 
> 
> Hi,
> 
> I am facing a hurdle that need crossing in my final attempt to push
> Wicket for use in an organization.
> I have:
> 
> 1) Prototyped a small size module
> 2) Did 2-3 presentations on the key features and advantages of wicket
> 
> No one is disputing my claims about productivity and good OO code that
> was the result.
> 
> BUT, the technology evaluation committee is NOT recommending Wicket
> because of. of all things.
> - Wicket's Low Adoption Rate
> Can I find any numbers to blow this away?
> 
> My alternative is to accept the finding and work with Struts 2. Which
> will mean the stack will need to expand to DWR
> (for security). I REALLY don't want to go there, and am even
> considering
> not taking part in this project due to the high risk involved, only 9
> months
> to introduce huge changes to a system that has lots of legacy problems
> (took
> about 3 years to build). I think a lot of those years were spent
> wrestling
> with the monster that is EJB 1.1. The only way I thought the project
> can
> even be on time is to scrap the entire presentation layer (aka Struts)
> and
> redo it in Wicket with 1 dedicated developer while the rest of the team
> work
> on killing the beast that is EJB 1.1 by refactoring the biz code.
> 
> Sigh, my choices are stark. It's either to keep the job and plough
> ahead
> and probably fail spectacularly 9 months later or go hungry and explain
> to
> my wife why we need to spend less on the kid..
> 
> It's easy to blame the tech committee but they did help me find wicket
> by
> rejecting my initial proposal to build the new system on a
> (JQuery+JSON+REST) framework, which can be very productive as well, if
> not
> as "clean" as Wicket.
> 
> Sorry for rambling so much. Is there any way I can demolish the silly
> low
> adoption rate argument (omg I still don't believe it can be so lame)?
> 
> Lester
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Help-with-Wicket-Adoption-Numbers-tp27069702p27118513.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org


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



Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Peter Ertl
Would it be a good idea to be able to specify the pagestore limits on a 
per-wicket-session base?

So you could for example increase the page store limits once a user has 
successfully authenticated.

DoS web clients usually don't go through the mess to authenticate first. Also 
multiple authentications of the 
same user could be easily detected. So DoS should be a little harder.

Am 07.01.2010 um 17:05 schrieb Johan Compagner:

> what is the definition of an overloaded pagestore?
> if the page store can be overloaded (so more then it should load) then it is
> a bug of wicket.
> But even if you get a dos attack then max 10MB per user will be allocated
> yes, but thats not overloading in my point of view.
> you could always decrease it so thats it is not max 10MB
> 
> On Thu, Jan 7, 2010 at 14:29, manuelbarzi  wrote:
> 
>> if this is the behaviour by default, then, how do you avoid a DoS attack? i
>> mean, to put an example, if a simple app like this receives thousand of
>> users just refreshing the home page, then the pagestore will be
>> overloaded... may this become a disk I/O overhead and its other possible
>> consequences.
>> 


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



Re: Wicket based open source projects

2009-11-27 Thread Peter Ertl
+1

Am 27.11.2009 um 16:03 schrieb Gatos:

> It might be a good idea to create a page in with open source projects, like
> Hippo CMS.
> 
> What do you think?
> 
> 
> On Fri, Nov 27, 2009 at 4:36 PM, Peter Ertl  wrote:
> 
>> artifactory
>> 
>> Am 27.11.2009 um 15:15 schrieb Andrea Aime:
>> 
>>> Gatos ha scritto:
>>>> Hello,
>>>> Is there any wicket based Open Source projects?
>>> 
>>> See GeoServer 2.0 at http://geoserver.org
>>> 
>>> Cheers
>>> Andrea
>>> 
>>> 
>>> --
>>> Andrea Aime
>>> OpenGeo - http://opengeo.org
>>> Expert service straight from the developers.
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: Wicket based open source projects

2009-11-27 Thread Peter Ertl
artifactory

Am 27.11.2009 um 15:15 schrieb Andrea Aime:

> Gatos ha scritto:
>> Hello,
>> Is there any wicket based Open Source projects?
> 
> See GeoServer 2.0 at http://geoserver.org
> 
> Cheers
> Andrea
> 
> 
> -- 
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org


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



Re: Intellij9 integration

2009-11-15 Thread Peter Ertl
Never felt like I need additional support for wicket. After all it's 95% in 
type-safe java code. Keeping wicket:id's in sync is no rocket science once you 
get the idea :-)

Am 15.11.2009 um 00:38 schrieb Nick Heudecker:

> What do you mean that the current one shows up?  I haven't updated
> WicketForge to work with IDEA 9 because I'm not on IDEA 9.
> 
> Feel free to submit patches.  Right now WicketForge does everything I need
> it to do, so unless I start using Wicket more often or it doesn't meet my
> needs, I'm not really inclined to spend my limited free time on it.
> 
> On Sat, Nov 14, 2009 at 3:12 PM, Alex Rass  wrote:
> 
>> You have a point, but I've been using Idea for... 6+ years now.
>> These guys are very sales oriented.
>> They added GWT support as a point release, like it was a no big deal.
>> When they see there's a demand - they move on it.
>> And if they can add a new popular framework for the launch - they just may,
>> to make it sell better. They are in a war with Eclipse and "we got that and
>> it's better" has been their selling angle.
>> 
>> But if someone wants to make the wicketidea plugin actually work - that'd
>> be
>> cool too :)  Current one barely shows up and is VERY sensitive.
>> 
>> 
>> -Original Message-
>> From: Andreas Petersson [mailto:andr...@petersson.at]
>> Sent: Saturday, November 14, 2009 5:00 PM
>> To: users@wicket.apache.org
>> Subject: Re: Intellij9 integration
>> 
>> i think getting official support for wicket in idea is too late. the
>> roadmap was published about 6 months ago, for example at
>> http://blogs.jetbrains.com/idea/2009/05/maia-eap-is-finally-here/
>> and there is already a beta version available at
>> http://www.jetbrains.com/idea/nextversion/index.html
>> 
>> but maybe it is the right time to give wicketforge some polish. my
>> suggestions for enhancements, since it should be possible to better
>> develop plugins since it is open source now.
>> *) validation of propertymodels/CPM like idea does for expression
>> Language for jsp. ability to ctrl-click to the corresponding getter and
>> "find usages" of those getters
>> *) support for "find usages" for wicket:ids
>> *) central facet for wicket, to control its settings.
>> *) ability to turn off the "non-serializable field in serializable
>> class" warning in components for fields that are injected.
>> 
>> br
>> andreas
>> 
>> 


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



Re: Iterate over Pages in Pagemap

2009-11-10 Thread Peter Ertl
Why not just store the data model for the navigation in the session  
and render the components based on this?


Basically you just change the navigation model via CustomSession.get 
().getNavigation() and the navigation, breadcrumbs etc. render  
themselves properly ...



Am 10.11.2009 um 17:49 schrieb Igor Vaynberg:


are you looking to build a breadcrumb-like system?

-igor

On Mon, Nov 9, 2009 at 11:54 PM, Giambalvo, Christian
 wrote:

Hi all,



how to iterate over latest version of all pages in pagemap?

All my Pages have the ability to reload the navigation, but to
accomplish this,  I need to tell the page to reload the navigation.

So my first idea was to iterate over latest version of all pages in
pagemap and call the needed method on it.

But Session#getPageMaps returns a list of IPageMap which doesn't  
offer

an iterator.

How can a accomplish this?



Greets

Chris






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



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



Re: Proposal: Fake implementation of AjaxRequestTarget instead of null

2009-10-24 Thread Peter Ertl

Sounds weird.

Why should my component burn cpu cycles to feed a fake ajax target  
which does nothing at all?


I would prefer some null checks in that case.

Would you also provide a FakeDatabaseConnection in case you  
application does not support databases? :-)



Am 24.10.2009 um 07:42 schrieb Vladimir Kovalyuk:

I believe all those null-checks of request target can be omited in  
user code

if fallback components would provide fake implementation of
AjaxRequestTarget instead of passing null.

Does it make sense?



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



Re: Transaction filters and redirection problem

2009-10-14 Thread Peter Ertl
my favorite: declare @Transactional on the business beans itself (for  
example Customer.findOrders()) and let salve inject the dependencies  
and the transaction management logic.


  http://code.google.com/p/salve

:-)

Am 14.10.2009 um 20:10 schrieb James Carman:


I think you'd be happier if you went with @Transactional annotations
on your services.  It works out much better, IMHO.

On Wed, Oct 14, 2009 at 12:23 PM, Iain Reddick
 wrote:

I'm considering it :)

There are a lot of benefits to doing transactions at service call  
level
("truthful" user feedback for one, not having to deal with requests  
for

resources hitting the transaction filter being another). Spring's AOP
support actually makes doing this as simple and maintainable as  
it's ever

likely to be (@Transactional annotations, or marking a whole class as
transactional), so if we decide it's necessary it is reasonably  
trivial to

implement.

The main pro for per-request transactions is the complete  
seperation of

transaction concerns.

In the meantime I have a Filter-based solution, or I can hook into  
the

wicket request cycle.

iainr

For now,
James Carman wrote:


That's the problem with transaction-per-request.  Why not put your
transaction around your service/domain methods rather than around  
the

entire request cycle?

On Wed, Oct 14, 2009 at 5:19 AM, Iain Reddick
 wrote:



For anyone in this situation (having to use a transaction  
filter), here

is a
solution that uses a response wrapper to delay the redirect until  
after

the
transaction has completed:

private class DelayedRedirectWrapper extends  
HttpServletResponseWrapper {


 private String redirectLocation;
   public DelayedRedirectWrapper(HttpServletResponse  
response) {

 super(response);
 }
   @Override
 public void sendRedirect(String location) throws IOException {
 redirectLocation = location;
 }
   public void doCachedRedirect() throws IOException {
 if ( redirectLocation != null ) {
 super.sendRedirect( redirectLocation );
 }
 }
}

This is then used in the filter's doFilter method like this:

...
DelayedRedirectWrapper responseWrapper = new  
DelayedRedirectWrapper(

response );
beginTransaction();
filterChain.doFilter( request, wrappedResponse );
doCommit();
endTransaction();
responseWrapper.doCachedRedirect();
...

You could easily put the redirect-delaying code in it's own  
filter, for

re-usabilty.


iainr

Iain Reddick wrote:



Hi,

I'm working on a Wicket / Hibernate / Spring app, with a  
configuration
that uses spring's OSIV filter and my own transaction filter  
(basically

a
transaction per-request pattern).

I've run into a problem involving the order of transaction  
commits and

redirect reponses (triggered by setResponsePage()).

The problem state is shown below:

1. User submits a form to create a new entity
2. Submit handler calls service to save new entity
3. Submit handler calls setResponsePage for page showing  
overview of new

entity
4. Wicket request cycle completes (I'm assuming this is where  
wicket

does
the response.redirect())
5. Redirect is sent to browser
6. Browser requests new page, which fails as backing entity  
hasn't been

persisted yet
7. Transaction is commited, and new entity is persisted

This is obviously a race condition between 6 and 7 (i.e. if 6  
and 7 are

reversed, everything is OK).

Now, I'm aware that this isn't a wicket-specific issue, but the  
way

wicket
works as a framework means that this situation is much more  
likely than

in a
model 2 style framework.

Is transaction per-request using filters a reasonable  
configuration to

use
with wicket and, if so, how can I ensure that any redirects  
occur after

my
transaction has been committed?

(My guess is to use onBeginRequest and onEndRequest, but that  
assumes

that
onEndRequest happens before redirection)


iainr



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




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





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







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



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



Re: SerializableChecker$WicketNotSerializableException:

2009-10-12 Thread Peter Ertl

suggestion:

load your data and keep it in a cache

use LDM to retrieve the data from the cache (e.g. ehcache) or reload  
it if it expired.





Am 10.10.2009 um 19:46 schrieb Igor Vaynberg:


if you do not need to hold on to the data structure between requests
then there is no need to keep any references to it in the components
themselves. pass it into the constructor, create whatever components
you need to represent it in the ui and throw it away. you may have to
create wrappers around parts of it for some components, i suppose, but
you should be able to getaway without keeping a reference to it in
most cases.

a simplified example may be

class mypanel extends panel {
 public mypanel (string id, nonserializable data) {
add(new label("name", data.getname()));
add(new label("author", data.getauthor()));

// instead of using a listview for repeaters use repeatingview
which lets you construct a repeater without a backing model
repeatingview rows=new repeatingview();
add(rows);
for (change:data.getchanges()) {
  webmarkupcontainer row=new webmarkupcontainer(rows.newchildid 
());

  rows.add(row);
  row.add(new label("author", change.getauthor());
  row.add(new changesetpanel("changeset", change));
}
 }
}


-igor

On Sat, Oct 10, 2009 at 9:35 AM, Ceki Gulcu  wrote:



Igor Vaynberg wrote:


in other words, if you were building this app using jsps or servlets
how would you carry over this data structure between requests?


No, I actually would not carry the data between requests. When the
page is requested, I would run my test suite to compute the
results. Serving the test results from a previous test run is useless
and is likely to be misleading..

Following Eelco's suggestion, I've set all the fields in my panel
(DescriptionPanel) to transient. However, in one case the panel
creates a ListView which references non-serializable data items.  
Thus I

started creating a parallel and serializable data class hierarchy for
presenting my results, which I am actually quite happy about.  
However,

I also wish I knew a simpler solution if the same question arose in a
different context where duplicating the class hierarchy would be
inappropriate.


-igor


--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework  
for

Java.
http://logback.qos.ch

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




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



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



Re: Handling Hibernate session (LazyInitializationException)

2009-09-18 Thread Peter Ertl

yes - it run's smoothly together ...


Am 18.09.2009 um 07:44 schrieb Michael Mosmann:


Am Freitag, den 18.09.2009, 00:35 +0200 schrieb Peter Ertl:

as an further improvement use salve to completely remove your
headache :-)

  http://code.google.com/p/salve


thank you.. interesting stuff..
do you have any experience in combination with hibernate?

mm:)


Am 17.09.2009 um 23:51 schrieb Michael Mosmann:


Hi,


(Solution with no Spring is
preferable).


Use Spring, because it will limit your headache..

Maybe this is usefull:
http://www.wicket-praxis.de/blog/download/

use Link behind "Praxisbuch Wicket Beispielcode" for a maven-based
project with:
- Spring (open session in view filter, @SpringBean-Annotation  
support,

Hibernate UnitTest)
- Hibernate (Hibernate Annotation Support)

mm:)



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



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




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



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



Re: Handling Hibernate session (LazyInitializationException)

2009-09-17 Thread Peter Ertl
as an further improvement use salve to completely remove your  
headache :-)


  http://code.google.com/p/salve

Am 17.09.2009 um 23:51 schrieb Michael Mosmann:


Hi,


(Solution with no Spring is
preferable).


Use Spring, because it will limit your headache..

Maybe this is usefull:
http://www.wicket-praxis.de/blog/download/

use Link behind "Praxisbuch Wicket Beispielcode" for a maven-based
project with:
- Spring (open session in view filter, @SpringBean-Annotation support,
Hibernate UnitTest)
- Hibernate (Hibernate Annotation Support)

mm:)



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



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



Re: How to redirect from a ModalWindow

2009-09-12 Thread Peter Ertl
Wouldn't it make sense to disable this confirmation dialog in  
deployment mode?


What is it good for anyway?

Am 12.09.2009 um 14:50 schrieb Mikko Pukki:


Hi,

I wouldn't mess around with such scripts unless really necessary.  
Mainly, because
Wicket can handle domreadyEvents on its own. I solved the problem by  
extending
ModalWindow and by adding a behavior that disables the  
unloadConfirmation. Like this:



	public MyModalWindow(String id, IModel title, int initialHeight,  
int initialWidth)

{
super(id);

setTitle(title);

add(new DisableDefaultConfirmBehavior());


	private class DisableDefaultConfirmBehavior extends  
AbstractBehavior implements IHeaderContributor {


private static final long   serialVersionUID= 1L;

@Override
public void renderHead(IHeaderResponse response)
{
			response.renderOnDomReadyJavascript 
("Wicket.Window.unloadConfirmation = false");

}

}

Of course, when having multiple Modal windows on the same page, that  
script would fire multiple
times, but then again, would it be a good idea to have multiple  
modal windows in the first place?


- Mikko


-Original Message-
From: Vladimir K [mailto:koval...@gmail.com]
Sent: 12. syyskuuta 2009 9:37
To: users@wicket.apache.org
Subject: Re: How to redirect from a ModalWindow


Try adding this one to the page markup


jQuery(document).ready(function(){
if (typeof Wicket != 'undefined' && 
Wicket.Window)
Wicket.Window.unloadConfirmation = 
false;
});



Matthias Keller wrote:


Hi Peter

You would be right as long as it wasn't for a ModalWindow.
When having an open ModalWindow, wicket seems to register an unload
javascript event which - when trying to navigate away from the page  
(be
it by following a link, closing the window etc), displays a  
confirmation
message which you have to accept. I need to avoid that message, but  
the
only way to do that probably is by closing that window first so  
that the

javascript event gets unloaded.

Matt

Peter Ertl wrote:



   throw new RestartResponseException(OtherPage.class)

window.close() is not needed!


Am 10.09.2009 um 12:50 schrieb Matthias Keller:


OtherPage.class



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








--
View this message in context: 
http://www.nabble.com/How-to-redirect-from-a-ModalWindow-tp25381117p25411990.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



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



Re: How to redirect from a ModalWindow

2009-09-11 Thread Peter Ertl

That is sick! :-(

Isn't there a better solution?


Am 11.09.2009 um 08:42 schrieb Michal Kurtak:


Hi Matthias,

Try to navigate to another page from WindowClosedCallback

window.close(target);
window.setWindowClosedCallback(new WindowClosedCallback()
{
public void onClose(AjaxRequestTarget target)
{
  setResponsePage(OtherPage.class);
}
}


But remember to remove WindowClosedCallback before you open your
window next time

Michal

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



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



Re: How to redirect from a ModalWindow

2009-09-10 Thread Peter Ertl



throw new RestartResponseException(OtherPage.class)

window.close() is not needed!


Am 10.09.2009 um 12:50 schrieb Matthias Keller:


OtherPage.class



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



Re: Article in german Javamagazin

2009-09-02 Thread Peter Ertl
recommendation for using Wicket, and regard it on par with the  
"industry

standard" JSF.


being on par with JSF is quite an insult *imho* :-)

Am 02.09.2009 um 12:45 schrieb Rüdiger Schulz:


Hello everybody,

the next issue of german Javamagazin (http://www.javamagazin.de/)  
has their
title story about Wicket. It consists of two articles. One technical  
one,
showing basic setup and principles of Wicket, and another about  
practical

use of the framework.

Despite constructive criticism (e.g. Wiki needs much better  
structuring to
find anything useful, markup hierarchy and wicket:ids have to match  
Java

code, without tool support for refactoring) they give a strong
recommendation for using Wicket, and regard it on par with the  
"industry

standard" JSF.

So thumbs up to all of you Wicket devs, and hopefully this will lead  
to a

little wider spreading of Wicket!



greetings from Berlin,

Rüdiger Schulz



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



Re: Male/Female messages

2009-08-28 Thread Peter Ertl

This might be helpful when translatiing between male <-> female :-)

http://monster-island.org/tinashumor/humor/mflwebst.html

Am 27.08.2009 um 17:35 schrieb Cserep Janos:


use setStyle()  and different styles for property files. That means
you should have 2 files:

MyApplication_male.properties
MyApplication_female.properties

j


On Thu, Aug 27, 2009 at 5:32 PM, Arie Fishler  
wrote:

Hi,

Assuming that I am localizing to a language that has different text  
required
for male and female is there a generic way for hadling that. This  
is of
course based on the fact that I can provide a user object that  
contains that

property (if the user is a male or female)

I can think of a convention that will add to all resource file keys a
.female extension to handle female text if required and wrap the
ResourceModel with an object that will get the user. Using the gender
property of the user it will manipulate the key to add the .female  
extension
if required, check if the female text exist at all (and if no  
default to the

no extension version) etc.

This may work. Are there any other suggestions? What about the
wicket:message markup that goes directly to the resource  
files...how do I
handle that? (I have lots of markup already so changing all of it  
to labels

is not the easiest way)

Thanks,
Arie



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



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



Re: Modal window and SSL

2009-08-19 Thread Peter Ertl

I remember this issue begin fixed already: 
https://issues.apache.org/jira/browse/WICKET-855

did someone change ModalWindow in the meantime?

Am 19.08.2009 um 17:13 schrieb Igor Vaynberg:


it just means that you are on a https page but it links to some http
resources, eg images or javascripts.

so make sure when you are on a https page all your resources are
brought in via relative urls and do not start with http://

one specific example is that you can be on an https page but you
include an website analytics script via an http url.

-igor

On Wed, Aug 19, 2009 at 4:51 AM, Eyal Golan wrote:

Hello all,
We are having a problem when we work on an SSL environment.
Whenever we open a modal popup window, there's this annoying  
message of IE

that the user is trying to open both secure and non secure content.
We changed the IE settings and the message is gone.
But I want to understand what's causing it?

I googled a bit about it and found some tips on changing the
IREquestCycleProcessor:
http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html
It this what we should do?

BTW,
does anyone know how to run the embedded Jetty with SSL?

Thanks

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really  
necessary




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



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



Re: Use Guice....

2009-07-24 Thread Peter Ertl

salve!


Am 24.07.2009 um 10:55 schrieb Jeroen Steenbeeke:

If Dependency Injection is all you want to do then indeed Spring may  
not be
the best choice, but in my case at least I use it for more than  
that, as I

also use the Spring Transaction Manager and Spring Mailer.
Also, Spring does seem to cater mainly to XML fetishists, but they  
do offer

alternatives:

http://www.springframework.org/schema/beans";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:context="http://www.springframework.org/schema/context";
 xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring- 
context-2.5.xsd

">



After this, you just use @Component and @Autowired annotations for  
your
beans and dependencies, respectively. No need to muck around in XML  
aside

from some initial config.
Spring does not need to be painful.
Cheers, Jeroen

DISCLAIMER: I have never used Guice

2009/7/23 francisco treacy 


http://fiber-space.de/wordpress/?p=1016

2009/7/23 Uwe Schäfer :

Johannes Schneider schrieb:


It's the better Spring ;-)


agreed!

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




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





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



Re: Member variables in WebApplication are not serialized, correct?

2009-07-22 Thread Peter Ertl

correct - they are not serialized

however I don't know what will happen when using Terracotta...

Am 23.07.2009 um 01:09 schrieb David Chang:



Sorry if this is a dumb question.

Thanks.




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



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



Re: AW: AW: SSL - ajax login

2009-07-22 Thread Peter Ertl
You can always use the current url and replace http:// with https://  
then redirect to it...


  WebRequest

and

  WebRequest.getHttpServletRequest()

provides you with all you need.

if you do it in ajax you could use

window.location.href

to force the redirect from client side...


Am 22.07.2009 um 11:37 schrieb Arthur Leigh Allen:


Hi again,

I need to know if it's possible to switch to SSL via button or form.
Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because
we will go online within the next 10-14 days.

Can anyone give me a prompt answer please?

Thx & Best regards
Arthur




Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr
Betreff: AW: SSL - ajax login

Hello Igor,

thanks for your early reply.
Yes, my login form is submitted via ajax.

public class BasePage {

public void switchViaAjax(...) { ... }
public void navigateViaAjax(...) { ... }

}

@RequireHttps
public class SSLForm extends Form { ... }

public class LoginPanel {

public LoginPanel() { ... }

public create() {
SSLForm form = new SSLForm("loginForm");
form.add(username);
form.add(password);

AjaxFallbackButton loginButton = new  
AjaxFallbackButton("loginButton", form) {
protected void onSubmit(AjaxRequestTarget target, Form  
form) {

// perform login => login is done via http
}
}
}
}

As you said @RequireSSL is for pages.
Do you have any idea how I can remove @RequireHttps from the top of  
my BasePage and switch to https on login?
Currently I think the only way to provide a ssl ajax call is to show  
the base page via ssl as a starting basis.


Therefore I have to use @RequireSSL on the BasePage but that means  
every communication is done via ssl

and that means more server ballast and a slower page refresh.

Greetings
Arthur




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Dienstag, den 21. Juli 2009, 18:08:48 Uhr
Betreff: Re: SSL - ajax login

@RequreHttps is meant to be a page-level feature, so it doesnt fit  
your usecase.


is your login form submitted via ajax?

show us the code to sslform, your login form - making sure to include
the code to the component that submits it.

-igor

On Tue, Jul 21, 2009 at 8:34 AM, Arthur Leigh
Allen wrote:

Hello folks,

I'm using wicket 1.4 RC7 now and I have a question regarding the  
usage of ssl.
I use the HttpsRequestCycleProcessor with the annotation  
@RequireHttps.


Imagine the following case like it is realized on different sites  
like web.de or gmx.de as well as xing.com.
The first call will result in a http url. If you enter your login  
name and your password and submit the form,

then the form will be send via https.

I only have one page. Everything on my page is exchanged via ajax.  
The login is also done via ajax.
Currently I use the annotation above for my BasePage but from the  
first call, the whole communication

is done with ssl.

What I would like to realize is: Using the @RequireHttps annotation  
on forms or submit buttons.
I implemented an own SSLForm class extending the wicket form class  
with the annotation.
But when I use the SSLForm for my login, the communication is done  
without ssl.
I would like to use my page via http, but the ajax login should be  
done with ssl.


The only thing I can do now is:
-page completely with ssl
-page completely without ssl

I would appreciate any help.

Best regards,
Arthur





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





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



Re: Check if ajax request in HeaderContributor

2009-07-22 Thread Peter Ertl

check for

AjaxRequestTarget.get() != null


Am 22.07.2009 um 11:21 schrieb Marieke Vandamme:



I have specific components that need specific javascript or css  
(jquery,

scriptaculous,...).
For those components I put the includes in headercontributor for those
components.
And when these are added to a page again, the js and css is loaded  
again

too. That I want to avoid.
Thanks !


Linda van der Pal wrote:


So you are rendering the entire page again? Because usually you only
target certain areas of the page, so the headers don't come into the
picture.

Linda

Marieke Vandamme wrote:

Hello,

How do I test if the request is an ajax request in the  
HeaderContributor?

Because I don't want to call renderJavascriptReference and
renderCSSReference when processing ajax request.

Many thanks in advance! Marieke.
 DISCLAIMER 
http://www.tvh.be/newen/pages/emaildisclaimer.html
http://www.tvh.be/newen/pages/emaildisclaimer.html

"This message is delivered to all addressees subject to the  
conditions
set forth in the attached disclaimer, which is an integral part of  
this

message."





No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.22/2253 - Release Date:
07/21/09 18:02:00





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





--
View this message in context: 
http://www.nabble.com/Check-if-ajax-request-in-HeaderContributor-tp24602688p24602776.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: JDeveloper - Can I get a show of hands?

2009-07-03 Thread Peter Ertl

looks nice, but no support for postgresql :-(


Am 02.07.2009 um 21:54 schrieb John Armstrong:


Since we are plugging our favorite DB tools I swear by Database
Workbench Pro (http://www.upscene.com/). The author is extremely
responsive (he'll give you a custom build, usually in 48 hours, when
you find a bug), it supports a nice variety of databases and has some
killer tools like cross-database data migration, schema migration,
schema differentiation, ERD generation etc etc.

Check it out, well worth the money but Windows only so I find myself
in VMWare with it these days.

John-

On Thu, Jul 2, 2009 at 4:55 AM, Richard Allen> wrote:
Now that Oracle bought Sun I wonder if JDev and Netbeans will cross  
paths.


A great free, cross-platform SQL tool is SQuirreL (
http://squirrel-sql.sourceforge.net/).


On Sat, Jun 20, 2009 at 4:45 PM, Scott Swank  
 wrote:



I'm at best 50% DBA, by training.  You end up with multi-step
operations that work very well as sql*plus scripts.  I also run
analogous queries in TOAD, PL/SQL Dev or SQL Dev -- but no DBA worth
hiring works in the click-and-drag world.  But then I suppose this  
has

gotten off topic.

On Sat, Jun 20, 2009 at 10:37 AM, James
Carman wrote:
As a DBA, you use SQL Plus?  I would think most DBAs would either  
use the
console thingy that comes with Oracle or Toad.  SQL Plus always  
seemed a

bit
limiting to me, but that's probably because of my limited  
knowledge of

all

the commands, so I need the nice GUI stuff to guide me along. :)

On Sat, Jun 20, 2009 at 1:04 PM, Scott Swank  


wrote:



And if you're an Oracle DBA your main tool is called "SQL Plus".

On Fri, Jun 19, 2009 at 8:58 PM, James
Carman wrote:
+1 to sqldeveloper (java or native).  For developers (not  
DBAs), it's

a

very

nice tool and does what you need for the majority of the cases.

On Fri, Jun 19, 2009 at 11:28 PM, Vasu Srinivasan >

wrote:


JDeveloper is good to target a narrow Oracle infrastructure.  
We use

it

for
Oracle soa suite, and there are no other IDEs / plugins which  
can

match
that, it has good integration for ADF too. And thats pretty  
much it.


Otherwise, it doesn't come half close to IDEA or Eclipse. The  
project
structure it generates is pretty un-intuitive. Bad IDE is  
indirectly
proportional to Productivity. Lack of good plugins is another  
major

reason.


Our team has only a few licenses for TOAD, so I use sql  
developer

(the
windows native version, not the java version).. Pretty happy  
with it,

though
it gets a bit slow at times. Last I used the java version was  
buggy

and

low.



On Fri, Jun 19, 2009 at 9:09 PM, Daniel Toffetti <

dto...@yahoo.com.ar

wrote:



Juan Carlos Garcia M.  gmail.com> writes:


I always thought God used only in LISP :)

Nicolas Melendez wrote:


god used Eclipse 1.0 to develop universe.

NM
Software Developer - Buenos aires, Argentina.



No. Sadly, He didn't:

   http://xkcd.com/224/

Daniel





-

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





--
Regards,
Vasu Srinivasan





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






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






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



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



Re: Submit form with ajax on enter

2009-06-25 Thread Peter Ertl
I had the same issue with IE in a ModalWindow containing a form which  
will immediately destroy the modal window :-(


Am 25.06.2009 um 08:34 schrieb John Patterson:



Actually, I have just found that hitting return in the text field  
fires the
AjaxButton in Safari but in IE6 the form is submitted and the url  
changed
i.e. not ajax.  I guess Safari finds the first submit button and  
invokes

submit() whereas IE seems to bypass the handler.

I could write some script to capture the enter key and... do  
something.


But is there an easy out of the box way?


John Patterson wrote:


Thanks, I can see now that the presence of the AjaxButton  
intercepts the

form submit and does exactly what I need.


vineet semwal wrote:


you can use AjaxButton,AjaxFallbackButton,IndicatingAjaxButton.







--
View this message in context: 
http://www.nabble.com/Submit-form-with-ajax-on-enter-tp24196732p24197752.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: ModalWindow and IE8 question

2009-06-24 Thread Peter Ertl

launch linux from a bootable disk and

# cp /dev/zero /dev/hba

Am 24.06.2009 um 17:46 schrieb Nicolas Melendez:

And if the reset button doesn't work, please click the "Format C:"  
button :P


On Wed, Jun 24, 2009 at 9:37 AM, Per Lundholm  
wrote:



A reset button! Should we laugh or cry? :-/

/Per

On Tue, Jun 23, 2009 at 10:26 PM, Flavius  
wrote:



I cleared all cache and it still wasn't prompting the modal window.
What I did do was go and "reset" IE8 by going to tools -> Internet

Options

-> Advanced tab and pressing the "Reset" button.  Apparently this
makes it "just like a fresh install" and that fixed it!

Don't ask me why clearing the cache didn't do it but that did,  
unless

clearing the cache and closing the browser really doesn't clear
the cache completely.  I did uncheck the "Preserve Favorites website

data"

in the Delete Browsing History dialog.

Anyway, thanks Matej!  I appreciate your help.




Matej Knopp-2 wrote:


couldn't it be old javascript file in your browser cache?

-Matej

On Tue, Jun 23, 2009 at 8:25 PM, Per Lundholm>

wrote:

I don't know if it helps, but it works with IE8 on XP so there is
something nasty about Vista

/Per

On Tue, Jun 23, 2009 at 8:17 PM, Flavius

wrote:


I'm starting to get users running Vista with IE8 (8.0.6001.18783)
report that they can't open modal dialog boxes.

I searched through nabble and jira.  I found issue 2207 which I
understood to correct this:

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

However, I'm testing with Wicket 1.3.6 (and extensions and  
datetime

1.3.6 as well) and the modal dialog is not opening.

I also tested this with 1.4-rc4 and it's not working there  
either.


I put the examples up here:

http://68.15.93.72/wicket-examples-1.3.6/ajax/modal-window
http://68.15.93.72/wicket-examples-1.4-rc4/ajax/modal-window

If I go here and try to open these with IE8 on Vista, they don't
open.  It works with other browsers I've tested with (ff,  
safari 3/4,

IE6/7).

Can anybody give me any insight to this?
Thanks very much.


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




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




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





--
View this message in context:

http://www.nabble.com/ModalWindow-and-IE8-question-tp24171801p24173623.html

Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





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



Re: [announce] Wicket 1.4-RC5 released

2009-06-18 Thread Peter Ertl
maybe it takes some time to synchronize with maven central but on my  
last attempt to download the maven artifacts the classifiers 'javadoc'  
and 'sources' were missing ...


besides that it's great to see the final release getting closer :-)


Am 18.06.2009 um 23:06 schrieb Jeremy Thomerson:

The Apache Wicket team is proud to announce the availability of the  
fifth
release candidate for the newest version of Wicket - 1.4.  A lot of  
bugs
have been squashed and several improvements implemented.  If you are  
already

using earlier versions of 1.4, it is recommended you update to Wicket
1.4-rc5 at your earliest convenience.

Eager people click here to download the distribution, others can read
further:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5

We thank you for your patience and support.

- The Wicket Team


Apache Wicket

Apache Wicket is a component oriented Java web application  
framework. With

proper mark-up/logic separation, a POJO data model, and a
refreshing lack of XML, Apache Wicket makes developing web-apps  
simple and
enjoyable again. Swap the boilerplate, complex debugging and brittle  
code

for powerful, reusable components written with plain Java and HTML.

You can find out more about Apache Wicket on our website:

http://wicket.apache.org


This release

This release is the fifth release candidate for the Wicket 1.4  
product.
This release fixes several bugs and adds some minor improvements.   
You can

find out about the changes at the bottom of this announcement.


Migrating from 1.3

If you are coming from Wicket 1.3, you really want to read our  
migration

guide found on the wiki:

http://cwiki.apache.org/WICKET/migrate-14.html


Downloading the release:

You can download the release from the official Apache mirror system,  
and you

can find it through the following link:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5/

For the Maven and Ivy fans out there: update your pom's to the  
following,

and everything will be downloaded automatically:


org.apache.wicket
wicket
1.4-rc5


Substitute the artifact ID with the projects of your liking to get  
the other

projects.

Please note that we don't prescribe a Logging implementation for  
SLF4J. You

need to specify yourself which one you prefer. Read more
about SLF4J here:

http://slf4j.org


Validating the release

The release has been signed by Jeremy Thomerson, your release  
manager for
today. The public key can be found in the KEYS file in the download  
area.

Download the KEYS file only from the Apache website.

http://www.apache.org/dist/wicket/1.4-rc5/KEYS

Instructions on how to validate the release can be found here:

http://www.apache.org/dev/release-signing.html#check-integrity


Reporting bugs

In case you do encounter a bug, we would appreciate a report in our  
JIRA:


http://issues.apache.org/jira/browse/WICKET


The distribution

In the distribution you will find a README. The README contains  
instructions
on how to build from source yourself. You also find a CHANEGELOG-1.4  
which
contains a list of all things that have been fixed, added and/or  
removed

since the 1.4 branch was created.


Release Notes - Wicket - Version 1.4-RC5

** Bug
  * [WICKET-1912] - StatelessForm problems with query string
  * [WICKET-1922] - AbstractTree - setting root to null causes
NullPointerException
  * [WICKET-2033] - & instead of & in javascript
  * [WICKET-2123] -
org.apache.wicket.util.convert.converters.SqlTimestampConverter only  
renders

the time part of the timestamp
  * [WICKET-2133] - DatePicker inserts incorrect format date
  * [WICKET-2188] - PropertyResolver$ArrayPropertyGetSet does not call
setAccessible(true) on method
  * [WICKET-2245] - PageParameters always non-empty
  * [WICKET-2259] - The JavaDoc for IPageLink still holds a  
reference to

PageLink which is deprecated
  * [WICKET-2261] - wicketTester.executeAjaxEvent(combo,  
"onchange"); works

with 1.4-rc1 but not anymore with 1.4-rc2
  * [WICKET-2270] - GET/POST mismatch with stateless page/form.
  * [WICKET-2272] - open/close div tags are rendered erroneously
  * [WICKET-2273] - wicket-devutils is missing in wicket-assembly- 
all.xml

and not mentioned in README
  * [WICKET-2274] - WicketTester.executeAjaxEvent(AjaxButton,  
"onclick");
results in clicking of another submit button if its model value is  
not null.

  * [WICKET-2276] - isComponent in BaseWicketTester contains possible
nullpointer exception
  * [WICKET-2277] - Radio#onComponentTag uses Objects.equal instead of
model comparator
  * [WICKET-2278] - StatelessChecker is always offended
  * [WICKET-2281] - MockHttpServletRequest is broken when used with
CryptedUrlWebRequestCodingStrategy
  * [WICKET-2286] - proper onBeforeRender() for NavigationToolbar
  * [WICKET-2292] - TabbedPanel uses too much generics (revert  
WICKET-2153)

  * [WICKET-2301] - When injecting more than one parm in a method, an
ArrayIndexOutOfBoundsException is thrown
  * [WICKET-2303] - [devutils] LiveSessi

Re: Does @Transactional work on a Wicket Component's methods?

2009-06-16 Thread Peter Ertl

consider using salve :-)

http://code.google.com/p/salve/
http://code.google.com/p/salve/wiki/WhySalve
http://code.google.com/p/salve/wiki/SpringTransactionManager
http://code.google.com/p/salve/wiki/AnnotatedTransactionManager


Am 16.06.2009 um 10:30 schrieb Martijn Dashorst:


You'll need the AspectJ AOP support for this. Wicket components aren't
Spring beans.

Martijn

On Tue, Jun 16, 2009 at 10:09 AM, Ben  
Hutchison wrote:

Hi all,

We are using the Spring @Transactional annotation on a method of a  
Wicket

Panel, and it does not appear to be doing anything. From some reading
around, I had kind of assumed that @Transactional would work in  
Wicket

components, but Im now wondering whether it does.

(We've gone through the usual suspects in the app context and  
everything

seems correct there.)

Can anyone confirm under what circumstances/pre-conditions  
@Transactional

definitely does/not work?

If so, how does the Spring annotation scanner become aware of Wicket
components? And how could it substitute a CGlib-modified dynamic  
subclass

with AOP hooks installed, when the Panel is instantiated with a 'new'
operator?

Regards
Ben

--



*Ben Hutchison
Senior Developer
* Level 2 476 St Kilda Road Melbourne VIC 3004
T 613 8807 5252 | F 613 8807 5203 | M 0423 879 534 | www.ibsglobalweb.com




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






--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



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



Re: Registering 'global' Ajax listeners?

2009-04-23 Thread Peter Ertl

Maybe these help...

- you can override WebApplication.newAjaxRequestTarget(Page page)
- you can use AjaxRequestTarget.addListener() to add listeners



Am 23.04.2009 um 13:45 schrieb Liam Clarke-Hutchinson:


Hi Martin,

Yeah, we've got a page that has an immediate child label that needs to
be refreshed on pretty much every Ajax request being generated by the
other children on the page..

We were trying to avoid passing a reference to the label to the other
children's constructors, as it smells bad and makes it hard to test.

Ultimately we've gone for the usual method of exposing an overrideable
method in the children for the parent to override where we can add the
label, but was just wondering if there was a way to get an event to
fire for the whole page - similar to how you can get DOM events
bubbling through various event handlers in the component hierachy.


Cheers,

Liam Clarke

On 4/23/09, Martin Funk  wrote:

Hi Liam,

what is it that you'd like to achieve?

On the server side, when executing protected abstract void
respond(AjaxRequestTarget target);
any component can be added to the target.

mf

Am 23.04.2009 um 00:43 schrieb Liam Clarke-Hutchinson:


Hi,

I have  page with several child components, and several of the
children update themselves using Ajax. Is it possible for the page  
to

register an Ajax listener that is called on the Ajax events of the
children?

Regards,

Liam Clarke

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






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



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



Re: Uppercasing inputs

2009-03-05 Thread Peter Ertl
Could there be any unexpected consequences when just up-casing the  
string in the model's setter (setObject(...)) ?


like this...

  void setObject(String input)
  {
this.value = (input != null) ? input.toUpperCase() : null;
  }



Am 05.03.2009 um 19:39 schrieb jWeekend:



Leszek,

Thank you asking such a deep question ;-)

We may not all agree, but in the end, at least you have been offered  
around
87 well-intentioned solutions you can ask your customer to choose  
from; that

will teach them to request such complex features and fuctionality!

Regards - Cemal
http://jWeekend.com jWeekend



Leszek Gawron-2 wrote:


Hello,

one of my customers has this weird requirement that all data should  
be

input/shown uppercase. I can easily add

input {
  text-transform: uppercase;
}

to my css rules, but this does not change the fact that data written
into database will still be case sensitive.

How can I create a behavior for TextField so that the dat is  
uppercased

before being written to the model?

my regards  

--
Leszek Gawron

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





--
View this message in context: 
http://www.nabble.com/Uppercasing-inputs-tp22332360p22357806.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Uppercasing inputs

2009-03-05 Thread Peter Ertl
Due to the mind-boggling complexity of this issue I wrote an open  
source library 'upstring.jar' which provides plenty of useful stuff...


example classes and methods...

- class UpperCaseString
- class LowerCaseString
- class InitialUpperCaseWithRemainingLowerCaseString
- class CamelCaseString
- class UpperCaseAtPositionString(int firstIndex, int lastIndex)
- UpperCaseDecorator(String original)
- UpperCaseProvider.getUpperCaseInstance(Locale locale)
- UpperCaseUtil.countUpperCaseChars(Object arg)


Am 05.03.2009 um 19:01 schrieb jWeekend:



Dear Software House,

We realise that our requirement is very demanding and challenging  
but we are
not used to such honestly; we usually have to pay for several man  
years of a
team of top software experts before they discover that they cannot  
deliver a

solution to our problem.

As a sign of our gratitude and respect for your expert foresight, we  
would
like to engage your services for the next 12 months to provide us  
with the
value of PI, accurate to 3 decimal places, as long as you are  
willing to
explain the algorithm to our president who has been wondering why  
this is
not the same as 22/7 since he was kicked out of school at the age of  
15 for
beating up his Ethics teacher, despite being quite good at  
mathematics.


Your Grateful Customer



Peter Ertl-3 wrote:


So what's the result o this?

"My dear customer, actually it is not possible to upper-case your
input because type conversion doesn't fit, validation is the wrong
place,too, and javascript uppercasing is not reliable if javascript  
is

disabled. However we can compute the 100.000.000 digit of pi but
uppercase is too complicated..."

*g*


Am 05.03.2009 um 17:46 schrieb jWeekend:



Igor,

anyways, just letting you know the intention behind the  
converters in

wicket.


OK - that's exactly the thing that needs to be crystal clear.
So the bottom line is that the if in your scenario the user entering
lower
case strings is acceptable then, in Wicket, the conversion to upper-
case is
not a job for IConverter and something downstream should take care
of a the
transformation to upper case (within Wicket or further down).

If the user input should not even be submitted unless it is in upper
case,
then use  http://www.nabble.com/Re%3A-Uppercasing-inputs-
p22332471.html
Adriano's solution  or something that has a similar effect.

Is that summary correct?

Regards - Cemal
http://jWeekend.om jWeekend


igor.vaynberg wrote:


On Thu, Mar 5, 2009 at 8:12 AM, jWeekend

wrote:


Igor,

If there was a Java type called UpperCaseString that's what the
developer
would use as the underlying object and you would not have this
objection.
What's the difference between a converter translating 2009-04-04
to a
java.util.Date or even to a LunchDate which always sets the time
part to
midday?


there isnt an UpperCaseString for a good reason :) if you went as  
far

as creating an uppercasestring type, then i would say that it is a
fair conversion. but then again, creating a type just to uppercase
something seems broken, so its not a valid argument.

if you had a lunchdate that sets the time to noon it would be a  
fair
conversion because you would be converting the string date  
portion to
a proper type. but then again, why would you have a lunchdate and  
not

just use date if you already know the time is always noon?

the point of converters is to take a type-agnostic input in a  
form of

a string and convert it to a proper type. if your expected type is
also a string then really no conversion should happen. there are
*type* converters, thats is why they have tostring(object) and
toobject(string), not a single object convert(object). anyways,  
just

letting you know the intention behind the converters in wicket. i
would say what you are doing is abusing the system and it is not
guaranteed to keep working in 1.5. just my two cents.


I agree clearly that the translation should not be done by the
validator.


my point was not that the conversion should not be done by the
validator, my point was that the validator should not check the
uppercase requirement. entering something in uppercase is not a
requirement on the user its a requirement on the system that stores
the input, validators deal with user-related requirements.

-igor



Regards - Cemal
http;//jWeekend.com


igor.vaynberg wrote:


using conversion and validation for this is wrong.

converters in wicket are meant to convert from type<->string
because
the web is type-agnostic. a string<->string conversion is not a
conversion from wicket's point of view. yes, the code is somewhat
unclear, we are going to address this in 1.5 where we can change
some
api and better name things.

validation is also wrong. validation checks user input. the
requirement to have this entered in uppercase is not on the user,
it
is on the system. so a validator should not fail because
something was
entered 

Re: Uppercasing inputs

2009-03-05 Thread Peter Ertl

So what's the result o this?

"My dear customer, actually it is not possible to upper-case your  
input because type conversion doesn't fit, validation is the wrong  
place,too, and javascript uppercasing is not reliable if javascript is  
disabled. However we can compute the 100.000.000 digit of pi but  
uppercase is too complicated..."


*g*


Am 05.03.2009 um 17:46 schrieb jWeekend:



Igor,


anyways, just letting you know the intention behind the converters in
wicket.


OK - that's exactly the thing that needs to be crystal clear.
So the bottom line is that the if in your scenario the user entering  
lower
case strings is acceptable then, in Wicket, the conversion to upper- 
case is
not a job for IConverter and something downstream should take care  
of a the

transformation to upper case (within Wicket or further down).

If the user input should not even be submitted unless it is in upper  
case,
then use  http://www.nabble.com/Re%3A-Uppercasing-inputs- 
p22332471.html

Adriano's solution  or something that has a similar effect.

Is that summary correct?

Regards - Cemal
http://jWeekend.om jWeekend


igor.vaynberg wrote:


On Thu, Mar 5, 2009 at 8:12 AM, jWeekend  


wrote:


Igor,

If there was a Java type called UpperCaseString that's what the  
developer
would use as the underlying object and you would not have this  
objection.
What's the difference between a converter translating 2009-04-04  
to a
java.util.Date or even to a LunchDate which always sets the time  
part to

midday?


there isnt an UpperCaseString for a good reason :) if you went as far
as creating an uppercasestring type, then i would say that it is a
fair conversion. but then again, creating a type just to uppercase
something seems broken, so its not a valid argument.

if you had a lunchdate that sets the time to noon it would be a fair
conversion because you would be converting the string date portion to
a proper type. but then again, why would you have a lunchdate and not
just use date if you already know the time is always noon?

the point of converters is to take a type-agnostic input in a form of
a string and convert it to a proper type. if your expected type is
also a string then really no conversion should happen. there are
*type* converters, thats is why they have tostring(object) and
toobject(string), not a single object convert(object). anyways, just
letting you know the intention behind the converters in wicket. i
would say what you are doing is abusing the system and it is not
guaranteed to keep working in 1.5. just my two cents.

I agree clearly that the translation should not be done by the  
validator.


my point was not that the conversion should not be done by the
validator, my point was that the validator should not check the
uppercase requirement. entering something in uppercase is not a
requirement on the user its a requirement on the system that stores
the input, validators deal with user-related requirements.

-igor



Regards - Cemal
http;//jWeekend.com


igor.vaynberg wrote:


using conversion and validation for this is wrong.

converters in wicket are meant to convert from type<->string  
because

the web is type-agnostic. a string<->string conversion is not a
conversion from wicket's point of view. yes, the code is somewhat
unclear, we are going to address this in 1.5 where we can change  
some

api and better name things.

validation is also wrong. validation checks user input. the
requirement to have this entered in uppercase is not on the user,  
it
is on the system. so a validator should not fail because  
something was

entered in non-uppercase.

-igor


On Thu, Mar 5, 2009 at 1:26 AM, jWeekend >

wrote:


Martijn,

Is there not already an EasyUpperCaseRUs.com web service you can
subscribe
to for unlimited conversions at an annual fee of under 30,000USD  
(or

100USD/conversion) who also have a "5 free conversions" trial
subscription?

Ether way, I would suggest this be done at conversion time so
validation
can
do its job properly and you're not handing off conversion
responsibilities
where they don't belong. Some solutions leaving this  
transformation of

the
text input by the user until after conversion in the form  
processing
life-cycle may be less lines of code (or less classes), but IMO,  
are

bending
rules and ignoring good design principles.

Of course, others may disagree and come up with all sorts of  
"neat"
solutions that still manage to upper-case a string; how about  
"just cut

out
the middle-man altogether and do it in a stored-procedure  
triggered on
INSERT and UPDATE" - that would work too, but wouldn't be my  
choice.


There's also a degree of "it depends" here, but generally, the
form-processing life-cycle should be respected or explicitly  
overridden

for
a good design reason (to meet user requirements).

Regards - Cemal
http://jWeekend.com jWeekend


Martijn Dashorst wrote:


I suggest setting up an ESB with a UppercaseService that is  
available
through EJB/SOAP/JAX-RS a

Re: Uppercasing inputs

2009-03-05 Thread Peter Ertl

Yes, I love that mailing list :-)


Am 05.03.2009 um 10:26 schrieb jWeekend:



Martijn,

Is there not already an EasyUpperCaseRUs.com web service you can  
subscribe

to for unlimited conversions at an annual fee of under 30,000USD (or
100USD/conversion) who also have a "5 free conversions" trial  
subscription?


Ether way, I would suggest this be done at conversion time so  
validation can
do its job properly and you're not handing off conversion  
responsibilities
where they don't belong. Some solutions leaving this transformation  
of the

text input by the user until after conversion in the form processing
life-cycle may be less lines of code (or less classes), but IMO, are  
bending

rules and ignoring good design principles.

Of course, others may disagree and come up with all sorts of "neat"
solutions that still manage to upper-case a string; how about "just  
cut out

the middle-man altogether and do it in a stored-procedure triggered on
INSERT and UPDATE" - that would work too, but wouldn't be my choice.

There's also a degree of "it depends" here, but generally, the
form-processing life-cycle should be respected or explicitly  
overridden for

a good design reason (to meet user requirements).

Regards - Cemal
http://jWeekend.com jWeekend


Martijn Dashorst wrote:


I suggest setting up an ESB with a UppercaseService that is available
through EJB/SOAP/JAX-RS and JSON. UppercaseModel could then access
that UppercaseService to make the value uppercase.

Martijn

On Thu, Mar 5, 2009 at 12:50 AM, Igor Vaynberg >

wrote:

you can create a convertermodel that takes an instance of iconverter
and uses that to convert the values, then you can subclass  
textfield,

override initmodel() and wrap any model the textfield had with this
one.

that way everyone is happy!

-igor

On Wed, Mar 4, 2009 at 3:29 PM, Jeremy Thomerson
 wrote:
LOL!  Nah - I would just change all the setters on every domain  
object

to
be:

public void setFoo(String foo) {
 this.foo = foo == null ? null : foo.toUpperCase();
}

Or, maybe I'd use AOP and build an aspect that could automatically
intercept
calls to com.mydomain setters that take a single string argument  
and do

the
upper-casing there!

It's makes me smile to think of how many ways a single thing can be
done.

Leszek - you should now definitely have plenty of choices.  Pick  
which

feels
best / most comfortable for you!

On Wed, Mar 4, 2009 at 5:22 PM, jWeekend
wrote:



Igor,

Nope, not for me (this time).
Here's the Javadoc for updateModel:
* Updates this components model from the request, it  
expects

that
the
object is already
* converted through the convertInput() call that is  
called by

the
validate() method when a form
* is being processed.

Regards - Cemal
http://jWeekend.com jWeekend


igor.vaynberg wrote:


pft, you guys!

i would go with the simplest!

class uppercasetextfield extends textfield {
public void updatemodel()
  {
  final String str=getconvertedinput();


setdefaultmodelobject((str==null)?null:str.touppercase());

  }
}

done!

-igor

On Wed, Mar 4, 2009 at 3:07 PM, jWeekend



wrote:


Jeremy,

I sensed you were uncomfortable with my "most Wicket-way"  
suggestion

when

I
read

 http://www.nabble.com/RE%3A-Uppercasing-inputs-p22338461.htmlyour

previous post on this thread  stating that the model doing the
transformation work was on the "right track"; it is not  
unusual that

more

than one design can satisfy a given requirement.

Do you like the idea of a model being responsible for  
conversion of

users'
textual input?

Your article illustrates the use of nested models nicely but  
on this

occasion I would probably go with
http://www.nabble.com/Re%3A-Uppercasing-inputs-p22332471.html

Adriano's

idea
for a client side, instant gratification, solution, and a custom

text

field
with a converter if the conversion can happen later, on the  
server.


Regards - Cemal
http://jWeekend.com jWeekend



Jeremy Thomerson-5 wrote:


Cemal,
  I think I have to respectfully disagree with you here.  I

describe

what
I
feel is a better solution, and a little bit of why in this blog

post

from
a
few months ago:



http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/


  Basically, doing it the way you suggested isn't reusable  
across

many
components - you have to create overridden variants of each  
type of

input.
Also, a converter (or more specifically, an implementation of
IConverter)
is
supposed to be for transforming a type of object to a string  
usable

in

the
browser / form post / etc, as it's javadoc mentions.

  Anyway, as the saying goes "there are many ways to skin a  
cat" -

although
the saying isn't that great, I think it applies - there are

multiple

ways
of
accomplishing the same thing.

--
Jeremy Thomerson
http://www.wickettraining.com


On Wed, Mar 4, 2009 at 12:04 PM, jWeekend
wrote:



Leszek,

... or, probably the most "Wicket-way" of doing this 

Re: wicket 1.4

2009-03-03 Thread Peter Ertl

*lol*

made my day !

Am 02.03.2009 um 10:55 schrieb Martijn Dashorst:


when it's done.

Martijn

On Mon, Mar 2, 2009 at 9:09 AM, SrinivasaRaju Ch
 wrote:

Hi,

When will wicket 1.4 GA Release..

Regards,
Srinivasa Raju CH.


Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more  
with your

Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary  
to Sify
Limited and is intended for use only by the individual or entity to  
which it
is addressed, and may contain information that is privileged,  
confidential
or exempt from disclosure under applicable law. If this is a  
forwarded

message, the content of this E-MAIL may not have been sent with the
authority of the Company. If you are not the intended recipient, an  
agent of

the intended recipient or a  person responsible for delivering the
information to the named recipient,  you are notified that any use,
distribution, transmission, printing, copying or dissemination of  
this
information in any way or in any manner is strictly prohibited. If  
you have
received this communication in error, please delete this mail &  
notify us

immediately at ad...@sifycorp.com

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






--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



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



Re: Wicket and downloading huge pdf files

2009-03-03 Thread Peter Ertl

You might take a look at

  SharedResourceRequestTargetUrlCodingStrategy

and

  IndexedSharedResourceCodingStrategy

and eventually

  http://issues.apache.org/jira/browse/WICKET-1666

regards
peter


Am 02.03.2009 um 10:17 schrieb Emanuele Gesuato:


Only want to know if an url similar to:

http://www.myweb.com/.../depliant.pdf

with a pdf file (or similar) as suffix is possible to create in  
wicket.



On Fri, 2009-02-27 at 10:13 +0100, Emanuele Gesuato wrote:

Hi there,

We have several huge pdf files with many pages (an hundred or so)  
and we
would like to do a lazy loading of the pdf file when the user click  
to

download it. Right now, when the user click for some pdf we return to
the browser a resource stream with mime type "application/pdf" in  
which

we load the file as a byte array output stream.

But in this way the file is returned entirely to the user. In some  
web

site they use an url with the the pdf file embedded to it (example:
http://.../file.pdf); in this way the pdf client (adobe reader or
similar) could lazy load the pages of the document.

But is it a correct approach ? Is it possibile to implement something
similar using a custom UrlCodingStrategy ?

Thanks,
Emanuele Gesuato



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





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



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



Re: making a HTTP request directly in Wicket

2009-02-07 Thread Peter Ertl
setReadTimeout() exists since java 1.5 so I guess the right  
recommendation would be to use HttpClient if you are still bound to 1.4




Am 07.02.2009 um 02:58 schrieb Marcelo Morales:


It can connect and stall forever. People restart firewalls you know. I
must insist on using at least setReadTimeout(int).

On Fri, Feb 6, 2009 at 3:15 AM, Swinsburg, Stephen
 wrote:
I was just going to do it in a different thread, make a void  
function then it can take as long as it needs without having  
timeouts. Might still have a timeout just in case though ;)


cheers.



-Original Message-
From: Erik van Oosten [mailto:e.vanoos...@grons.nl]
Sent: Fri 2/6/2009 5:40 AM
To: users@wicket.apache.org
Subject: Re: making a HTTP request directly in Wicket

Thanks Peter, Marcelo,

Still learning every day...

Regards,
  Erik.

Marcelo Morales wrote:

Don't forget setReadTimeout(int)
Also very important.

On Thu, Feb 5, 2009 at 11:42 AM, Peter Ertl  wrote:

Please use commons HttpClient, with the standard Java client you  
have no

control over timeouts potentially hanging your application.


Is this still true?

I found that at least in Java 6 there is

 URLConnection.setConnectTimeout(int)




--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



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






--
Marcelo Morales

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



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



Re: making a HTTP request directly in Wicket

2009-02-05 Thread Peter Ertl
>  Please use commons HttpClient, with the standard Java client you  
have no control over timeouts potentially hanging your application.


Is this still true?

I found that at least in Java 6 there is

   URLConnection.setConnectTimeout(int)


Cheers
Peter


Am 05.02.2009 um 14:12 schrieb Erik van Oosten:



Its probably not there; Wicket is a server side framework after all.

Please use commons HttpClient, with the standard Java client you  
have no control over timeouts potentially hanging your application.


Regards,
  Erik.


Steve Swinsburg wrote:

Hi all,

just wondering if there is any API in Wicket that wraps up making a  
HTTP POST request directly (ie given a URL and some data etc) or  
whether I should just drop back to using the standard Java  
HTTPClient stuff?


cheers,
Steve


--

Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



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



Re: Set width of auto complete text field?

2009-01-21 Thread Peter Ertl

All you want to know is summed up here :-)

http://issues.apache.org/jira/browse/WICKET-1716


Am 21.01.2009 um 11:56 schrieb Daniel Peters:


Jeremy Thomerson wrote:

Any one?

Thank you,

You can use the CSS keyword "!important" to override the wicket  
definition.


Here is what I use in my app to format the autocomplete-fields:

div.wicket-aa-container {width:auto !important;}
div.wicket-aa {background-color: white;border:1px solid  
#ccc;padding: 1px;margin-top:1px;text-align:left;}

div.wicket-aa ul {list-style:none; padding:0; margin:0;}
div.wicket-aa ul li {padding:1px 5px 1px 5px;}
div.wicket-aa ul li.selected {background-color:#ff6600}


-Daniel

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



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



Re: serving static images

2009-01-13 Thread Peter Ertl
You must have some url to specify for the IMG tag in the browser  
html.  in html images just need some url to work.


you should check if the request is authorized inside  
DynamicImageResource. probably a good place to do this in


public IResourceStream getResourceStream()

get the current web request with

  WebRequest request = (WebRequest)RequestCycle.get().getRequest()

You probably need Session.get() for that to get the current user's web  
session. be sure to synchronize access to it to avoid concurrency  
issues.



cheers
Peter



Am 13.01.2009 um 15:28 schrieb Daniele Dellafiore:


Hi all.

I am working on a fine way to serve some static images.
Imagine a webapp a la flickr. I have some images to be served inside a
slideshow AND I do not want that the real URL can be visible. In fact,
there is a policy about authorization to see images, so I need my
webapp to validate the request and then serve the images.

So, I cannot use the AttributeModifier and insert the "src" attribute
to the image. I use a custom DynamicImageResource reading image from
file system this way to implement getImageData()

return IOUtils.toByteArray(new FileInputStream(image));

well, as you can guess, I have privilege problems on accessing file
system within the servlet container cause my images are not stored
under the webapp classpath.

Now, what is for you the best way to solve this?
Configure apache web server to access the directory where image files
are stored and then serve them via wicket? I need to use a
DynamicImageResource due to privacy as told before, so I can open a
connection to httpd via HttpClient or some similar libraries and get
the byte stream?

Any other idea?

Thanks. You can see the slideshow in action here:
http://code.google.com/p/wicket-slides/
I started contributing the project some weeks ago and now it is base
on smoothgallery 2.0, there is also a demo app and a maven2 pom.

The code for loading resources from file is still in my app but I will
publish it there when it will be enough complete.

What about put that project under wicket-stuff? I can check the
original author for permission.

--
Daniele Dellafiore
http://blog.ildella.net/

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



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



Re: thanks ur help,withe the zipoutputstream,

2009-01-12 Thread Peter Ertl

just replace

   throw new  
UnsupportedOperationException("Not supported yet.");


with your own code :-)


Am 13.01.2009 um 03:32 schrieb wch2001:



with http://letmegooglethatforyou.com/?q=java+zip+files, I can get the
zipoutputstream,

How can i export it ?

Need to use the following AbstractResourceStreamWriter , right ?

how can i override write method?

Sorry to ask so stupid question, thanks for help.

   AbstractResourceStreamWriter writer = new
AbstractResourceStreamWriter() {

   @Override
   public void write(OutputStream arg0) {
   throw new  
UnsupportedOperationException("Not

supported yet.");
   }

   @Override
   public String getContentType() {
   return "application/zip";
   }
   };
   RequestCycle.get().setRequestTarget(new
ResourceStreamRequestTarget(writer,"test.zip"));





Pills wrote:


Zipping data has absolutely nothing to do with wicket, this is a
separate concern, and this looks absolutely normal that nothing  
exists

in wicket for such a feature.

Separation of concerns is very usual on today's days.

Peter Ertl a écrit :

how is this wicket?


Am 12.01.2009 um 11:36 schrieb Michael Sparer:



http://www.google.com/search?&q=java+zip  ;-)



wch2001 wrote:



thanks , Pills.

How can  I zip it ?

thanks



Pills wrote:


Zip them on the fly, then download the zip.

wch2001 a écrit :

in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt,
cc.txt,

how can i download it ? if it possible that  when clicking
button/link
and
so on to download those 3 files?

thanks



PSkarthic wrote:


I am also a newbie but i will try
could u be please more specific or elabrate









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









-
Michael Sparer
http://talk-on-tech.blogspot.com
--
View this message in context:
http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21411973.html

Sent from the Wicket - User mailing list archive at Nabble.com.


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



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





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





--
View this message in context: 
http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21428377.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Help,How to download all files in one folder ?

2009-01-12 Thread Peter Ertl

how is this wicket?


Am 12.01.2009 um 11:36 schrieb Michael Sparer:



http://www.google.com/search?&q=java+zip  ;-)



wch2001 wrote:



thanks , Pills.

How can  I zip it ?

thanks



Pills wrote:


Zip them on the fly, then download the zip.

wch2001 a écrit :
in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt,  
cc.txt,


how can i download it ? if it possible that  when clicking button/ 
link

and
so on to download those 3 files?

thanks



PSkarthic wrote:


I am also a newbie but i will try
could u be please more specific or elabrate









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









-
Michael Sparer
http://talk-on-tech.blogspot.com
--
View this message in context: 
http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21411973.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Get all sessions

2009-01-09 Thread Peter Ertl

implement javax.servlet.http.HttpSessionListener

Am 09.01.2009 um 08:07 schrieb Eunice:



Hi,

Is there any methods or functions in wicket that can give me

numbers of users/sessions that is currently active and viewing/ 
opening a

page?

I've been googling and read on the API, still cannot get any clues and
unable to work it out..

Can i get number of sessions from my application by using  
ISessionStore or


HttpSessions, since the session will be keep in HttpSessions..

I do really appreciate your reply..

Eunice
--
View this message in context: 
http://www.nabble.com/Get-all-sessions-tp21367229p21367229.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: DataView vs ListView

2009-01-07 Thread Peter Ertl
Why do you read up to 1 records into memory? Nobody will be able  
to view all of these ever. I would set a limit at around 500-1000  
records and provide some advanced filtering instead.



Am 07.01.2009 um 15:52 schrieb Ames, Tim:

My humble opinion is that you have to pay the price somewhere.   
Either you are going to load all that data into memory in a List or  
get it from the database for each page.  I use JPersist to map the  
database to objects. I have found it to be quite fast.  Connection  
pooling helps too.


If you have several users searching and returning large Lists in  
memory, you may not be too happy with those results either :)


-Original Message-
From: Dane Laverty [mailto:danelave...@chemeketa.edu]
Sent: Tuesday, January 06, 2009 8:08 PM
To: users@wicket.apache.org
Subject: DataView vs ListView

I've been trying to understand when DataView would come in handy. I  
have

a SQL database table with about 1,000,000 rows. The user can enter a
search string, and my application returns a list of all the rows that
match the search string. This list might be over 10,000 rows.



At first I thought this would be a perfect situation for a DataView,
since it involves large numbers of rows, and I don't necessarily  
want to

get all 10,000 rows if the user only needs to look at the first 20.
However, I'm finding that, since DataView re-queries the database with
each page view of the results list, any time advantage I might have
gotten initially is quickly lost. It seems that using a
PageableListView, I just query the database once and I'm good.



So my question is, am I misunderstanding the purpose of the DataView?
All of the online examples I find for DataView use Java databases  
rather

than SQL relational databases. Is the DataView only useful if you
already have some kind of a Java database to back it up? Or is there
some way that I can take advantage of DataView in this situation  
without
having to re-query the database whenever the user clicks to a  
different

page of the result list?

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
_ _ _ _


EMAIL CONFIDENTIALITY NOTICE

This Email message, and any attachments, may contain confidential
patient health information that is legally protected. This information
is intended only for the use of the individual or entity named above.
The authorized recipient of this information is prohibited from  
disclosing

this information to any other party unless required to do so by law
or regulation and is required to destroy the information after its  
stated
need has been fulfilled. If you are not the intended recipient, you  
are

hereby notified that any disclosure, copying, distribution, or action
taken in reliance on the contents of this message is strictly  
prohibited.


If you have received this information in error, please notify
the sender immediately by replying to this message and delete the
message from your system.


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



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



Re: Participating in Wicket

2008-12-18 Thread Peter Ertl
Yeah, just put a breakpoint in WicketFilter, request a page in your  
browser and step through the whole wicket source and try to  
understand. Naturally this takes some time :-)



Am 18.12.2008 um 11:13 schrieb James Perry:

I'd recommend examining the WicketFilter as your starting point.  
This is

where wicket requests get intercepted and processed accordingly.

Best,
James.

On Thu, Dec 18, 2008 at 10:07 AM, HHB  wrote:



Thank you all guys but maybe I'm expressing my ideas the wrong way.
I don't mean how to get Wicket source and create a patch, I mean  
what is

the
best way to start studying Wicket source code? where to start? which
module?


Steve Swinsburg-2 wrote:


If you want the source code for Wicket, check it out from SVN into
your own local working copy. You can then build Wicket via maven  
after

you have made any local changes to the source code to see if the bug
has been fixed.

You can then generate a patch and attach it to a Jira issue so the
developers can review it.

cheers.


On 18/12/2008, at 8:19 AM, HHB wrote:



Thanks.
My problem is I don't where to start.
Lets say I want to fix that bug, in order to know how to fix it, I
have to
be aware of the whole source code of Wicket, am I right?
How to start studying the source code? I mean where to start
reviewing?


Scott Swank wrote:


I found this helpful.

http://cwiki.apache.org/WICKET/lifecycle-of-a-wicket-application.html

Scott


On Wed, Dec 17, 2008 at 2:38 AM, HHB  wrote:


Thanks Martijn
How do you suggest to start studying Wicket core code (I don't  
mean

getting
the source code :) )?
It is complicated to study and grasp?
Thanks again.


Martijn Dashorst wrote:


Look at jira issues, fix them, create a patch and attach it to  
the

jira issue. When we like your code and are tired of applying the
fixes
for you, you might be proposed to become a committer yourself.

Valuable info:

http://apache.org/dev/contributors.html#patches

Martijn

On Wed, Dec 17, 2008 at 11:13 AM, HHB   
wrote:


Hey,
I really have a great passion toward Wicket framework and I
really want
to
participate with their core developer teams.
My problem is that this framework has really great and passion
developers
and I can't imagine myself trying to join them (nor they will
accept, I
think) not to mention this great community.
What do you suggest me to do?
Thanks for your time.
--
View this message in context:

http://www.nabble.com/Participating-in-Wicket- 
tp21050410p21050410.html

Sent from the Wicket - User mailing list archive at Nabble.com.




-

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






--
Become a Wicket expert, learn from the best:

http://wicketinaction.com

Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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





--
View this message in context:

http://www.nabble.com/Participating-in-Wicket- 
tp21050410p21050753.html

Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





--
View this message in context:
http://www.nabble.com/Participating-in-Wicket-tp21050410p21068635.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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





--
View this message in context:
http://www.nabble.com/Participating-in-Wicket- 
tp21050410p21069869.html

Sent from the Wicket - User mailing list archive at Nabble.com.


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





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



Re: About CodingStrategies for Database IDs

2008-12-13 Thread Peter Ertl
Daring to go even further, I think it's quite paranoid to obfuscate  
database ids.


The danger of database ids in urls is not that people know about it  
but they can fake them by altering the url. So the solution is not  
some snakeoil-like encryption of the id but proper and thorough  
checking of the id coming from the url before further processing


Just my 2%


Am 13.12.2008 um 11:31 schrieb Ayodeji Aladejebi:


Michael Sparer blogged at
http://talk-on-tech.blogspot.com/2008/12/wicket-neat-url-encoding-strategy-and.html
and discussed certain approach for encoding and decoding IDs in  
parameters.

The general use of encoding strategies I understand but
I really wanted to understand why the complexity of using  
CodingStrategies

especially for encoding database IDs. Why is this simply a problem:
PageParameter param = new  Long dataId = new Long(23);
param.put("dataId", encodeAsString(23)); setResponsePage(...); then  
when you

are parsing the Parameters, you simple say Long dataId =
decodeToLong(param.get("dataId")); the bookmarkable page param will  
still
show as in browser as ?dataId=ajdladjasdsdkklsadkals& as yu want it  
and your
encodeAsString and decodeToLong could be in a static class or a  
super Panel

or Page?
Please dont mind me, I am not a fan of complexity
--
Aladejebi Ayodeji A.,
DabarObjects Solutions



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



Re: Modify textfield input before validation

2008-12-12 Thread Peter Ertl
Just because converter can convert 'from' and 'to' doesn't mean you  
can't use it for one direction only


Am 12.12.2008 um 13:01 schrieb pixologe:



seems to be igor's point of view, at least:
http://www.nabble.com/append-a-converter-or-coversion-function-td15921777.html#a15964449


Peter Ertl wrote:


I really wonder why converters are not the right thing to do?



--
View this message in context: 
http://www.nabble.com/Modify-textfield-input-before-validation-tp20952903p20974347.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



  1   2   >