Re: [Announce] WicketStuff 6.0.0 released
On Tue, Sep 11, 2012 at 7:56 AM, Hanzhi Dou wrote: > There are no wicketstuff-jasperreports and wicketstuff-shiro in maven central > for wicket 6, when they can also be available? When someone takes the time to port them to wicket 6. The release of wicketstuff projects is such that only modules that are actively supported are released en-masse. If nobody maintains a module, and it fails a build, it is taken out of the release procedure and left for future supporters. If/when these modules compile and test correctly, they can be added to the module section of the parent pom. Until someone verifies they work, they are not released. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [Announce] WicketStuff 6.0.0 released
There are no wicketstuff-jasperreports and wicketstuff-shiro in maven central for wicket 6, when they can also be available? Thanks! Hanzhi -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Announce-WicketStuff-6-0-0-released-tp4651865p4651902.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: Wicket 1.5 migration questions
Any update on this? How can I mount CSS and JS resources under /global/ without having to do a mountResource() for every such file? Thanks, Alec On Thu, Sep 6, 2012 at 12:07 PM, Alec Swan wrote: > But I want JavaScript files to be compresses by > JavaScriptResourceReference and CSS be served as > PackageResourceReference. How do I mount them both under /global URL > suffix? > > On Thu, Sep 6, 2012 at 12:02 PM, Martin Grigorov wrote: >> extend PackageResourceReference and override its #getName() to read >> the name from the request path/parameters >> mountResource("/global", new MyPRR()) >> >> On Thu, Sep 6, 2012 at 7:57 PM, Alec Swan wrote: >>> In 1.4 I had the following classes in com.myco.app.res package: >>> >>> GlobalJavascriptResourceReference extends JavaScriptResourceReference >>> GlobalCompressedResourceReference extends PackageResourceReference >>> GlobalResourceScope >>> >>> And Application had the following code: >>> getSharedResources().putClassAlias(GlobalResourceScope.class, "global") >>> >>> The caller would add resources as follows: >>> new GlobalJavascriptResourceReference(GlobalResourceScope.class, >>> "js/common.js"); >>> new GlobalCompressedResourceReference(GlobalResourceScope.class, >>> "css/styles.css"); >>> >>> How should I port this to 1.5 so that I can still access >>> http://../global/js/common.js and http://../global/js/styles.css? >>> >>> Thanks, >>> >>> Alec >>> >>> On Tue, Sep 4, 2012 at 5:10 PM, Martin Grigorov >>> wrote: On Tue, Sep 4, 2012 at 11:17 PM, Alec Swan wrote: > Well, mountPackage did not work for me either. > > Basically, what I want to do is access ALL resources in > com.myco.app.res package with "global" URL prefix. For example, access > a JavaScript file as global/events.js instead of > ../wicket/resource/com.myco.app.res.GlobalResourceScope/events.js URL. > In 1.4 it was simple with > putClassAlias(com.myco.app.res.GlobalResourceScope, "global"). > > How can I do this with 1.5? Why #mountResource() didn't work for you ? > > Thanks, > > Alec > > On Tue, Sep 4, 2012 at 10:59 AM, Alec Swan wrote: >> Tom, >> >> I have com.myco.app.res.GlobalResourceScope.class and events.js in the >> same package. So, putClassAlias(GlobalResourceScope.class, "global") >> in 1.4 would allow me to access http://../app/global/events.js in the >> browser. >> >> It seems like in 1.5 this is similar to mountPackage(String, Class> extends Page>) which means I have to change GlobalResourceScope class >> to extend Page, right? Why does it need to be a Page? >> >> Thanks, >> >> Alec >> >> On Tue, Sep 4, 2012 at 9:42 AM, Thomas Götz wrote: >>> I didn't get your usecase exactly yet, but maybe this will help you: >>> http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ >>> >>> Cheers, >>>-Tom >>> >>> >>> On 04.09.2012, at 17:33, Alec Swan wrote: >>> I saw the link explaining how to migrate "SharedResources#putClassAlias(GlobalResourceScope.class, "global")" before but was found it confusing because "global" and "images" aliases 1.4 version were replaced with "imgres" in 1.5 example. All I need to do is use "global" in place of GlobalResourceScope.class in the URLs. How do I do this in 1.5? >>> >>> >>> - >>> 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 >>> >> >> >> >> -- >> 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
Invalidate Session challenges
Hello, We are using wicket 1.5.8 and Im a little confused how the session invalidate functionality works. I have a simple piece of code similiar to the following getSession().invalidate(); setResponsePage(WicketApplication.get().getHomePage()); In general this works fine but during the wicket lifecycle whilst detaching objects the session.invalidateNow() method is called which destroys the session and ensures I get the following error java.lang.IllegalStateException: Cannot create a session after the response has been committed If I implement an empty invalidateNow method, or one that refers to my invalidate method then all appears to work ok I've seen a couple of posts on this previous but without a definitive answer Can anyone explain why the invalidateNow method is called within the lifecycle whilst detaching objects?? Rgds Colin
Re: HazelCast and Atmosphere Integration with Wicket 6
Hi, I just noticed a small error in my advice: the class is not called ThreadLocal but ThreadContext. The idea is very simple: try { ThreadContext.setApplication(application); /* do your thing */ } finally { ThreadContext.setApplication(null); } The problem with this code is that you might potentially overwrite the application in ThreadContext, therefore it is better to use the new method from wicket-atmosphere-0.4-SNAPSHOT: EventBus.get(application). 0.4 is better than 0.3 anyway, because it supports multiple tabs for the same page, has better cleanup on disconnections and is based on atmosphere-1.0.0, which fixes many issues. Best regards, Emond On Mon, Sep 10, 2012 at 4:13 PM, esajjkh wrote: > Hello Emonds, > > Thank you for your help. Will you please enlighten your idea of attaching > application with ThreadLocal with a code snippet? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/HazelCast-and-Atmosphere-Integration-with-Wicket-6-tp4651891p4651894.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: Setup Wicket in Eclipse without need to re-initialize the whole servlet container
Hello, Sebastian. You can try to use JRebel (http://zeroturnaround.com/software/jrebel/). This is a JVM agent, that eliminates the need for redeployment. You can read about JRebel and Wicket here: http://zeroturnaround.com/software/jrebel/how-to-use-jrebel-with-wicket/ P.S. JRebel is free for opensource projects. 2012/9/9 seba.wag...@gmail.com > Hi, > > we have set up Wicket in OpenMeetings and it is working fine! > > However the development cycle is pretty long: > Every change requires us to recompile and restart the servlet container. > As we use Wicket + Spring + openJPA a restart takes around 20 seconds > + compilations time, it takes around 30 seconds in total. > When working with UI components you regularly sit on your desk and > wait for this cycle to complete ;) > > Is there a way to develop and test Wicket more agile? > Is there some "Hot-plug" mechanism that does not require to reload the > whole servlet container with every change? > > Thanks! > Sebastian > > -- > Sebastian Wagner > https://twitter.com/#!/dead_lock > http://www.webbase-design.de > http://www.wagner-sebastian.com > seba.wag...@gmail.com > -- Best Regards, *Dmitry Zamula* Saint-Petersburg, Russia UTC/GMT +4 hours Mobile phone:+7 (904) 646-9254 Skype Id: brantner_ru E-mail: club.brant...@gmail.com
Re: HazelCast and Atmosphere Integration with Wicket 6
Hello Emonds, Thank you for your help. Will you please enlighten your idea of attaching application with ThreadLocal with a code snippet? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/HazelCast-and-Atmosphere-Integration-with-Wicket-6-tp4651891p4651894.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: HazelCast and Atmosphere Integration with Wicket 6
Hi, I don't know HazelCast, but the problem you are seeing is that EventBus.get() only works when the application is attached to the current thread. You either have to pass a reference to the EventBus to your broadcaster, or, if you have access to the Wicket Application, you can set it on ThreadLocal (make sure you unset it in a finally). wicket-atmosphere-0.4-SNAPSHOT has a EventBus.get(Application), where you can pass in to application to use. Best regards, Emonds On Monday 10 September 2012 05:38:15 esajjkh wrote: > Hi > > I am using HazelCast(HazelcastBroadcaster) and Atmosphere in Wicket 6 > application. When a new message is published the application throws a > *WicketRunTimeException* "There is no application attached with current > thread" in the follwing signature of MyHazelcastBroadcaster : > > class MyHazelcastBroadcaster extends HazelcastBroadcaster{ > .. > @Override > public void incomingBroadcast() { > ITopic topic = Hazelcast.getTopic(getID()); > topic.addMessageListener(new SSPMessageListner() { > > @Override > public void onMessage(String e) { > * EventBus.get().post(e);*//post the event so the method > with @Subscribe annotation should be called. >} > }); > > } > } > > In my ApplicationClass i configured this broadcaster and Atmospher like > this: > ... > MyHazelcastBroadcaster bc = (MyHazelcastBroadcaster) > BroadcasterFactory.getDefault().get(MY_EVENT); > bc.setUp(); > eventBus= new EventBus(this,bc) //my broadcaster is registered with > eventbus > > > Am I missing anything? Thank you! > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/HazelCast-and-Atmosphere-Integra > tion-with-Wicket-6-tp4651891.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
HazelCast and Atmosphere Integration with Wicket 6
Hi I am using HazelCast(HazelcastBroadcaster) and Atmosphere in Wicket 6 application. When a new message is published the application throws a *WicketRunTimeException* "There is no application attached with current thread" in the follwing signature of MyHazelcastBroadcaster : class MyHazelcastBroadcaster extends HazelcastBroadcaster{ .. @Override public void incomingBroadcast() { ITopic topic = Hazelcast.getTopic(getID()); topic.addMessageListener(new SSPMessageListner() { @Override public void onMessage(String e) { * EventBus.get().post(e);*//post the event so the method with @Subscribe annotation should be called. } }); } } In my ApplicationClass i configured this broadcaster and Atmospher like this: ... MyHazelcastBroadcaster bc = (MyHazelcastBroadcaster) BroadcasterFactory.getDefault().get(MY_EVENT); bc.setUp(); eventBus= new EventBus(this,bc) //my broadcaster is registered with eventbus Am I missing anything? Thank you! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/HazelCast-and-Atmosphere-Integration-with-Wicket-6-tp4651891.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
Problem with wicket-examples
Hi The wicket examples on the wicket.apache.org page keep going to some port. instead of staying on port 80. For example: Go to: http://www.wicket-library.com/wicket-examples/mappers and then try to do "Source code", you'll be send to: http://www.wicket-library.com:10440/wicket-examples/mappers/wicket/bookmarkable/org.apache.wicket.examples.source.SourcesPage?SourcesPage_class=org.apache.wicket.examples.requestmapper.RequestMapperHomePage Kind regards, Thijs - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket/Scala where to start?
Hi all, I'm addicted to Wicket for years, and recently became interested in Scala (a bit late? ;-)). Can anyone help me out where to start with integrating the two? There are some posts about it on the list, but they're all pretty outdated... Regards, -- Martijn Lindhout
Re: Do I need a custom ResourceAggregator
Yes, this is the way to do it. Most of the code in ResourceAggregator is about resolving dependencies and resource bundles. If your DojoRequireHeaderItem is never part of a bundle (which probably is the case), you can skip the 'getItemToBeRendered' part. Best regards, Emond On Sunday 09 September 2012 01:26:49 Gonzalo Aguilar Delgado wrote: > Hello, > > I can answer myself. > > I was studing wicket code and the examples and found a solution, > extending DecoratingHeaderResponse. It still makes me feel a little bit > lost but it works. > > I copied functionality from ResourceAggregator. > > > public class DojoAggregatorHeaderResponse extends > DecoratingHeaderResponse { > ... > > private void renderCombinedEventScripts() > { > StringBuilder combinedScript = new StringBuilder(); > List dojoDependencies = new ArrayList(); > for (DojoRequireHeaderItem curItem : > dojoRequireItemsToBeRendered) > { > HeaderItem itemToBeRendered = > getItemToBeRendered(curItem); > if (itemToBeRendered == curItem) > { > combinedScript.append("\n"); > combinedScript.append(curItem.getJavaScript()); > combinedScript.append(";"); > for(String requirement : > curItem.getDojoDependencies()) > { > > if(!dojoDependencies.contains(requirement)) > > dojoDependencies.add(requirement); // TODO Will be faster with a > hash? > } > } > else > { > getRealResponse().render(itemToBeRendered); > } > > } > if (combinedScript.length() > 0) > { > getRealResponse().render( > > DojoRequireHeaderItem.forScript(combinedScript.append("\n").toString(),dojoD > ependencies)); } > } > ... > } > > > > Is this correct way to do it? > > > Best regards, > > El sáb, 08-09-2012 a las 21:35 +0200, Gonzalo Aguilar Delgado escribió: > > Hello, > > > > I'm reimplementing my dojo interface again with version 6.0.0 of wicket. > > > > I need to replicate same functionality that gives ResourceAggregator + > > OnDomReadyHeaderItem. > > > > I mean, I need that every script that goes into the require when don is > > aggregated. > > > > > > require(["dojo/dom", "dojo/domReady!"], function(dom){ > > > > // All scripts here... > > > > }); > > > > > > So I just want to create a new header item called DojoReadyHeaderItem > > and add everything needed to the same script at the begining of the > > page. > > > > Behaviors will do something like this: > > > > response.render(DojoReadyHeaderItem.forScript("foobar")); > > > > response.render(DojoReadyHeaderItem.forScript("foobar2")); > > > > And the result will be like: > > > > > > require(["dojo/dom", "dojo/domReady!"], function(dom){ > > > > foobar; > > foobar2; > > > > }); > > > > > > How can I do this with current implementation? > > > > I don't know how to add my own ResourceAggregator... > > > > > > Thank you in advance. > > > > > > > > - > > 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
Wicket/Scala where to start
Hi all, I'm addicted to Wicket for years, and recently became interested in Scala (a bit late? ;-)). Can anyone help me out where to start with integrating the two? There are some posts about it on the list, but they're all pretty outdated... Regards, -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Scala-where-to-start-tp4651886.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