Re: Wicket Ajax direction and roadmap regarding push-like updates

2012-02-07 Thread vineet semwal
i am a bit curious,what version were you using of wicket and wickestuff push and how exactly push didnt let you unit test your code? On Tue, Feb 7, 2012 at 1:37 AM, Pierre Goupil wrote: > Just to mention that I'm personally more than happy with Atmosphere. > There's a little work coming in orde

Re: opening modal window after session has expired

2012-02-07 Thread Martin Grigorov
Hi, Check https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows (Opening a modal window on page load (no AJAX involved)). You can play with javax.servlet.http.HttpServletRequest#isRequestedSessionIdValid() to find out whether the session has been expired. On Tue, Feb 7, 2012 at 9:30 PM

Re: dynamic markup and components

2012-02-07 Thread Sven Meier
http://stackoverflow.com/questions/2086732/dynamic-markup-in-wicket Am 08.02.2012 00:55, schrieb Alinoor: Hi everyone, I want to load some markup stored in a string, this markup also has references to wicket components that I need to create and then add to whatever will contain the markup. Is t

Re: Reload html in Wicket + GAE

2012-02-07 Thread Daniel Watrous
Here's my write up: http://software.danielwatrous.com/software-engineering/wicket-gae-automatic-reload I'm not sure if I can push directly into wicketstuff, but I'm happy to try. You can grab the source from my site and put it in there. You may even have a more clever way to composing things. Dan

dynamic markup and components

2012-02-07 Thread Alinoor
Hi everyone, I want to load some markup stored in a string, this markup also has references to wicket components that I need to create and then add to whatever will contain the markup. Is this possible and how can I do this? private static String getHtml() { String html = "" +

Re: Calculate request speed/connection speed? in a production environment with heavy ajax

2012-02-07 Thread Michał Golichowski
A servlet filter would probably help here. You can both measure the request time there and also wrap the request / response streams in some custom stream that will count the number of bytes transferred. On Tue, Feb 7, 2012 at 10:39 PM, Brown, Berlin [GCG-PFS] < berlin.br...@primerica.com> wrote:

Calculate request speed/connection speed? in a production environment with heavy ajax

2012-02-07 Thread Brown, Berlin [GCG-PFS]
What is the best way to calculate the connection speed or request speed for a wicket application from the server side? I can use the request process onBeginRequest and onEndRequest, that will give me the time it takes to process a request on the server, but I am still missing: I need: 1. Proc

TagTester and input tags

2012-02-07 Thread Bertrand Guay-Paquet
Hi, I'm trying to use BaseWicketTester#getTagByWicketId(String) and am having a problem with input tags. TagTester seems unable to retrieve tags of the following form: I dug a bit and the culprit seems to be XmlPullParser which decides that this is an OPEN tag instead of an OPEN_CLOSE tag b

Re: Wicket in a Dot Net World

2012-02-07 Thread Martin Grigorov
http://www.ikvm.net/ Good luck :-) On Tue, Feb 7, 2012 at 9:57 PM, shetc wrote: > Well friends, it's happened -- the company I work for has been bought by a > larger competitor. Sadly, the new bosses prefer to work with .NET > > I don't suppose anyone has ported Wicket to .NET? > > -- > View thi

Wicket in a Dot Net World

2012-02-07 Thread shetc
Well friends, it's happened -- the company I work for has been bought by a larger competitor. Sadly, the new bosses prefer to work with .NET I don't suppose anyone has ported Wicket to .NET? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-in-a-Dot-Net-World-t

opening modal window after session has expired

2012-02-07 Thread infiniter
modal windows won't open when the session has expired. So if this occurs, I was thinking of somehow refreshing the page and try opening the modal automatically. I want to explore solutions before going stateless. Any idea how this can be accomplished? -- View this message in context: http://apach

Re: Reload html in Wicket + GAE

2012-02-07 Thread Kayode Odeyemi
Glad you got it working Daniel, as Martin mentioned earlier, I'll appreciate if you can contribute this to existing GaeInitializer or somewhere comfortable with the full code so it can be valuable to us all. Thanks On Tue, Feb 7, 2012 at 5:31 PM, Daniel Watrous wrote: > I finally got it working.

Re: Best practices for using CSS resource references

2012-02-07 Thread Alec Swan
Martin, removing CompressResRef in 1.5 makes perfect sense. Thanks for pointing me to CssCompressor and JavaScriptCompressor. Serban, thanks for a good link. I can see how I can use wro4j Reader/Writer code to implement CssCompressor Martin pointed out. Thanks again, guys! Alec On Tue, Feb 7, 2

Re: Reload html in Wicket + GAE

2012-02-07 Thread Daniel Watrous
I finally got it working. Here's the modified function: public boolean add(IModifiable modifiable, IChangeListener listener) { // TODO Auto-generated method stub checkResources(); HashSet listenerSet = new HashSet(); Set list

Re: Wicket 1.4 -> 1.5: WebMarkupContainerWithAssociatedMarkup

2012-02-07 Thread Martijn Dashorst
On Tue, Feb 7, 2012 at 5:28 PM, Thomas Singer wrote: > It looks like Wicket 1.5 is a so radical change to 1.4 that it better would > have been named Wicket 2. The whole request processing part has been rewritten. The whole URL generation/parsing has been rewritten. But that is the biggest change,

Re: Best practices for using CSS resource references

2012-02-07 Thread Serban.Balamaci
Hi Alec, With wro4j you can do the minification at runtime also by using the processors like: http://code.google.com/p/wro4j/wiki/ReusingProcessors you get to work with Reader and Writer. You could apply the processor after the resource has been uploaded or even when requested(though probably it's

Re: Wicket 1.4 -> 1.5: WebMarkupContainerWithAssociatedMarkup

2012-02-07 Thread Sven Meier
Hi Tom, I have to admit that migration to 1.5 looks daunting at first, but there aren't so many radical changes actually. >Maybe it will require the use of a different programming language? Don't give us any ideas ;). Sven Am 07.02.2012 17:28, schrieb Thomas Singer: It looks like Wicket 1.

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Thomas Singer
The String path is from a business object. Tom On 07.02.2012 17:48, Martijn Dashorst wrote: > On Tue, Feb 7, 2012 at 4:57 PM, Thomas Singer wrote: >>> IRequestHandler handler = >>> Application.get().getRootRequestMapper().mapRequest(request); >> >> Requires a Request instance, but I just have a

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Martijn Dashorst
On Tue, Feb 7, 2012 at 4:57 PM, Thomas Singer wrote: >> IRequestHandler handler = >> Application.get().getRootRequestMapper().mapRequest(request); > > Requires a Request instance, but I just have a path String... Where do you get the path string from? Anyways, typically you can get at the Reques

Re: Best practices for using CSS resource references

2012-02-07 Thread Martin Grigorov
On Tue, Feb 7, 2012 at 6:30 PM, Alec Swan wrote: > 3 responses in one day, awesome! > > Serban and Jordi, our app allows users to upload custom CSS so > compile-time solutions will not work for us here. > > Martin, if I understood you correctly there is no special support, > such as removing comme

Re: Best practices for using CSS resource references

2012-02-07 Thread Martin Grigorov
On Tue, Feb 7, 2012 at 6:30 PM, Alec Swan wrote: > 3 responses in one day, awesome! > > Serban and Jordi, our app allows users to upload custom CSS so > compile-time solutions will not work for us here. > > Martin, if I understood you correctly there is no special support, > such as removing comme

Re: Reload html in Wicket + GAE

2012-02-07 Thread Daniel Watrous
So I was just looking at what I sent along and it seems that putIfAbsent(modifiable, new HashSet()) should return the value component, which should be the new HashSet. Even if the key modifiable already exists, it should return the previously created HashSet. I'm confused that listener is coming b

Re: Best practices for using CSS resource references

2012-02-07 Thread Alec Swan
3 responses in one day, awesome! Serban and Jordi, our app allows users to upload custom CSS so compile-time solutions will not work for us here. Martin, if I understood you correctly there is no special support, such as removing comments, in Wicket for CSS resources, right? If CompressedResource

Re: Wicket 1.4 -> 1.5: WebMarkupContainerWithAssociatedMarkup

2012-02-07 Thread Thomas Singer
It looks like Wicket 1.5 is a so radical change to 1.4 that it better would have been named Wicket 2. Nevertheless, creating an intermediate version which deprecated the old classes and methods but information/code about how to migrate to the new API would have MUCH better approach. If 1.4 to 1.5 r

Re: Reload html in Wicket + GAE

2012-02-07 Thread Daniel Watrous
That helped. I'm getting really close. I'm now getting a null pointer exception in this function public boolean add(IModifiable modifiable, IChangeListener listener) { // TODO Auto-generated method stub checkResources(); Set listeners = lis

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Thomas Singer
> IRequestHandler handler = > Application.get().getRootRequestMapper().mapRequest(request); Requires a Request instance, but I just have a path String... Tom On 07.02.2012 13:22, Martijn Dashorst wrote: > Probably something like: > > IRequestHandler handler = > Application.get().getRootRequest

Re: Wicket 1.4 -> 1.5: WebMarkupContainerWithAssociatedMarkup

2012-02-07 Thread Bertrand Guay-Paquet
I think you need to create your own subclass of WebMarkupContainer which overrides Component#newMarkupSourcingStrategy() to return the proper IMarkupSourcingStrategy. On 07/02/2012 10:46 AM, Thomas Singer wrote: We subclassed WebMarkupContainerWithAssociatedMarkup and used it as Component. Ne

Re: Wicket 1.4 -> 1.5: WebMarkupContainerWithAssociatedMarkup

2012-02-07 Thread Thomas Singer
We subclassed WebMarkupContainerWithAssociatedMarkup and used it as Component. Neither of your suggested IMarkupSourcingStrategy implementations is a Component. What should I do? Thanks in advance. Tom On 07.02.2012 13:26, Martijn Dashorst wrote: > On Tue, Feb 7, 2012 at 1:18 PM, Thomas Singer

Re: Reload html in Wicket + GAE

2012-02-07 Thread Martin Grigorov
Try with java.util.Map.Entry On Tue, Feb 7, 2012 at 5:39 PM, Daniel Watrous wrote: > I've now created a class MyRequestCycleListener extends > AbstractRequestCycleListener. > > I'm having a little trouble building  class GaeModificationWatcher > implements IModificationWatcher. I've tried followi

Re: Reload html in Wicket + GAE

2012-02-07 Thread Daniel Watrous
I've now created a class MyRequestCycleListener extends AbstractRequestCycleListener. I'm having a little trouble building class GaeModificationWatcher implements IModificationWatcher. I've tried following this example: http://agilewombat.blogspot.com/2010/01/wicket-on-google-app-engine.html to

Re: Injection in a Resource

2012-02-07 Thread Gaetan Zoritchak
Thanks for that quick answer. 2012/2/7 Carl-Eric Menzel > On Tue, 7 Feb 2012 16:08:37 +0100 > Gaetan Zoritchak wrote: > > > Hi all, > > > > I use guice in my applications. I need to inject some code (service) > > in a DynamicImageResource. It is not straightforward because a > > Resource is no

Re: Injection in a Resource

2012-02-07 Thread Carl-Eric Menzel
On Tue, 7 Feb 2012 16:08:37 +0100 Gaetan Zoritchak wrote: > Hi all, > > I use guice in my applications. I need to inject some code (service) > in a DynamicImageResource. It is not straightforward because a > Resource is not a component. > > Does anybody has already done that? What would be the

Injection in a Resource

2012-02-07 Thread Gaetan Zoritchak
Hi all, I use guice in my applications. I need to inject some code (service) in a DynamicImageResource. It is not straightforward because a Resource is not a component. Does anybody has already done that? What would be the best way? Thanks in advance,

Re: Reload html in Wicket + GAE

2012-02-07 Thread Martin Grigorov
On Tue, Feb 7, 2012 at 3:53 PM, Daniel Watrous wrote: > Thanks Martin, > > I did make that much progress yesterday after sending this, but I > can't figure out how to get the Application inside the onBeginRequest > method that I override. In the other examples they call > getApplication() > >    @

Re: Reload html in Wicket + GAE

2012-02-07 Thread Daniel Watrous
Thanks Martin, I did make that much progress yesterday after sending this, but I can't figure out how to get the Application inside the onBeginRequest method that I override. In the other examples they call getApplication() @Override protected void onBeginRequest() { if (getAppli

Re: Wicket 1.4 -> 1.5: WebMarkupContainerWithAssociatedMarkup

2012-02-07 Thread Martijn Dashorst
On Tue, Feb 7, 2012 at 1:18 PM, Thomas Singer wrote: > The migration guide mentions WebMarkupContainerWithAssociatedMarkup in the > section TabbedPanel, but there is not such class in Wicket 1.5 any more. See IMarkupSourcingStrategy and its implementations. Martijn -- Become a Wicket expert, l

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Martijn Dashorst
Probably something like: IRequestHandler handler = Application.get().getRootRequestMapper().mapRequest(request); if(handler instanceof IPageClassRequestHandler) { return ((IPageClassRequestHandler)handler).getPageClass(); } Martijn On Tue, Feb 7, 2012 at 1:08 PM, Thomas Singer wrote: > Than

Wicket 1.4 -> 1.5: WebMarkupContainerWithAssociatedMarkup

2012-02-07 Thread Thomas Singer
The migration guide mentions WebMarkupContainerWithAssociatedMarkup in the section TabbedPanel, but there is not such class in Wicket 1.5 any more. Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Thomas Singer
Thank you for the hints. Our code should return the page class which is the mounted page for the specified path (QueryStringUrlCodingStrategy). Tom On 07.02.2012 12:17, Martijn Dashorst wrote: > The following commit shows: > https://github.com/apache/wicket/commit/b0fea8393d7f8f8db5d9e034a51d457

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Martijn Dashorst
On Tue, Feb 7, 2012 at 11:44 AM, Martin Grigorov wrote: >> does not compile in Wicket 1.5: RequestParameters is unknown, >> RequestCycle.get().getProcessor() is unknown, IBookmarkablePageRequestTarget >> is unknown, the migration guide is no help. > > And it wont get any better until people like y

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Thomas Singer
> And it wont get any better until people like you improve it with their > findings... > The wiki is community based. I may add my information to this wiki page, but then a competent person has to review and correct it. Or should I just add the missing/changed classes/methods stubs to the wiki to

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Martijn Dashorst
The following commit shows: https://github.com/apache/wicket/commit/b0fea8393d7f8f8db5d9e034a51d4578018d2fdf#diff-54 that the RequestParameters were made obsolete. If you look at 1.5's Request class, you can see a IRequestParameter interface. There are several implementations, and the Request cla

Re: Stateless and Ajax

2012-02-07 Thread Martin Grigorov
Hi, On Tue, Feb 7, 2012 at 1:02 PM, toytown wrote: > Hi igor, > >     i certainly do agree that being stateful Wicket can do complex stuff. > However, you have to consider the fact that sometimes it is necessary to > become stateless (especially in public facing website) where I need the > users

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Thomas Singer
> And it wont get any better until people like you improve it with their > findings... > The wiki is community based. Sorry, I did not know that the changes were introduced as some kind of challenging game. I assumed that the Wicket developers had the changes done intentionally and updated the mig

Re: Stateless and Ajax

2012-02-07 Thread toytown
Hi igor, i certainly do agree that being stateful Wicket can do complex stuff. However, you have to consider the fact that sometimes it is necessary to become stateless (especially in public facing website) where I need the users to be able to bookmark the page . i do not see whats wrong

Re: Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Martin Grigorov
On Tue, Feb 7, 2012 at 12:39 PM, Thomas Singer wrote: > Following Wicket 1.4 code: > >  final RequestParameters parameters = new RequestParameters(); >  parameters.setParameters(new HashMap()); > >  String path = ... >  parameters.setPath(path); >  final IRequestTarget requestTarget = RequestCycle

Wicket 1.4 -> 1.5: RequestParameters, IBookmarkablePageRequestTarget

2012-02-07 Thread Thomas Singer
Following Wicket 1.4 code: final RequestParameters parameters = new RequestParameters(); parameters.setParameters(new HashMap()); String path = ... parameters.setPath(path); final IRequestTarget requestTarget = RequestCycle.get().getProcessor() .getRequestCodingStrategy().targetForR

Wicket 1.4 -> 1.5: AbstractMarkupFilter.nextTag

2012-02-07 Thread Thomas Singer
Wicket 1.4 code: final class FooFilter extends AbstractMarkupFilter { public MarkupElement nextTag() throws ParseException { ComponentTag tag = (ComponentTag)getParent().nextTag(); ... } } Should I replace it with final class FooFilter extends AbstractMarkupFilter { protected Mar

Re: Wicket 1.4 -> 1.5: IMarkupSettings.setMarkupParserFactory

2012-02-07 Thread Martin Grigorov
markupSettings.setMarkupFactory( new MarkupFactory() { ... } ); Please update the migration page. On Tue, Feb 7, 2012 at 11:43 AM, Thomas Singer wrote: > We have following code in our WebApplication's init method: > >  final IMarkupSettings markupSettings = getMarkupSettings(); >  markup

Wicket 1.4 -> 1.5: IMarkupSettings.setMarkupParserFactory

2012-02-07 Thread Thomas Singer
We have following code in our WebApplication's init method: final IMarkupSettings markupSettings = getMarkupSettings(); markupSettings.setMarkupParserFactory(new IMarkupParserFactory() { public MarkupParser newMarkupParser(MarkupResourceStream resource) { final MarkupParser parser =

Re: clustering wicket webapps

2012-02-07 Thread Kayode Odeyemi
Here's another example of IPageStore: https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/shiro-security/wicket-shiro/src/main/java/org/wicketstuff/shiro/wicket/page/store/SessionPageStore.java On Tue, Feb 7, 2012 at 8:13 AM, Martin Grigorov wrote: > Hi, > > You may read https://cwiki

Re: Wicket-Source: Click-through from browser back to Java source

2012-02-07 Thread danisevsky
Great work Jenny, thank you! It would be nice to have this feature in wicket live examples. Regards. 2012/2/6 Minas Manthos : > @armhold > I've also already started a plugin, but was too busy and had not the time to > test and to do some cleanup. :-) I think it's better to have a independent > pl

Re: Best practices for using CSS resource references

2012-02-07 Thread Jordi Deu-Pons
Hi Alec, I'm using this maven plugin on production releases: http://alchim.sourceforge.net/yuicompressor-maven-plugin/ that compress the CSS and the JS before packaging it into the WAR. On Tue, Feb 7, 2012 at 9:06 AM, Martin Grigorov wrote: > Hi, > > On Mon, Feb 6, 2012 at 11:03 PM, Alec Swan

Re: clustering wicket webapps

2012-02-07 Thread Martin Grigorov
Hi, You may read https://cwiki.apache.org/confluence/x/qIaoAQ page that describes how Wicket stores the pages. Sticky sessions are recommended because REDIRECT_TO_XYZ (see org.apache.wicket.settings.IRequestCycleSettings.RenderStrategy) store the response in a temporary memory store at the node wh

Re: Best practices for using CSS resource references

2012-02-07 Thread Martin Grigorov
Hi, On Mon, Feb 6, 2012 at 11:03 PM, Alec Swan wrote: > Hello, > > I have a LocalResourceScope class (aliased as "local" shared resource) > and style.css in the same package. I can access > resources/local/style.css directly from the browser and track the size > of HTTP request/response to retrie