Re: Using interfaces as param type for Page constructor?
Hi, Default impl of IPageFactory interface in Wicket knows how to instantiate only pages with default (empty) constructor and with PageParameters as only parameter. If your page has your own parameters (like IHasTraits) then you need either to instantiate the page yourself (e.g. setResponsePage(new ProductRelease(someId, new SomeHasTraitsImpl( or setup a custom impl of IPageFactory that knows which impl to use for the custom parameters (in your case String and IHasTraits). On Mon, Sep 17, 2012 at 4:50 AM, Ondrej Zizka ozi...@redhat.com wrote: Hi, is there something what prevents Wicket use component constructor with an interface param instead of concrete object? I have two entities which share the same properties (leveraging Hibernate's @Embeddable) : public class ProductRelease implements Serializable, IHasTraits { ... } public class ProductLine implements Serializable, IHasTraits { ... } and public ReleaseTraitsBox( String id, final IHasTraits release ) { ... } But this throws upon constructing - wicket complains it can't find the constructor. Root cause: java.lang.NoSuchMethodError: org.jboss.essc.web._cp.pageBoxes.ReleaseTraitsBox.init(Ljava/lang/String;Lorg/jboss/essc/web/model/ProductRelease;)V at org.jboss.essc.web.pages.ReleasePage.init(ReleasePage.java:53) at org.jboss.essc.web.pages.ReleasePage.init(ReleasePage.java:39) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:170) I had to do this: // Wicket needs this :( public ReleaseTraitsBox( String id, final ProductLine prod ) { this( id, prod, 0 ); } public ReleaseTraitsBox( String id, final ProductRelease release ) { this( id, release, 0 ); } public ReleaseTraitsBox( String id, final IHasTraits release, int foo ) { super(id); Is there a better way? Wicket 1.5. Thanks, Ondra -- 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: Wicket+Spring+JUnit testing
Hi, From the code below I don't see what exactly doesn't work. It looks fine for me. For simpler cases/pages I'd recommend to use Wicket's ApplicationContextMock instead of using the whole Spring context because this will slow down your tests. Just do: ctx= new ApplicationContextMock(); ctx.put(someBeanName, new SomeServiceMock()); Put only the services (or mocks/stubs for them) which are used by this test. On Mon, Sep 17, 2012 at 12:45 AM, Sandor Feher sfe...@bluesystem.hu wrote: Hi, Could you please advice a stack for this task ? I went thru lots of (mostly obsolete) post with not much success. I have some spring beans which are not injected as I expected. Thank you in advance! -- package hu.xxx.xxx.main; import org.springframework.context.ApplicationContext; import org.springframework.test.context.transaction.TransactionConfiguration; import org.apache.wicket.spring.injection.annot.SpringComponentInjector; import org.junit.Before; import org.junit.runner.RunWith; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.ContextConfiguration; import org.apache.wicket.util.tester.WicketTester; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; /** * * @author user */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {applicationContext.xml, applicationContext-Security.xml}) @TransactionConfiguration(transactionManager = transactionManager, defaultRollback = false) public class LoginPageTest { @Autowired private ApplicationContext ctx; private WicketTester tester = null; @Before public void setUp() throws Exception { tester = new WicketTester(new MyApplication() { @Override protected void init() { SpringComponentInjector injector = new SpringComponentInjector(this, ctx); getComponentInstantiationListeners().add(injector); injector.inject(this); } }); } @Test public void renderPage() { tester.startPage(HomePage.class); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-JUnit-testing-tp4652021.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
Re: AjaxEditableLabel causes exceptions after session timeout
Hi, Usage of Wicket's Ajax behaviors make the page stateful, so there is no easy way to make it stateless. The easiest solution is to use org.apache.wicket.settings.IPageSettings#setRecreateMountedPagesAfterExpiry(false). This way you'll see the configured org.apache.wicket.settings.IApplicationSettings#getPageExpiredErrorPage() instead of a new instance of your page. On Mon, Sep 17, 2012 at 5:23 AM, Ondrej Zizka ozi...@redhat.com wrote: Hi, I use a AjaxEditableLabel with a PropertyModel which points to an object of the Page. But after the session expires, clicking on the label to edit it causes exception because the object of the page is empty (in my case, it results into HBN's NoResultException). What's the way to handle this? The page is mounted as /product/${name}/${version}, so the URL contains the information necessary to reload the entire page. So perhaps I could use some LoadableDetachableModel somehow? I've read about making the page stateless. Would that help? Thanks, Ondra -- 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: JavaScript execution on Ajax response in Wicket
Thanks Sebastian, I was able to resolve it based on your examples! Sebastian 2012/9/16 Sebastien seb...@gmail.com: Hi Sebastian The issue is that $(document).ready( function() is not called (or only the first time) a Panel is loaded via Ajax. IMHO, the main thing to understand while working with jQuery is that, when you re-attach your component, you need to re-execute the jQuery statement. A generic way to achieve this is to add (jQuery)behavior added to your component. In behavior#renderHead()): AjaxRequestTarget target = component.getRequestCycle().find(AjaxRequestTarget.class); if (target != null) { target.appendJavaScript(this.$()); } else { response.render(JavaScriptHeaderItem.forScript(this.$(), this.getToken())); } where #$() gets the jQuery statement. Additionally to the load of the Ajax Panel, we need to trigger an JavaScript event every time the table dynamically loads new records to the grid/table. You can achieve this in the same way as describe above, by attaching the statement you want to be executed. Feel free to have a look to the code severals jQuery / Wicket integrations did. For instance, the base JQueryAbstractBehavior of wicket-jquery-ui could be found here: https://github.com/sebfz1/wicket-jquery-ui/blob/wicket6/wicket-jquery-ui-core/src/main/java/com/googlecode/wicket/jquery/ui/JQueryAbstractBehavior.java Also, these integrations are designed to be extended and already solve these kind of issues... Best regards, Sebastien. On Sun, Sep 16, 2012 at 10:25 AM, seba.wag...@gmail.com seba.wag...@gmail.com wrote: Hi, we build a single page application and want to extend that with some jQuery plugins. The issue is that $(document).ready( function() is not called (or only the first time) a Panel is loaded via Ajax. Example1 JavaScript in HTML wicket:head: https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigsPanel.html?view=markup Line 27ff = Works, but only one time: The first time you initialize the Panel, $(document).ready is executed, the second time you click on the menu item / load the Panel via Ajax,the JavaScript is not executed Example2 JavaScript pragmatically injected by overwriting renderHead(HtmlHeaderContainer container): https://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigsPanel.java?view=markup Line 45ff = Works but $(document).ready is executed before the table with the id example is rendered in the UI, so you can't see any effect Additionally to the load of the Ajax Panel, we need to trigger an JavaScript event every time the table dynamically loads new records to the grid/table. From examples in the Net I can ready that AjaxRequestTarget is used for that. However the Panel itself does not provide a method to overwrite or similar to catch such events globally for a the component. I guess this is a common issue in Wicket, how do folks solve it? Thanks! Sebastian -- Sebastian Wagner https://twitter.com/#!/dead_lock http://www.webbase-design.de http://www.wagner-sebastian.com seba.wag...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Sebastian Wagner https://twitter.com/#!/dead_lock http://www.webbase-design.de http://www.wagner-sebastian.com seba.wag...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket+Spring+JUnit testing
Hi, An unitializes session variable caused my problem. First I thought it was injecting problem. Thank you for advices now I'm green :). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-JUnit-testing-tp4652021p4652030.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
bookmarkable page being processed twice, second time, extra parameters passed
Dear Forum, I have a bookmarkable page which can take two parameters: uniqueName=[uniqueName] and unique_id_key=[] For some reason, the page is being instantiated twice. The first time, the right parameters are being passed. The second time, a lot of parameters are being passed and one of the parameters has the wrong value: 0=[panel], 1=[style.css], uniqueName=[uniqueName], unique_id_key=[style] Has anyone experienced this before? how can one stop the second request coming through? Thanks in advance, Lucas -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/bookmarkable-page-being-processed-twice-second-time-extra-parameters-passed-tp4652031.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: Using and creating URLs to Bookmarkable Pages without Wicket Application
Hi Dirk, IEmailUrlProviderI have used a similar approach in a project. You just have to make sure Wicket's ThreadContext is properly set before you access Wicket functionality. Take a look at BaseWicketTester's constructor. Hope this helps Sven On 09/17/2012 07:10 AM, Dirk Forchel wrote: No more hints about generating bookmarkable page links with Wicket? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-and-creating-URLs-to-Bookmarkable-Pages-without-Wicket-Application-tp4652002p4652024.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: Using and creating URLs to Bookmarkable Pages without Wicket Application
Thank you for the hint. I just thought about using the WicketTester to mock the behavior (RequestCycle) of getting the url for a mounted page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-and-creating-URLs-to-Bookmarkable-Pages-without-Wicket-Application-tp4652002p4652033.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 6 - drupal markup is rendered totally wrong
Hi, underneath the first part where it goes wrong. Al the -tag is printed before the *html wicket makes from it:* style type=text/css media=all /**/ /**/ /**/ */-- /**/ style type=text/css media=print /*![CDATA[*/ @import url(http://tvh.test/sites/all/themes/TVH/css/print.css?mahlwc;); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-drupal-markup-is-rendered-totally-wrong-tp4652034p4652037.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
Catch the doGet/doPost on every request and override it
In Wicket, is there an easy way to override the doGet/doPost on every request in order to add some common code that should fire on every request? I used to know but forgot. The idea is to add some common code e.g. database transaction start/end for the request scope. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038.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: Catch the doGet/doPost on every request and override it
A plain old servlet filter will do the trick afaik. If you want Wicket (=1.5) specific code, RequestCycleListener's are your best bet. Martijn On Mon, Sep 17, 2012 at 3:59 PM, eugenebalt eugeneb...@yahoo.com wrote: In Wicket, is there an easy way to override the doGet/doPost on every request in order to add some common code that should fire on every request? I used to know but forgot. The idea is to add some common code e.g. database transaction start/end for the request scope. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038.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 -- 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
Re: Catch the doGet/doPost on every request and override it
add your requestcyclelistener and do it in onbeginrequest On Mon, Sep 17, 2012 at 7:29 PM, eugenebalt eugeneb...@yahoo.com wrote: In Wicket, is there an easy way to override the doGet/doPost on every request in order to add some common code that should fire on every request? I used to know but forgot. The idea is to add some common code e.g. database transaction start/end for the request scope. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038.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 -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: disabling ajax submit button
div class=submitareaa href=# wicket:id = submitButton1 class=button submitareaSUBMIT/a/div Sorry, you are right, it is an ajax link, not a button. On Thu, Sep 13, 2012 at 4:26 PM, Paul Bors p...@bors.ws wrote: I'm confused, the title is talking about an Ajax submit button yet your code snippet shows an AjaxSubmitLink. Perhaps you meant to use an AjaxButton in your Java code? What's the HTML mark-up you use with the Java code you showed us? ~ Thank you, Paul Bors -Original Message- From: Anna Simbirtsev [mailto:asimbirt...@gmail.com] Sent: Thursday, September 13, 2012 3:28 PM To: users@wicket.apache.org Subject: Re: disabling ajax submit button it does not work On Thu, Sep 13, 2012 at 11:53 AM, vineet semwal vineetsemwa...@gmail.comwrote: that should have worked... btw why not just button.setEnabled(false) ? On Thu, Sep 13, 2012 at 9:11 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: I am using wicket 1.4.3 and changing to the code you mentioned below, does not work as well:( Thanks On Wed, Sep 12, 2012 at 11:42 AM, Sébastien Gautrin sgaut...@telemetris.com wrote: Which wicket version ? (I ask because I see you are using several calls that are deprecated in 1.5). Besides, within the declaration of your inner class, don't try to access the variable you are defining (and without declaring it final, it should normally not compile anyway). Not changing the deprecated calls, this should probably look like : add(new SimpleAttributeModifier(**disabled, disabled)); target.addComponent(this); Original Message *Subject: *disabling ajax submit button *From: *Anna Simbirtsev asimbirt...@gmail.com *To: *users@wicket.apache.org *Date: *2012-09-12 Hi I am trying to disable ajax submit button after it has been clicked. AjaxSubmitLink submitButton1 = new AjaxSubmitLink(submitButton1**) { private static final long serialVersionUID = 1L; protected void onSubmit(AjaxRequestTarget target, final Form? form) { submitButton1.add( new SimpleAttributeModifier(**disabled, disabled)); target.addComponent(**submitButton1); } This does not work.:( -- regards, Vineet Semwal - 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: Catch the doGet/doPost on every request and override it
i didn't see last part of your mail see IRequestCycleListener onbeginrequest/onendrequest On Mon, Sep 17, 2012 at 7:29 PM, eugenebalt eugeneb...@yahoo.com wrote: In Wicket, is there an easy way to override the doGet/doPost on every request in order to add some common code that should fire on every request? I used to know but forgot. The idea is to add some common code e.g. database transaction start/end for the request scope. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038.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 -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Catch the doGet/doPost on every request and override it
What I'm looking for is some kind of an overridable onRequest() or a Request Listener that would apply to all requests within the Wicket app. (This must be done on the Request level, not on the Page level.) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652043.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: Catch the doGet/doPost on every request and override it
Thanks, I found an example here: http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/cycle/IRequestCycleListener.html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652044.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: Catch the doGet/doPost on every request and override it
Sorry, one more question. Is it possible to know which active Page I'm currently on during this request interception? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652045.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: Catch the doGet/doPost on every request and override it
see PageRequestHandlerTracker ,you can get first and last page of your request On Mon, Sep 17, 2012 at 7:55 PM, eugenebalt eugeneb...@yahoo.com wrote: Sorry, one more question. Is it possible to know which active Page I'm currently on during this request interception? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652045.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 -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Catch the doGet/doPost on every request and override it
Thanks so much!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652047.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: AjaxEditableLabel causes exceptions after session timeout
Ok, thanks. I set this.getPageSettings().setRecreateMountedPagesAfterExpiry(false); in the app class. But, to my previous point: The page is mounted and reached with all the necessary data (to get the entity). But on AjaxEditableLabel interaction, the page is created with empty PageParameters. Last cause: No entity found for query WicketMessage: Can't instantiate page using constructor 'public org.jboss.essc.web.pages.ReleasePage(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. Might be it doesn't exist, may be it is not visible (public). Is there a mechanism to let the page be re-created with the original PageParameters? Maybe they could be kept within JS of the page and sent with the AJAX request? That would probably need a change in Wicket's AJAX code. (Wicket 1.5) And also, this brings me to other question - how can I control session programatically? I have seen some pages, old ones, and mostly they do a timer-based ajax request on a page to keep the session alive. Is that a best practice? (Assuming I want to keep the session short for other pages). Thanks, Ondra On Mon, 2012-09-17 at 10:50 +0300, Martin Grigorov wrote: Hi, Usage of Wicket's Ajax behaviors make the page stateful, so there is no easy way to make it stateless. The easiest solution is to use org.apache.wicket.settings.IPageSettings#setRecreateMountedPagesAfterExpiry(false). This way you'll see the configured org.apache.wicket.settings.IApplicationSettings#getPageExpiredErrorPage() instead of a new instance of your page. On Mon, Sep 17, 2012 at 5:23 AM, Ondrej Zizka ozi...@redhat.com wrote: Hi, I use a AjaxEditableLabel with a PropertyModel which points to an object of the Page. But after the session expires, clicking on the label to edit it causes exception because the object of the page is empty (in my case, it results into HBN's NoResultException). What's the way to handle this? The page is mounted as /product/${name}/${version}, so the URL contains the information necessary to reload the entire page. So perhaps I could use some LoadableDetachableModel somehow? I've read about making the page stateless. Would that help? Thanks, Ondra
Re: AjaxEditableLabel causes exceptions after session timeout
On Mon, Sep 17, 2012 at 5:59 PM, Ondrej Zizka ozi...@redhat.com wrote: Ok, thanks. I set this.getPageSettings().setRecreateMountedPagesAfterExpiry(false); in the app class. But, to my previous point: The page is mounted and reached with all the necessary data (to get the entity). But on AjaxEditableLabel interaction, the page is created with empty PageParameters. Last cause: No entity found for query WicketMessage: Can't instantiate page using constructor 'public org.jboss.essc.web.pages.ReleasePage(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. Might be it doesn't exist, may be it is not visible (public). Is there a mechanism to let the page be re-created with the original PageParameters? Maybe they could be kept within JS of the page and sent with the AJAX request? That would probably need a change in Wicket's AJAX code. (Wicket 1.5) That was the case until recently but there was no way to differentiate between original page parameters and custom request parameters for the Ajax request itself. So we took the safest way by dropping all parameters when a page is being auto-recreated. And also, this brings me to other question - how can I control session programatically? I have seen some pages, old ones, and mostly they do a timer-based ajax request on a page to keep the session alive. Is that a best practice? (Assuming I want to keep the session short for other pages). I am not aware of another way to do this. Thanks, Ondra On Mon, 2012-09-17 at 10:50 +0300, Martin Grigorov wrote: Hi, Usage of Wicket's Ajax behaviors make the page stateful, so there is no easy way to make it stateless. The easiest solution is to use org.apache.wicket.settings.IPageSettings#setRecreateMountedPagesAfterExpiry(false). This way you'll see the configured org.apache.wicket.settings.IApplicationSettings#getPageExpiredErrorPage() instead of a new instance of your page. On Mon, Sep 17, 2012 at 5:23 AM, Ondrej Zizka ozi...@redhat.com wrote: Hi, I use a AjaxEditableLabel with a PropertyModel which points to an object of the Page. But after the session expires, clicking on the label to edit it causes exception because the object of the page is empty (in my case, it results into HBN's NoResultException). What's the way to handle this? The page is mounted as /product/${name}/${version}, so the URL contains the information necessary to reload the entire page. So perhaps I could use some LoadableDetachableModel somehow? I've read about making the page stateless. Would that help? Thanks, Ondra -- 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
ClassNotFoundException I'm out of ideas.
If I start it with eclipse-jetty it's works. If i start it with a tomcat 6 follow exeption shows up. I tried to fix it. but I dont have really a clou what's wrong. /Sep 17, 2012 4:58:56 PM org.apache.catalina.core.StandardContext filterStart Schwerwiegend: Exception starting filter wicket.InfoScreen java.lang.ClassNotFoundException: org.apache.wicket.protocol.http.WicketFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:269) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Sep 17, 2012 4:58:56 PM org.apache.catalina.core.StandardContext start Schwerwiegend: Error filterStart Sep 17, 2012 4:58:56 PM org.apache.catalina.core.StandardContext start Schwerwiegend: Context [/InfoScreen] startup failed due to previous errors Sep 17, 2012 4:58:56 PM org.apache.catalina.startup.HostConfig deployDirectory Information: Deploying web application directory ROOT Sep 17, 2012 4:58:56 PM org.apache.coyote.http11.Http11Protocol start Information: Starting Coyote HTTP/1.1 on http-8080 Sep 17, 2012 4:58:56 PM org.apache.catalina.startup.Catalina start Information: Server startup in 614 ms/ my configuration: wicket.version1.5.4/wicket.version jqwicket.version0.8/jqwicket.version jetty.version7.5.0.v20110901/jetty.version slf4j.version1.6.2/slf4j.version log4j.version1.2.16/log4j.version junit.version4.8.1/junit.version java.version1.7/java.version spring.version3.0.2.RELEASE/spring.version hibernate.version3.5.1-Final/hibernate.version wicket-html5.version1.5-RC5.1/wicket-html5.version fullcalendar.version1.2.1/fullcalendar.version tinymce.version1.5.5/tinymce.version -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ClassNotFoundException-I-m-out-of-ideas-tp4652049.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: ClassNotFoundException I'm out of ideas.
What did you check already ? On Mon, Sep 17, 2012 at 6:09 PM, zarathustra wicketfo...@noxin.ch wrote: If I start it with eclipse-jetty it's works. If i start it with a tomcat 6 follow exeption shows up. I tried to fix it. but I dont have really a clou what's wrong. /Sep 17, 2012 4:58:56 PM org.apache.catalina.core.StandardContext filterStart Schwerwiegend: Exception starting filter wicket.InfoScreen java.lang.ClassNotFoundException: org.apache.wicket.protocol.http.WicketFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:269) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Sep 17, 2012 4:58:56 PM org.apache.catalina.core.StandardContext start Schwerwiegend: Error filterStart Sep 17, 2012 4:58:56 PM org.apache.catalina.core.StandardContext start Schwerwiegend: Context [/InfoScreen] startup failed due to previous errors Sep 17, 2012 4:58:56 PM org.apache.catalina.startup.HostConfig deployDirectory Information: Deploying web application directory ROOT Sep 17, 2012 4:58:56 PM org.apache.coyote.http11.Http11Protocol start Information: Starting Coyote HTTP/1.1 on http-8080 Sep 17, 2012 4:58:56 PM org.apache.catalina.startup.Catalina start Information: Server startup in 614 ms/ my configuration: wicket.version1.5.4/wicket.version jqwicket.version0.8/jqwicket.version jetty.version7.5.0.v20110901/jetty.version slf4j.version1.6.2/slf4j.version log4j.version1.2.16/log4j.version junit.version4.8.1/junit.version java.version1.7/java.version spring.version3.0.2.RELEASE/spring.version hibernate.version3.5.1-Final/hibernate.version wicket-html5.version1.5-RC5.1/wicket-html5.version fullcalendar.version1.2.1/fullcalendar.version tinymce.version1.5.5/tinymce.version -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ClassNotFoundException-I-m-out-of-ideas-tp4652049.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:
Re: bookmarkable page being processed twice, second time, extra parameters passed
The only similar issues i have come across are with plugins to my browser (firebug etc) causing second requests without any parameters. But this may be something similar. On 17 September 2012 11:18, lucast lucastol...@hotmail.com wrote: Dear Forum, I have a bookmarkable page which can take two parameters: uniqueName=[uniqueName] and unique_id_key=[] For some reason, the page is being instantiated twice. The first time, the right parameters are being passed. The second time, a lot of parameters are being passed and one of the parameters has the wrong value: 0=[panel], 1=[style.css], uniqueName=[uniqueName], unique_id_key=[style] Has anyone experienced this before? how can one stop the second request coming through? Thanks in advance, Lucas -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/bookmarkable-page-being-processed-twice-second-time-extra-parameters-passed-tp4652031.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 -- Fergal Keating IT Senior Engineer --- e. fergal.keat...@directski.com p. NA w. www.directski.com
Wicket 6.0.0: RenderStrategy.REDIRECT_TO_RENDER and missing FeedbackMessages in ComponentFeedbackPanel.
We're using RenderStrategy.REDIRECT_TO_RENDER (ie redirect after post strategy; in 1.4.x this was working fine and our FeedbackMessage's were rendered correctly against their reporter using ComponentFeedbackPanel. Having upgraded to 6.0.0, the messages no longer appear. Investigating, it seems that the FeedbackMessage#detach() causes reporter to be set to null, meaning that the ComponentFeedbackPanel's filter makes no match on the subsequent render. Changing the RenderStrategy to REDIRECT_TO_BUFFER causes the feedback messages to appear. This looks like a regression to me? But perhaps there's something I'm meant to do that isn't in the 6.0.0 migration notes? Any advice welcome! Dan
Re: ClassNotFoundException I'm out of ideas.
Hello zarathustra, Sorry if this is stating the obvious, but it looks like a classpath issue, are you sure that the wicket jar is being included in your servlet's lib directory? One way to find out what's in your classpath is to simply print it out with a jsp: Try saving the following as a jsp file and then put it in the root context of your servlet, remove any references to wicket or the wicket filter (in the web.xml file) and then see if the jsp prints out the wicket jar myclasspath.jsp then point to it http://localhost:8080/myclasspath.jsp (or http://localhost:8080/myappcontext/myclasspath.jsp or whatever) it should print out the wicket.jar and the wicket-extensions.jar Hope this helps Cheers Simon -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ClassNotFoundException-I-m-out-of-ideas-tp4652049p4652054.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
Is dataview/table with multiple rows possible?
Hi, I need a dataview/table with multipe rows One row is no problem, so who can help me with an example with 2 rows? # -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-dataview-table-with-multiple-rows-possible-tp4652055.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: Is dataview/table with multiple rows possible?
Please have a look at http://www.wicket-library.com/wicket-examples/repeater -Tom On 17.09.2012, at 20:37, Delange delan...@telfort.nl wrote: Hi, I need a dataview/table with multipe rows One row is no problem, so who can help me with an example with 2 rows? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is dataview/table with multiple rows possible?
I did, none of them have multiple rows What I mean is for example: How to do that? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-dataview-table-with-multiple-rows-possible-tp4652055p4652057.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: Is dataview/table with multiple rows possible?
http://www.wicket-library.com/wicket-examples-6.0.x/tree/wicket/bookmarkable/org.apache.wicket.examples.tree.TableTreePage On Mon, Sep 17, 2012 at 9:57 PM, Delange delan...@telfort.nl wrote: I did, none of them have multiple rows What I mean is for example: How to do that? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Is-dataview-table-with-multiple-rows-possible-tp4652055p4652057.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
Wicket 6 Websocket Example
Is there a working Wicket 6.0.0 Websocket example written in Java? The only demo provided here on the wiki page is written in Scala. https://cwiki.apache.org/WICKET/wicket-native-websockets.html The other demo I found has outdated dependencies on Wicket 6.0-SNAPSHOT and wicket-native-websocket-tomcat 0.1-SNAPSHOT and will not compile after altering these dependencies to 6.0.0 and 0.2 respectively. Can someone point me to a working Wicket 6.0.0 Websocket demo? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 6 Websocket Example
Hi, http://wicketinaction.com/2012/07/wicket-6-native-websockets/ This is the Java example. What is the problem with compiling it ? On Mon, Sep 17, 2012 at 11:13 PM, sfwicket li...@bgb.net wrote: Is there a working Wicket 6.0.0 Websocket example written in Java? The only demo provided here on the wiki page is written in Scala. https://cwiki.apache.org/WICKET/wicket-native-websockets.html The other demo I found has outdated dependencies on Wicket 6.0-SNAPSHOT and wicket-native-websocket-tomcat 0.1-SNAPSHOT and will not compile after altering these dependencies to 6.0.0 and 0.2 respectively. Can someone point me to a working Wicket 6.0.0 Websocket demo? Thanks! - 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: Wicket 6 Websocket Example
ChartsResourceReference.java will not compile with a missing import on: import org.apache.wicket.request.resource.ExternalUrlResourceReference; This is with the Wicket version set in the pom.xml as either 6.0-SNAPSHOT (as it currently is) or changing it to 6.0.0. also, the pom.xml will not resolve this dependency: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-native-websocket-tomcat/artifactId version0.1-SNAPSHOT/version /dependency but I found version 0.2 or 0.3-SNAPSHOT do resolve. similarly for the wicket-native-websocket-jetty artifact. Quoting Martin Grigorov mgrigo...@apache.org: Hi, http://wicketinaction.com/2012/07/wicket-6-native-websockets/ This is the Java example. What is the problem with compiling it ? On Mon, Sep 17, 2012 at 11:13 PM, sfwicket li...@bgb.net wrote: Is there a working Wicket 6.0.0 Websocket example written in Java? The only demo provided here on the wiki page is written in Scala. https://cwiki.apache.org/WICKET/wicket-native-websockets.html The other demo I found has outdated dependencies on Wicket 6.0-SNAPSHOT and wicket-native-websocket-tomcat 0.1-SNAPSHOT and will not compile after altering these dependencies to 6.0.0 and 0.2 respectively. Can someone point me to a working Wicket 6.0.0 Websocket demo? Thanks! - 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: Wicket 6 Websocket Example
This class has been renamed to UrlResourceReference. Remove 'External' and it should work. On Mon, Sep 17, 2012 at 11:41 PM, sfwicket li...@bgb.net wrote: ChartsResourceReference.java will not compile with a missing import on: import org.apache.wicket.request.resource.ExternalUrlResourceReference; This is with the Wicket version set in the pom.xml as either 6.0-SNAPSHOT (as it currently is) or changing it to 6.0.0. also, the pom.xml will not resolve this dependency: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-native-websocket-tomcat/artifactId version0.1-SNAPSHOT/version /dependency but I found version 0.2 or 0.3-SNAPSHOT do resolve. similarly for the wicket-native-websocket-jetty artifact. Quoting Martin Grigorov mgrigo...@apache.org: Hi, http://wicketinaction.com/2012/07/wicket-6-native-websockets/ This is the Java example. What is the problem with compiling it ? On Mon, Sep 17, 2012 at 11:13 PM, sfwicket li...@bgb.net wrote: Is there a working Wicket 6.0.0 Websocket example written in Java? The only demo provided here on the wiki page is written in Scala. https://cwiki.apache.org/WICKET/wicket-native-websockets.html The other demo I found has outdated dependencies on Wicket 6.0-SNAPSHOT and wicket-native-websocket-tomcat 0.1-SNAPSHOT and will not compile after altering these dependencies to 6.0.0 and 0.2 respectively. Can someone point me to a working Wicket 6.0.0 Websocket demo? Thanks! - 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
Re: Wicket 6 Websocket Example
got it - thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Websocket-Example-tp4652059p4652064.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 6 Websocket Example
Good! I've updated the code of the demo apps in my repository. On Mon, Sep 17, 2012 at 11:57 PM, sfwicket li...@bgb.net wrote: got it - thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Websocket-Example-tp4652059p4652064.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
Wicket 6 / Modal Dialogs and Safari
In Wicket 6 using Safari, a modal dialog will not allow interactions with form components. The whole dialog always seems to be in drag mode. Click anyw here on the panel and the dialog will drag. Interaction works fine with all other browsers. Safari interaction works fine with previous Wicket release. Is this a known issue? I have a QuickStart if needed. Thanks Geoff -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Modal-Dialogs-and-Safari-tp4652066.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 6 Websocket Example
Thanks... the Tomcat artifact could be switched to 0.2 as well - I know its commented out but would make it easier switching from Jetty to Tomcat. Curious though in the example, ChartsResourceReference.java: JavaScriptHeaderItem.forReference(WicketWebSocketJQueryResourceReference.get()) presumably adds: to the header, but it also seems that by adding a WebSocketBehavior to the Panel, this is automatically included. Just trying to figure the bare minimum to get a WebsocketBehavior to work. Is adding this resource reference necessary? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Websocket-Example-tp4652059p4652067.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 6 / Modal Dialogs and Safari
This issue can also be seen here: http://www.wicket-library.com/wicket-examples-6.0.x/ajax/modal-window Using Safari, the dialog appears to resize rather that select input fields -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Modal-Dialogs-and-Safari-tp4652066p4652068.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
PageReference as page parameter?
Hello, I have a very common pattern in which from a list, I can to detail of an element in the list. In the detail page I have a reference back to the page list. The page list can be different, several list might point to the same detail. Until now I have been using page reference to return to the previous page, and it works well. However, passing the page reference to the constructor of the detail page, means that page is not bookmarkable (unless I am mistaking something) Is there a way a can pass the page reference as a request parameter, and so make the page bookmarkable? (ex. by using id, page map, etc). Of course if no page reference can be retraced from the map, then we just ignore the back reference. Any ideas? - Nelson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: PageReference as page parameter?
you can pass in the page id obtained from page#getpageid() as a bookmarkable url, then to navigate back to the original page you can do setResponsePage(new PageReference(pageid).getPage()) this will, however, leave you on a nonbookmarkable url when you come back. if you want bookmarkable urls all the way around then you need to do what stateless frameworks do, pass the return url to the detail page as a parameter. -igor On Mon, Sep 17, 2012 at 3:07 PM, Nelson Segura nsegu...@gmail.com wrote: Hello, I have a very common pattern in which from a list, I can to detail of an element in the list. In the detail page I have a reference back to the page list. The page list can be different, several list might point to the same detail. Until now I have been using page reference to return to the previous page, and it works well. However, passing the page reference to the constructor of the detail page, means that page is not bookmarkable (unless I am mistaking something) Is there a way a can pass the page reference as a request parameter, and so make the page bookmarkable? (ex. by using id, page map, etc). Of course if no page reference can be retraced from the map, then we just ignore the back reference. Any ideas? - Nelson - 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: PageReference as page parameter?
That is what I thought, but PageReference constructor is not public, so I cannot do that, unless I am missing something? But I could do (Page)Session.get().getPageManager().getPage(pageId) As PageReference does internally, correct? - Nelson On Mon, Sep 17, 2012 at 3:11 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: you can pass in the page id obtained from page#getpageid() as a bookmarkable url, then to navigate back to the original page you can do setResponsePage(new PageReference(pageid).getPage()) this will, however, leave you on a nonbookmarkable url when you come back. if you want bookmarkable urls all the way around then you need to do what stateless frameworks do, pass the return url to the detail page as a parameter. -igor On Mon, Sep 17, 2012 at 3:07 PM, Nelson Segura nsegu...@gmail.com wrote: Hello, I have a very common pattern in which from a list, I can to detail of an element in the list. In the detail page I have a reference back to the page list. The page list can be different, several list might point to the same detail. Until now I have been using page reference to return to the previous page, and it works well. However, passing the page reference to the constructor of the detail page, means that page is not bookmarkable (unless I am mistaking something) Is there a way a can pass the page reference as a request parameter, and so make the page bookmarkable? (ex. by using id, page map, etc). Of course if no page reference can be retraced from the map, then we just ignore the back reference. Any ideas? - Nelson - 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: PageReference as page parameter?
its public in 6. but yeah, you can do that yourself. -igor On Mon, Sep 17, 2012 at 3:20 PM, Nelson Segura nsegu...@gmail.com wrote: That is what I thought, but PageReference constructor is not public, so I cannot do that, unless I am missing something? But I could do (Page)Session.get().getPageManager().getPage(pageId) As PageReference does internally, correct? - Nelson On Mon, Sep 17, 2012 at 3:11 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: you can pass in the page id obtained from page#getpageid() as a bookmarkable url, then to navigate back to the original page you can do setResponsePage(new PageReference(pageid).getPage()) this will, however, leave you on a nonbookmarkable url when you come back. if you want bookmarkable urls all the way around then you need to do what stateless frameworks do, pass the return url to the detail page as a parameter. -igor On Mon, Sep 17, 2012 at 3:07 PM, Nelson Segura nsegu...@gmail.com wrote: Hello, I have a very common pattern in which from a list, I can to detail of an element in the list. In the detail page I have a reference back to the page list. The page list can be different, several list might point to the same detail. Until now I have been using page reference to return to the previous page, and it works well. However, passing the page reference to the constructor of the detail page, means that page is not bookmarkable (unless I am mistaking something) Is there a way a can pass the page reference as a request parameter, and so make the page bookmarkable? (ex. by using id, page map, etc). Of course if no page reference can be retraced from the map, then we just ignore the back reference. Any ideas? - Nelson - 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
Wicket 6 + WebSocket + Apache + mod_jk
I have realized my WebSocket connection was closing briefly after opening because I have Apache httpd on port 80 with mod_jk running in front of my Tomcat instance on port 8080. When I connect directly on 8080 to Tomcat the Wicket WebSocket demo app works. What is the recommended configuration to allow a WebSocket app to run through Apache to Tomcat/Wicket and/or how do you adjust mod_jk to allow the WebSocket connection? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-WebSocket-Apache-mod-jk-tp4652073.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 6 / Modal Dialogs and Safari
I have a proposed fix - please let me know if I've analyzed the problem correctly. The modal dialog tries to set event.ignore=true if the browser is Safari. This Wicket event data structure used to be passed through to Wicket.Drag.mouseDownHandler as the argument e. However, in the switch over to jQuery events the argument (e) passed to mouseDownHandler is no longer Wicket event. It is now jQuery event data. There is a test in mouseDownHandler to check for the existence of e.ignore. As this is now jQuery data, it _never_ exists, so Safari is never recognized. I changed this test to check event.ignore and it appears to work correctly. Patch file attached. http://apache-wicket.1842946.n4.nabble.com/file/n4652074/Fix_to_Wicket_6___Safari_modal_window_drag_issue.patch Fix_to_Wicket_6___Safari_modal_window_drag_issue.patch -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Modal-Dialogs-and-Safari-tp4652066p4652074.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 6 / Modal Dialogs and Safari
My apologies... the patch file was incomplete. This one supersedes the previous one http://apache-wicket.1842946.n4.nabble.com/file/n4652075/Fix_to_Wicket_6___Safari_modal_window_drag_issue1.patch Fix_to_Wicket_6___Safari_modal_window_drag_issue1.patch -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Modal-Dialogs-and-Safari-tp4652066p4652075.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: AjaxEditableLabel causes exceptions after session timeout
Is there a mechanism to let the page be re-created with the original PageParameters? Maybe they could be kept within JS of the page and sent with the AJAX request? That would probably need a change in Wicket's AJAX code. (Wicket 1.5) That was the case until recently but there was no way to differentiate between original page parameters and custom request parameters for the Ajax request itself. So we took the safest way by dropping all parameters when a page is being auto-recreated. Could this be made optional? Because, in case the developer knows that the URL has all the data the page needs to be recreated, he could setSendPageParametersOnAjaxRequests(true) or such... That would make life with Ajax components easier... would it? :-) Or maybe I don't get this fully, as I don't know the Wicket internals... in which case, I believe you there was no way. If you have a minute, could you briefly explain that or point me to some wiki? Thanks. Ondra
Auto PageParameters from a POJO?
Hi, I found myself repeatedly creating a PageParameters object from some domain object for BookmarkablePageLink just to have it then parsed back to that same domain object. Example: Release rel { product: AS; version: 7.1.2 } = add( new BookmarkablePageLink ( link, ReleasePage.class, new PageParameters() .add(product, rel.getProduct().getName()) .add(version, rel.getVersion() ) ) ); So to avoid repeating that all the time, I created (besides a link component) this in ReleasePage: public static PageParameters createPageParameters( Release rel ){ return new PageParameters() .add(product, rel.getProduct().getName()) .add(version, rel.getVersion() ); } And I was thinking - is there some mechanism to automatically create the params from the domain object, using properties matching against mount() string? E.g. like this: mountPage(/release/${product.name}/${version}, ReleasePage.class); new BookmarkablePageLink ( link, ReleasePage.class, rel); // This would create page params the properties. Anything like this available? If not, is it doable? It would reduce quite some boilerplate code. Thanks, Ondra
Re: [announce] Wicket-CDI for Wicket 6.0.0 released
Jeremy, the archetype is already on the Gamboa project repository: http://github.com/brunoborges/gamboa-project :-) It's just not up to date *Bruno Borges* (11) 99564-9058 *www.brunoborges.com* On Thu, Sep 13, 2012 at 11:39 AM, Jeremy Thomerson jer...@wickettraining.com wrote: On Wed, Sep 12, 2012 at 3:59 PM, Bruno Borges bruno.bor...@gmail.com wrote: This is really great Igor, thanks. I am preparing my slides for my Wicket/Java EE session at JavaOne, and this just came in perfect time. I'll update my archetype and some slides to show this and let everyone know about =) Will you be posting those slides and archetype somewhere non-attendees can access when done? -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*