Re: Prettier URLs for ResourceReference images

2010-03-13 Thread Thomas Götz
Well ok, this is helpful. But: what do you do if you have a lot of embedded resources referenced from a lot of different components? Do I have to put an alias for every single class? This is quite verbose, isn't there an easier way to e.g. set an alias for a complete Java package? Sure, I could

Re: Prettier URLs for ResourceReference images

2010-03-13 Thread Martin Grigorov
Extend ResourceRefrence class and do the aliasing in its constructor. There you have all the needed information - class and resource name. Then in MyComponent.java: ... Image image = new Image(image, new AutoAliasResourceReference(...)); On Sat, 2010-03-13 at 10:47 +0100, Thomas Götz wrote:

Using SetResponsePage in Session

2010-03-13 Thread Nishant Neeraj
Hi, In my custom session, I have a method which, on certain condition, wants to redirect the request to some page, other than the original. This is what I am doing, in the method: RequestCycle.get().setRedirect(true); RequestCycle.get().setResponsePage(SomePage.class); But the response

Re: Using SetResponsePage in Session

2010-03-13 Thread Edward Zarecor
What's the use case? Session events won't always occur within the context of a RequestCycle, say, expiry. Even If the use case is related to a request something like this might be cleaner: YourPage if (getYourApp().getYourSession().isWhatever()) {

Re: Prettier URLs for ResourceReference images

2010-03-13 Thread Thomas Götz
Ok, this is sexy, thanks for pointing me into the right direction ;-) -Tom Am 13.03.2010 um 12:08 schrieb Martin Grigorov: Extend ResourceRefrence class and do the aliasing in its constructor. There you have all the needed information - class and resource name. Then in

Re: onkeyup ajax call with the key pressed

2010-03-13 Thread nino martinez wael
what about wicketstuff input events? should give you an idea..? 2010/3/12 Istvan Soos istvan.s...@gmail.com Thanks! Is there somewhere an example for this? E.g. with Java callback codes and like... Thanks, Istvan On Fri, Mar 12, 2010 at 1:40 PM, Pedro Santos pedros...@gmail.com wrote:

Re: Using SetResponsePage in Session

2010-03-13 Thread Nishant Neeraj
The use case is like this. You have logged-in in a browser's tab and in another tab, you click on a moderate-comment mail that automatically logs you in as another user, and takes you to the comments-moderation page of the application. Now, at this point, I want to ask the user if he wants to

Re: Using SetResponsePage in Session

2010-03-13 Thread Edward Zarecor
I would check if the user already exists in the session, but send the redirect from a Page. You can refactor the redirection code into a base class and extend as required. Ed. On Mar 13, 2010 2:04 PM, Nishant Neeraj nishant.has.a.quest...@gmail.com wrote: The use case is like this. You have

Re: Using SetResponsePage in Session

2010-03-13 Thread Nishant Neeraj
Right. Thanks. So, I am doing this check in my custom base page (which is extended by all others). I am able to redirect user to switch accounts page. My initial understanding was that Session.replaceSession() or Session.invalidateNow() + Session.bind() will reset the current session and hence

Re: Don't increment the Session.pageIdCounter for stateless pages?

2010-03-13 Thread Martin Grotzke
Hi, just submitted this as https://issues.apache.org/jira/browse/WICKET-2782 I tried incrementing the pageId when the page's numericId is first accessed, but soon realized, that this does happen rather often (also e.g. to construct bookmarkable page links) ;-) Seems to be not as easy as I

Re: Don't increment the Session.pageIdCounter for stateless pages?

2010-03-13 Thread Matej Knopp
I'm not sure about all this. If the session has not been bound the page id will always be 0. If the session has been bound, I don't think we shouldn't increment page Id. Stateless page can became stateful any time, not incrementing the id can have sideeffects. -Matej On Sat, Mar 13, 2010 at

Re: Don't increment the Session.pageIdCounter for stateless pages?

2010-03-13 Thread Martin Grotzke
There are cases where pages are intended to be stateless (and might get annotated with @StatelessComponent). At least for these pages the page id should not be incremented, even if the session already has been bound. Cheers, Martin On Sat, 2010-03-13 at 22:58 +0100, Matej Knopp wrote: I'm not

Wicket Forms on PS3 Browser

2010-03-13 Thread Brad Grier
I just tried out my Wicket-based site on the PS3's native browser. The strange thing is that none of the forms worked. It's as if the onSubmit is never called. I went to the Wicket home page and confirmed this behavior. I don't recall seeing this happen with other forms. I suppose it's not a

Page reload after submit action

2010-03-13 Thread Bergmann Manfred
Hi there. I have the following problem with reloading the same page that is currently loaded. I'm working on a blog application. Normally the URL in the browser for a specific blog entry is like this: http://host/blog/id/someblogid where /blog is mounted as bookmarkable in Application to Blog

RE: Wicket Forms on PS3 Browser

2010-03-13 Thread Alex Rass
Perhaps has to do with: ..., the PS3 browser reports nothing except a user-agent of Mozilla/5.0 (PLAYSTATION 3; 1.00). Everything else is blank. The PS3 apparently does not send an HTTP-Accept header to the server. It supports Javascript but will not divulge which version. Finally, it reports no

Re: Wicket Forms on PS3 Browser

2010-03-13 Thread Brad Grier
Good link. I didn't really expect the app to work but I thought the form submit would be the least of my problems. I still find it interesting that forms seem to work for other sites. -- From: Alex Rass a...@itbsllc.com Sent: Saturday, March 13,

RE: Wicket Forms on PS3 Browser

2010-03-13 Thread Alex Rass
Yeah, but forms that work for other sites don't do all the sweet things that wicket does for you. Most sites still have forms that you can double-click. Then spend hours coding backend to avoid double entry etc. Someone will fix it... eventually. ;) Anyone cares to donate a PS3 to Igor? I am

Re: Page reload after submit action

2010-03-13 Thread vineet semwal
Hi, It appears you are on 1.4.6,upgrade to 1.4.7 and see if the problem disappears. On Sun, Mar 14, 2010 at 5:15 AM, Bergmann Manfred m...@software-by-mabe.comwrote: Hi there. I have the following problem with reloading the same page that is currently loaded. I'm working on a blog