Re: InvalidUrlException - how to show 404 page

2009-10-02 Thread Alex Objelean
You should know that InvalidUrlException can be quite useful... if user try to tweak the url, that means he is attempting to hack your application (which is impossible anyway). In such cases, you can display a nice message like: "don't try to hack the application, it won't work" or you cand displa

Re: Another page expired question on modal window

2009-10-02 Thread Jeremy Thomerson
easiest way to catch this is to watch the logging output -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 2, 2009 at 7:51 PM, Mathias Nilsson wrote: > > Sorry my bad. > > I thought I had checked Serialization on every object but I missed two of > them. > > // Mathias > --

Re: Another page expired question on modal window

2009-10-02 Thread Mathias Nilsson
Sorry my bad. I thought I had checked Serialization on every object but I missed two of them. // Mathias -- View this message in context: http://www.nabble.com/Another-page-expired-question-on-modal-window-tp25724641p25724693.html Sent from the Wicket - User mailing list archive at Nabble.

Another page expired question on modal window

2009-10-02 Thread Mathias Nilsson
Wicket 1.4.1 Hi, I have tried to search the forum but with no luck. I open a modal window that displays an applet. If I don't open any more tabs in IE7 or Firefox I can close the modal window with no problems. However, if I open more than one tab I'll get an Page expired exception and a confirm j

setAutomaticMultiWindowSupport & SecondLevelCacheSessionStore

2009-10-02 Thread Douglas Ferguson
I see this in the JavaDoc for setAutomaticMultiWindowSupport "If two windows would share the same page map, the non-bookmarkable links on one window could refer to stale state after working a while in the other window." I am getting some bug reports from clients and I think they they are experi

Re: Preventing Copy Pasting URL's In Same Browser Session

2009-10-02 Thread Douglas Ferguson
Are there no pros and cons of using this? On Oct 2, 2009, at 11:39 AM, Douglas Ferguson wrote: > Added this field and notice that it writes additional params to the > url for pagemap. > > Preliminary testing indicated that the page map url parameter doesn't > have to exist. > > Are there any con

Re: ModalWindow and LazyLoading Exception

2009-10-02 Thread Marcelo Fukushima
weird... I'd expect that the CheckboxMultipleChoice would force the initialization of the list before the EntityManager is closed. Is the exception thrown on the form submission? On Fri, Oct 2, 2009 at 8:48 AM, Pedro Santos wrote: > use *OpenSessionInViewFilter* to avoid lazy initialization excep

Re: After 1 minute the Pagemap null is still locked

2009-10-02 Thread mfs
Hi Guys, We are facing a similar problem on an "Import Page" which at times does take more than a minute for large data-set, which breaks the import. I wonder if there is a way we can bypass OR avoid this exception so as to make the import finish properly. I understand one way can be to break the

Re: Preventing Copy Pasting URL's In Same Browser Session

2009-10-02 Thread Douglas Ferguson
Added this field and notice that it writes additional params to the url for pagemap. Preliminary testing indicated that the page map url parameter doesn't have to exist. Are there any concerns with using this option? Douglas On Oct 1, 2009, at 7:14 PM, Douglas Ferguson wrote: > What are th

Re: ProgressBar demo doesn't work for firefox 3.5.3

2009-10-02 Thread Altuğ B . Altıntaş
You are right; it doesn't work properly. I am using swfupload tool. it is flash and it works great. Regards. Altug. 2009/10/2 Paul Huang > I copy and paste the single file upload demo at > "http://www.wicket-library.com/wicket-examples/upload/single"; to my > local machine and found the the a

ProgressBar demo doesn't work for firefox 3.5.3

2009-10-02 Thread Paul Huang
I copy and paste the single file upload demo at "http://www.wicket-library.com/wicket-examples/upload/single"; to my local machine and found the the ajax progressbar doesn't work on my firefox 3.5.3 on winxp. But It works on my ie 8 though. Any idea what might be the cause? ( I did not change a sin

Re: InvalidUrlException - how to show 404 page

2009-10-02 Thread Thomas Singer
Hi Linda, Alex and Jonas, Thank you for your answers. Just for the records: I'm now setting the internal error page in WebApplication.init() as Alex suggested and override WebApplication.newRequestCycle(Request, Response) to return a subclass of WebRequestCycle which overrides logRuntimeException

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread Ernesto Reinaldo Barreiro
Just one question... on method protected void convertInput() I see convertValue(getInputAsArray()) is only called if typeName==null, otherwise IConverter is used. It is always guarantied that "trim" behavior? Thanks for your explanations and time! Cheers, Ernesto On Fri, Oct 2, 2009 at 3:19 PM,

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread David Chang
No fuss, just confusion. Thanks for the clarification, which helps not only to me. Cheers! --- On Fri, 10/2/09, Martijn Dashorst wrote: > From: Martijn Dashorst > Subject: Re: Can Wicket automatically remove beginning and trailing spaces in > a text field? > To: users@wicket.apache.org > Da

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread Martijn Dashorst
Not sure what the fuzz is all about: wicket trims the whitespace before and after the input by default (like Marat already mentioned in this thread). Marat's code example is taken *directly* from Wicket's FormComponent. You don't have to do anything. Martijn On Fri, Oct 2, 2009 at 3:06 PM, David

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread David Chang
I feel the recommended solutions are complicated. Thanks. --- On Fri, 10/2/09, Ernesto Reinaldo Barreiro wrote: > From: Ernesto Reinaldo Barreiro > Subject: Re: Can Wicket automatically remove beginning and trailing spaces in > a text field? > To: users@wicket.apache.org > Date: Friday, O

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread David Chang
For this to work, I have to overwrite this method either for each form or write a custom class extending FormComponent. Correct? If yes, then it is not what I hope to get. I dont want to do it for each form or a custom class. I came from Spring MVC camp. This task is very easy in Spring. Cheer

Re: inMethod DataGrid initial selection

2009-10-02 Thread Swanthe Lindgren
Thank you Matej, I was just about to write a "solved" to the list. As I used different model implementations for the pre-selected row and the other rows, the equals and hashCode methods didn't match up. BTW, thanx for an excellent data grid! //Swanthe Matej Knopp wrote: Make sure that the e

Re: [WicketStuff] Iolite

2009-10-02 Thread nino martinez wael
Okay.. I might still do the guice/warp etc archetype then.. And look forward to when your archetypes go under MIT / ASL and are available.. regards Nino 2009/10/2 jWeekend > > Nino, > > We developed these archetypes primarily for commercial usage (training and > client apps) but are now looking

Re: inMethod DataGrid initial selection

2009-10-02 Thread Matej Knopp
Make sure that the equals method on your model(s) is properly implemented. Also check equals on your entities. -Matej On Fri, Oct 2, 2009 at 1:37 PM, Swanthe Lindgren wrote: > Yes, I got that part right, thank you. But somehow the item is not > hi-lighted in my grid. > When the grid instance is

Re: ModalWindow and LazyLoading Exception

2009-10-02 Thread Pedro Santos
use *OpenSessionInViewFilter* to avoid lazy initialization exceptions On Fri, Oct 2, 2009 at 8:42 AM, Albert Romanius wrote: > The line that throws the exception is below: > CheckBoxMultipleChoice subMessagesCB = new CheckBoxMultipleChoice( > "subMessages", new PropertyModel(this, >

Re: Problems with refreshing captcha.

2009-10-02 Thread RG
Hi Sjoerd, Thanks for the response. I;m using the wicket-extensions CaptchaImageResource, I can't override this, and assume it would set the cache headers itself. My guess is the the resource reference inthe generated html doesn't change and that the page does not feel a need to reload it, (I

Re: ModalWindow and LazyLoading Exception

2009-10-02 Thread Albert Romanius
The line that throws the exception is below: CheckBoxMultipleChoice subMessagesCB = new CheckBoxMultipleChoice( "subMessages", new PropertyModel(this, "selectedSubs"), showMessage.getLazyList()); The problem is the showMessage.getLazyList() call. When wicket renders this combobox, s

Re: inMethod DataGrid initial selection

2009-10-02 Thread Swanthe Lindgren
Yes, I got that part right, thank you. But somehow the item is not hi-lighted in my grid. When the grid instance is constructed and added to the page, the data to be shown in the grid has not yet been loaded. I know that the row i want selected is going to be there once the data is loaded and th

Re: Problems with refreshing captcha.

2009-10-02 Thread Sjoerd Schunselaar
I had the same problem with generating statistics. If your're extending the wicket Image class, you should override getImageResource. Simply add this method in getImageResource: @Override protected void setHeaders(WebResponse response) { if (isCacheable()) {

Re: [WicketStuff] Iolite

2009-10-02 Thread jWeekend
Nino, We developed these archetypes primarily for commercial usage (training and client apps) but are now looking to make them publicly available (ideally with Apache or GPL/MIT licences) because they could be useful for other developers, not least people new to Wicket (or new to JPA or Guice or

Problems with refreshing captcha.

2009-10-02 Thread RG
Hi, I'm trying to create a form with captcha for a demo I was building, but am having problems with the update when the password is incorrect. What I wanted to achieve was the captcha being regenerated with a new word on each try. On submit I can see the captcha being regenerated, but it doe

Re: inMethod DataGrid initial selection

2009-10-02 Thread Martin Grigorov
grid.selectItem(rowModel); El vie, 02-10-2009 a las 11:25 +0200, Swanthe Lindgren escribió: > Does anybody know how to get a row initially selected when the grid is > first drawn? > > //Swanthe > > > - > To unsubscribe, e-mail

Re: urls with localization

2009-10-02 Thread ivilis
Good work, thank you! Vytautas Alex Objelean wrote: > I've created a draft version of the page in wiki: > http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs > http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs > > Now it will not expire ;). > >

Re: urls with localization

2009-10-02 Thread Alex Objelean
I've created a draft version of the page in wiki: http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs Now it will not expire ;). Alex Objelean Vytautas C(ivilis wrote: > > Hi, Alex. > > Could

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread Ernesto Reinaldo Barreiro
Why use aspects for 2 when you have IComponentInstantiationListener? All you have to do is set you components model to use the TrimmingModel pasted before on the listener. I didn't try it myself but I guess that should work. Best, Ernesto On Fri, Oct 2, 2009 at 10:57 AM, Bernhard Michal wrote: >

inMethod DataGrid initial selection

2009-10-02 Thread Swanthe Lindgren
Does anybody know how to get a row initially selected when the grid is first drawn? //Swanthe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: urls with localization

2009-10-02 Thread ivilis
Hi, Alex. Could you repost LocaleUrlCodingStrategyDecorator to pastebin, as it has been expired? Thanks! Vytautas Alex Objelean wrote: > RequestDecorator is nothing but a decorator implementation of Request > class... > [CODE] > public class RequestDecorator > extends Request { > /** >*

RE: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread Bernhard Michal
Afaik there is no way to set this behavior by some flag. But 1) You can extend TextField to wrap it's model with model which on getObject() trim (ie. remove begging and trailing spaces) returning string if Model's type is Sting (in other cases it doesn't make sense)... when value is setted into mo

Re: InvalidUrlException - how to show 404 page

2009-10-02 Thread Jonas
I think it should be possible to have the webserver deliver the standard 404 page by throwing AbortWithWebErrorCodeException You can hook in at WebRequestCycleProcessor#respond(RuntimeException e, RequestCycle requestCycle) and throw the mentioned exception. Works find just like this in our webapp

Re: InvalidUrlException - how to show 404 page

2009-10-02 Thread Alex Objelean
Or you can update the settings in your Application class: getApplicationSettings().setInternalErrorPage(HomePage.class); Alex Objelean Thomas Singer-4 wrote: > > As I have reported a couple of weeks ago (but can't find the message any > more for a follow-up), Wicket shows an ugly internal-err

Re: InvalidUrlException - how to show 404 page

2009-10-02 Thread Linda van der Pal
I haven't tried such a thing yet, but the last chapter of Wicket in Action describes how to do such things. Here's the example they give for "responding with different error pages for specific errors. public class CheesrRequestCycle extends WebRequestCycle { public CheesrRequestCycle(WebAp

Re: image inside wicket:link tag

2009-10-02 Thread Bert
Hi, perhaps i just not understand the problem. but the tag is within the tag, so the image should be part of the link? i 'm not sure i under stand the meaning of: 'When I click the link then image is shown' regards On Fri, Oct 2, 2009 at 09:49, Gatos wrote: > I see it's a new feature in 1.4

InvalidUrlException - how to show 404 page

2009-10-02 Thread Thomas Singer
As I have reported a couple of weeks ago (but can't find the message any more for a follow-up), Wicket shows an ugly internal-error page if one somehow modified the stateful URLs, e.g. http://localhost:8080/?wicket:interface=:8 Following exception is logged: > org.apache.wicket.protocol.http.req

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread Marat Radchenko
It already does that. FormComponent: protected T convertValue(String[] value) throws ConversionException { return (T)(value != null && value.length > 0 && value[0] != null ? trim(value[0]) : null); } 2009/10/2 David Chang > How to set it up in a Wicket application? I would like to set it up in

Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread Ernesto Reinaldo Barreiro
Never done it myself, and don't know if it is a better way to do it, but: protected IConverterLocator { return new ConverterLocator(); } can be overriden to return your own converter locator and... plug there a default converter (for Strings?) that will trim strings... If you want to do this for

Re: image inside wicket:link tag

2009-10-02 Thread Gatos
I see it's a new feature in 1.4.x. Maybe I could fix it? :-/ On Fri, Oct 2, 2009 at 9:44 AM, Gatos wrote: > Hello, > > >ID > > > When I click the link then image is shown. For some reason src="img/id.gif" > interpretates as a link. > How to solve the problem? > Wicket 1.4.1 > > Thank you