Wicket 1.5 and custom request cycle

2011-02-10 Thread Bertrand Guay-Paquet
Hello, Disclaimer: I am a relatively new Wicket user I use a custom session to store the current user Id and I want to use the request cycle to store the current user object which is fetched from the DB on each request following advice from

Re: Wicket 1.5 and custom request cycle

2011-02-10 Thread Bertrand Guay-Paquet
i just fixed this last night, will be part of rc2. -igor On Thu, Feb 10, 2011 at 10:46 AM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hello, Disclaimer: I am a relatively new Wicket user I use a custom session to store the current user Id and I want to use the request cycle to store

Default session timezone

2011-02-23 Thread Bertrand Guay-Paquet
. Is this the correct way to set a default time zone? Thank you Bertrand Guay-Paquet - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: Default session timezone

2011-02-23 Thread Bertrand Guay-Paquet
I created issue WICKET-3477. I first wanted to confirm that my approach was the right one. On 23/02/2011 2:20 PM, Martin Grigorov wrote: Please create a quickstart and attach it to a ticket. On Wed, Feb 23, 2011 at 6:47 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, I am using

Wicket 1.5 events and Eclipse

2011-03-03 Thread Bertrand Guay-Paquet
Hi, Since integrating the 1.5 branch in my project, I have an annoying behavior in Eclipse 3.6 with the new Wicket events. Whenever I subclass Component or one of its subclasses and click on Add unimplemented methods, the following method is added : public T void send(IEventSink a_sink,

Re: Run a standalone wicket app

2011-03-07 Thread Bertrand Guay-Paquet
Have a look at the Wicket quickstart project under src/test/java/com/mycompany/Start.java. There is a main() method there that does exactly what you describe. On 07/03/2011 12:34 PM, Brown, Berlin [GCG-PFS] wrote: That is a more a jetty question. Research the server jetty classes. ...

1.5 IEventSink adapted as behavior

2011-03-07 Thread Bertrand Guay-Paquet
Hello, I am currently using the new inter-component events system to communicate between components. My primary use is to bubble up requests (ajax requests, switch panel events) to parent components. This enables decoupling inner panels so they can be reused more easily in other panels. I

Re: 1.5 IEventSink adapted as behavior

2011-03-07 Thread Bertrand Guay-Paquet
Ok I created https://issues.apache.org/jira/browse/WICKET-3516WICKET-3516 Add behaviors to the event processing chain On 07/03/2011 2:35 PM, Igor Vaynberg wrote: hrm. add an rfe to add behaviors to event chain. -igor On Mon, Mar 7, 2011 at 11:21 AM, Bertrand Guay-Paquet ber

Re: Wicket thinks setOutputMarkupId property is not set to true

2011-03-10 Thread Bertrand Guay-Paquet
You did say that you set output markup ID to true on both components, but maybe you should double check that. I had a very similar problem once with an AjaxTabbedPanel that went like this: 1-The first displayed panel (tab) did not have setOutputMarkupId(true); 2-When the second tab is selected

Re: Apache Wicket Cookbook Published!

2011-03-25 Thread Bertrand Guay-Paquet
Looking forward to reading it! My copy is in the mail. On 25/03/2011 1:44 PM, Igor Vaynberg wrote: For the past nine months I have been quietly working on a book about Wicket. Unlike other books on the market this one does not attempt to teach you Wicket from the ground up. Instead, it is for

Re: flexible authentication

2011-03-30 Thread Bertrand Guay-Paquet
If I understand correctly, Marc wants to build a contact details page which can either be public (unprotected), private or semi-private (think Facebook privacy settings) based on a user preference, most likely stored in a database. I am also trying to implement a similar mechanism and I am

Re: Wicket For Mobile

2011-04-05 Thread Bertrand Guay-Paquet
Be sure to check for usage of modal windows on Android. I tried using them on mine and for some reason it was impossible to close the window with the X in the upper right corner. On 05/04/2011 6:27 AM, nino martinez wael wrote: also works fine on android 2.2 using webkit.. 2011/4/4 Pedro

Ajax DataTable navigation links

2011-05-03 Thread Bertrand Guay-Paquet
Hello, I am using an AjaxFallbackDefaultDataTable and getting the AccessDeniedPage when clicking too fast on navigation links. This happens for example when the displayed page is the second to last and 2 clicks are quickly made on the forwardnavigation link before the Ajax response is

Re: Ajax DataTable navigation links

2011-05-04 Thread Bertrand Guay-Paquet
I ended up implementing the solution proposed here : http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/ It's an all or nothing solution, but it works. On 03/05/2011 10:52 AM, Bertrand Guay-Paquet wrote: Hello, I am using an AjaxFallbackDefaultDataTable

Maven and Wicket Trunk

2011-05-10 Thread Bertrand Guay-Paquet
Hi, I am currently using Wicket Trunk (1.5) for development and building my own snapshots with documentation for continuous integration. I periodically update my trunk source tree and use the following command line : mvn install -Dmaven.test.skip=true -DperformRelease=true This works fine

Re: Maven and Wicket Trunk

2011-05-10 Thread Bertrand Guay-Paquet
, May 10, 2011 at 3:02 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, I am currently using Wicket Trunk (1.5) for development and building my own snapshots with documentation for continuous integration. I periodically update my trunk source tree and use the following command line : mvn

Re: FormComponent convertInput for children FormComponets

2011-05-19 Thread Bertrand Guay-Paquet
Hi, I am doing the same kind of processing and it works fine. I have a FormComponentPanel with children FormComponentPanels. Here is what the convertInput() method looks like for the root FormComponentPanel: protected void convertInput() { // Retrieve all children final ListFoo

WicketFilter.init() called twice with Glassfish

2011-07-01 Thread Bertrand Guay-Paquet
Hello, I am deploying a Wicket 1.5 application inside an EAR on Glassfish 3.1. I noticed that the debug bar was doubled at the top of the browser window (2 full debug bars). After investigation, the problem is that WicketFIlter.init() is being called twice each time I start the server. This

Re: WicketFilter.init() called twice with Glassfish

2011-07-02 Thread Bertrand Guay-Paquet
location, but there might be other similar issues elsewhere. Bertrand On 01/07/2011 12:54 PM, Harald Wellmann wrote: Am 01.07.2011 18:30, schrieb Bertrand Guay-Paquet: Hello, I am deploying a Wicket 1.5 application inside an EAR on Glassfish 3.1. I noticed that the debug bar was doubled

Re: WicketFilter.init() called twice with Glassfish

2011-07-03 Thread Bertrand Guay-Paquet
it to ... On 03/07/2011 8:35 AM, Martin Grigorov wrote: Hi, On Sun, Jul 3, 2011 at 12:35 AM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Thanks for your answer Harald. I had taken a look at that bug as well, but this is not my case. I don't even have to access a web page to see

Re: WicketFilter.init() called twice with Glassfish

2011-07-03 Thread Bertrand Guay-Paquet
introduce .ear/lib recently ? On Sun, Jul 3, 2011 at 6:47 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi Martin, I wanted to make my message shorter, but I should have posted the whole thing to avoid the confusion. You are right that a set is returned and not a list of course. However

Re: WicketFilter.init() called twice with Glassfish

2011-07-03 Thread Bertrand Guay-Paquet
() : getApplicationSettings().setClassResolver(new CustomClassResolver()); On 03/07/2011 2:40 PM, Bertrand Guay-Paquet wrote: Hi, I have very recently transitioned from Embedded Jetty (single WAR) to Java EE 6 and EAR-based deployment (Glassfish v3.1). I started being able to see actual Wicket pages with EJB

Re: WicketFilter.init() called twice with Glassfish

2011-07-04 Thread Bertrand Guay-Paquet
Thanks for sharing this information Attila! The folks at Glassfish suggested I use URIs as well. I created WICKET-3867 to change URLs to URIs. On 04/07/2011 1:48 AM, Attila Király wrote: Using java.net.URL in Set-s and Map-s is a no-no. Wicket should use java.net.URI instead. See [1] for an

Re: Loading wicket components from javascript

2011-07-17 Thread Bertrand Guay-Paquet
Hi, Have you seen http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/ ? I used this method to add form inputs via ajax. If I understand correctly what you want to do, you should be able to use this for adding labels. Bertrand On 17/07/2011 9:23 AM,

Re: dynamic DataTable

2011-07-22 Thread Bertrand Guay-Paquet
Hi, Here is the outline of a possible implementation : Execute SQL String Create a ListIColumnSQLResultRow for each SQL result column: add a column to the list that displays one column of a SQLResultRow Create a very simple ISortableDataProvider that returns the SQL result from above

Handling futures

2011-07-22 Thread Bertrand Guay-Paquet
Hello, I can't find the correct way to handle java.util.concurrent.Future instances returned from asynchronous methods in Wicket. This interface does not extend Serializable so its instances can't be stored in components or pages. So what do you do with them? Do you store them in a map in

Re: Handling futures

2011-07-23 Thread Bertrand Guay-Paquet
:55 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hello, I can't find the correct way to handle java.util.concurrent.Future instances returned from asynchronous methods in Wicket. This interface does not extend Serializable so its instances can't be stored in components or pages. So what

Re: dynamic DataTable

2011-07-23 Thread Bertrand Guay-Paquet
Hi, SQLResultRow is a type I made up. I didn't know what type you received from your SQL query, so I used that. I assumed that your result set is composed of rows where each row can be used as a map with key=column name and value=column value. With that in hand, you could iterate over the

Re: Handling futures

2011-07-23 Thread Bertrand Guay-Paquet
usage getting out of hand. Scott On Sat, Jul 23, 2011 at 8:02 AM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: I haven't actually done it yet, but the 3 steps you list are what I have in mind. After these, I plan to use a javascript timer that polls the status of the request and updates

Re: Handling futures

2011-07-24 Thread Bertrand Guay-Paquet
about keeping your future in another scope? a conversation scope for example, or delegating it to the application / session ? On Sat, Jul 23, 2011 at 10:31 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Thanks for your answers Scott. I thought Wicket could essentially serialize a page any

Re: RFC: Ten things every Wicket programmer must know?

2011-07-27 Thread Bertrand Guay-Paquet
Hi! I don't recall who the author is and the page is currently down (500 server error), but http://www.small-improvements.com/10-things-about-apache-wicket-i-love is a post I enjoyed reading earlier this year. Regards, Bertrand On 27/07/2011 6:29 PM, Jeremy Thomerson wrote: Hello all,

stateless page + click on stateless link = stateful page

2011-09-13 Thread Bertrand Guay-Paquet
Hello, I have a stateless page with a stateless link on it. The stateless link is used to set the session locale and nothing more. In particular, it does not redirect to another page when clicked. On first access to the page, the url is: localhost/servlet/login After clicking on the

Re: stateless page + click on stateless link = stateful page

2011-09-14 Thread Bertrand Guay-Paquet
this change was reverted after RC7. Now only setResponsePage(new StatelessPage()); is automatically promoted to stateful. We tried to make it more general but apparently it was wrong... On Wed, Sep 14, 2011 at 9:06 AM, Mike Manderwicket-m...@gmx.de wrote: Am 13.09.2011 23:59, schrieb Bertrand Guay-Paquet

Re: Remove Sort on SortableDataProvider

2011-10-06 Thread Bertrand Guay-Paquet
Have you tried: provider.setSort(null); ? If you don't provide a sort property to your provider, that's what it starts with. On 06/10/2011 6:16 PM, Jensen, Bob wrote: I have a SortableDataProvider and have set a sort on it. It sorts fine. Now, I would like to remove the sort so no sorting

Retaining TextFilter cursor position on ajax update

2011-10-10 Thread Bertrand Guay-Paquet
Hello, I am trying to use DataTable's FilterToolbar and friends to filter a table's contents. One of the columns is a string so I use the TextFilter class. However, I can't find how to properly integrate ajax with this. I want the text field to submit the form when its input changes which

Re: LDMs load too early - hold outdated application data.

2011-10-28 Thread Bertrand Guay-Paquet
Hi, this wont be a standard behavior as it would add a lot of overhead. during listener processing you may load five LDMs with database queries and only one of them will be effected by the form submission - Then those four will not get loaded before rendering and there is no problem. Their

Re: LDMs load too early - hold outdated application data.

2011-10-28 Thread Bertrand Guay-Paquet
I still see 2 issues with this however in favor of forcing detachment of models between the listener and the renderer: Issue 1: With an ajax form submit, some components could be triggering the load of LDMs in their onEvent for the default ajax event. They would have a tough time knowing that

Re: LDMs load too early - hold outdated application data.

2011-10-28 Thread Bertrand Guay-Paquet
On 28/10/2011 12:49 PM, Igor Vaynberg wrote: i think you are blowing this way out of proportion. I hope so :) this only affects components that (A) modify their own model but do not update it and *also* (B) have their model loaded for some reason before they update it. This is not the type of

Re: LDMs load too early - hold outdated application data.

2011-10-28 Thread Bertrand Guay-Paquet
event and ShowPersonPanel can listen for it and detach its model. -igor On Fri, Oct 28, 2011 at 1:15 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: On 28/10/2011 12:49 PM, Igor Vaynberg wrote: i think you are blowing this way out of proportion. I hope so :) this only affects

Re: LDMs load too early - hold outdated application data.

2011-10-29 Thread Bertrand Guay-Paquet
My understanding is that the queries need to be run in order to get the choice lists of the DDCs. Even if onSubmit uses only one of the DDC's model, the DDCs still need to convert their input. On 29/10/2011 4:40 AM, Maarten Billemont wrote: On 28 Oct 2011, at 17:52, Igor Vaynberg wrote: and

Re: LDMs load too early - hold outdated application data.

2011-10-29 Thread Bertrand Guay-Paquet
to a lot of stuff to detach manually and I probably missed other cases as well. Also, this affects stateful and stateless pages since it is related to form processing. Regards, Bertrand On 28/10/2011 5:04 PM, Bertrand Guay-Paquet wrote: Thanks for clearing that up. I didn't know

Dynamically choosing component to add

2011-10-31 Thread Bertrand Guay-Paquet
Hi, Was is the proper way to choose which panel to add to a page based on a model's object value? Currently, I directly access the model and check the value during construction of the page. However, this is wrong since a model's object shouldn't be accessed until component rendering (see

Re: Dynamically choosing component to add

2011-10-31 Thread Bertrand Guay-Paquet
:? . On Mon, Oct 31, 2011 at 2:49 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, Was is the proper way to choose which panel to add to a page based on a model's object value? Currently, I directly access the model and check the value during construction of the page. However

Re: Sorting a column containing translated data

2011-10-31 Thread Bertrand Guay-Paquet
Hi, I do exactly what you require in a SortableDataProvider. The provider can access the session's locale and use the translated values to sort its data. The post at http://apache-wicket.1842946.n4.nabble.com/Sorting-a-column-populated-through-pupulateItem-method-tp1877340p1877343.html gives

Re: AW: Dynamically choosing component to add

2011-10-31 Thread Bertrand Guay-Paquet
Thank you Sven! On 31/10/2011 11:19 AM, Sven Meier wrote: onBeforeRender() and addOrReplace() are the right combination. Note that according to the javadoc you're not supposed to alter the component hierarchy in onConfigure(). Sven -Ursprüngliche Nachricht- Von: Bertrand Guay-Paquet

Design patterns for panel navigation

2011-11-09 Thread Bertrand Guay-Paquet
Hi, Panels are great to encapsulate functionality in reusable units. In order to reuse some panels in different contexts, I need to make the navigation elements they contain configurable. For example, consider a form whose post-submit navigation and cancel link destination need to be

Re: Custom 404 page is not displayed correctly

2011-11-14 Thread Bertrand Guay-Paquet
Hi, See https://issues.apache.org/jira/browse/WICKET-3602 Your mapping code is the same as mine. In my error pages, I use this instead of configureResponse : @Override protected void setHeaders(WebResponse a_response) { a_response.setStatus(HttpServletResponse.SC_NOT_FOUND);

Re: wicket 302 redirect loop

2011-11-16 Thread Bertrand Guay-Paquet
Hi, I had a redirect loop once because I added an override to Page#getPageParameters() by mistake. I wanted to use my method to generate a new PageParameters instance for a page but overriding the Page method gave your result. It's worth a shot! Regards, Bertrand On 16/11/2011 11:40 AM,

Re: wicket 302 redirect loop

2011-11-16 Thread Bertrand Guay-Paquet
wrote: Hi, Thanks I checked but no getPageParameters() override ;) Regards Thomas On Wed, Nov 16, 2011 at 6:04 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, I had a redirect loop once because I added an override to Page#getPageParameters() by mistake. I wanted to use my method

Wicket Gradle build

2011-11-18 Thread Bertrand Guay-Paquet
Hi, Are the Wicket Gradle build files maintained and in sync with the poms? Is the eclipse integration with Gradle working well? I'd like to give Gradle a try but only if I can build Wicket with it too. I searched the dev and user lists and couldn't find a definitive answer. Regards,

Re: Wicket Gradle build

2011-11-18 Thread Bertrand Guay-Paquet
Thanks for the info! I guess I'll keep enjoying Maven some more :) On 18/11/2011 4:48 PM, Igor Vaynberg wrote: no, they are not. its something we tried but in the end decided not to use...i will add a comment to the gradle file... -igor On Fri, Nov 18, 2011 at 1:47 PM, Bertrand Guay-Paquet

Re: RestartResponseAtInterceptPageException from onClick

2011-11-20 Thread Bertrand Guay-Paquet
Hi, If you need a reference to the referrer, you could simply store the current page's PageReference which is available with getPage().getPageReference(). Then use setResponsePage(SignInPage.class) to go to the login page. PageReference is a serializable id that can later be used in your

Re: AW: Dynamically choosing component to add

2011-11-28 Thread Bertrand Guay-Paquet
Hi, I think I just responded to you in your own thread - where I didn't know what you were trying to do. I still don't claim to fully understand, but I think I better understand your question here. If you mean that you have one panel that *may possibly contain any one of X panels*, then here's

Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet
Hello, I want to implement the functionality provided by Wicket's JIRA for attaching images to an issue. Essentially, when a file name is selected, it is uploaded via ajax and the form submit button is disabled while uploading takes place. When the upload is complete, an image thumbnail is

Re: Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet
, HTML5 ones. See wicketstuff html5 project. There is an integration with the new File API, part of HTML5 On Mon, Dec 12, 2011 at 7:38 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hello, I want to implement the functionality provided by Wicket's JIRA for attaching images to an issue

Re: Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet
ones. See wicketstuff html5 project. There is an integration with the new File API, part of HTML5 On Mon, Dec 12, 2011 at 7:38 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hello, I want to implement the functionality provided by Wicket's JIRA for attaching images to an issue

Re: Ajax file upload

2011-12-12 Thread Bertrand Guay-Paquet
This is actually quite easy to do after all! (Wicket 1.5.3) I simply added an AjaxFormSubmitBehavior to my FileUploadField like so: file.add(new AjaxFormSubmitBehavior(form, onchange) { @Override protected void onSubmit(AjaxRequestTarget target) {

Re: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread Bertrand Guay-Paquet
Hi, With the following markup: li wicket:id=itemspan wicket:id=contentContent/span/li using setRenderBodyOnly(true) on the span element would yield something like : liThe Content/li Besides having to match a specific markup structure, I am not sure when and why this should be used. Maybe

Re: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread Bertrand Guay-Paquet
Maybe you have a misunderstanding. setRenderBodyOnly(true) does not depend at all on deployment or development mode. What _does_ depend on it though is the rendering of wicket:container tags and other wicket attributes. Personally, I use the following in my application init method:

Mapped resource reference and urlFor()

2011-12-14 Thread Bertrand Guay-Paquet
Hi, I am using resource references for the first time to implement fetching images from a DB. The URLs will be of the following form: /resources/dbImages/DB_ID.png where DB_ID is an identifier to retrieve the image from the DB. I'm using the article at

Re: Mapped resource reference and urlFor()

2011-12-14 Thread Bertrand Guay-Paquet
@Peter: This is actually what I was doing already via the ByteArrayResource class! I just didn't notice that only the constructor was called... Thanks for opening my eyes! @Martin: In 1.5.3, I think the code you referenced is : // see if request handler addresses the resource we serve

Re: hebrew text looks like ×׳—׳‘׳¨׳ •

2012-01-09 Thread Bertrand Guay-Paquet
Sven On 01/09/2012 03:53 PM, Bertrand Guay-Paquet wrote: After some research, I'm now using the following html header : !DOCTYPE html html xmlns:wicket=http://wicket.apache.org; head meta charset=UTF-8 [xmlns:wicket=http://wicket.apache.org;] is stripped by Wicket when pages are rendered

ResourceReference for resource in webapp dir

2012-02-03 Thread Bertrand Guay-Paquet
Hi, I have the following code in my base page: public void renderHead(IHeaderResponse response) { // scripts/jquery-1.7.1.min.js is in webapp dir response.renderJavaScriptReference(scripts/jquery-1.7.1.min.js); } How can I transform this direct URL to a ResourceReference?

Re: ResourceReference for resource in webapp dir

2012-02-06 Thread Bertrand Guay-Paquet
responsible to create Url when RequestCycle#urlFor() is used. Also take a look at org.apache.wicket.util.string.UrlUtils#rewriteToContextRelative() On Fri, Feb 3, 2012 at 5:40 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, I have the following code in my base page: public void renderHead

Re: ResourceReference for resource in webapp dir

2012-02-06 Thread Bertrand Guay-Paquet
. With this library you can merge all resources which depend on each other at build time. For production you can even minimize them. On Mon, Feb 6, 2012 at 4:51 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, Thanks for your reply. I'll try to explain why I require this. I want to use

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.

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: input wicket:id=dateField value=11/06/11 name=dateField I dug a bit and the culprit seems to be XmlPullParser which decides

Reusing forms in different contexts

2012-02-21 Thread Bertrand Guay-Paquet
Hi, I want to reuse the same form panels in different contexts and would like to know how fellow Wicket users achieve this. The core of the problem is how to let the user of a form panel specify where to navigate when the form is submitted or canceled. There are multiple possibilities for

Re: Reusing forms in different contexts

2012-02-21 Thread Bertrand Guay-Paquet
On Tue, Feb 21, 2012 at 3:53 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, I want to reuse the same form panels in different contexts and would like to know how fellow Wicket users achieve this. The core of the problem is how to let the user of a form panel specify where to navigate

Re: Reusing forms in different contexts

2012-02-22 Thread Bertrand Guay-Paquet
of Link to create. You can use the same approach. On Wed, Feb 22, 2012 at 6:12 AM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Thanks Igor. This is actually very close to what I used as my first approach. The problem I had then was that depending on the context in which the panel is used

Re: Performance optimization

2012-02-22 Thread Bertrand Guay-Paquet
Hi, Have you seen the following thread? http://apache-wicket.1842946.n4.nabble.com/Shrinking-the-session-size-simply-by-zipping-it-Saved-my-day-td4402980.html Perhaps this can help you. That said, 10MB seems HUGE! Since you already use detachable models, maybe you could have a look at a memory

Re: Performance optimization

2012-02-23 Thread Bertrand Guay-Paquet
First of all, you stated that your problem what that the serialized size was too big, so please don't be so rude. Now, are you sure that the slow part of serialization is not the IO for storing that 10MB? If it is, zipping the page could definitely improve performance, even if it takes a some

Re: Performance optimization

2012-02-23 Thread Bertrand Guay-Paquet
. If all else fails, you can also write custom components that generate the HTML of each table row directly instead of using thousands of labels. On 23/02/2012 10:05 AM, Martin Grigorov wrote: On Thu, Feb 23, 2012 at 3:55 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: First of all, you

Re: Error during start of wicket application

2012-02-28 Thread Bertrand Guay-Paquet
Hi, I suggest you start from a clean Wicket quickstart to see if at least that works. Then, gradually add your components to it until you get the same error. On 28/02/2012 1:58 PM, Andre Schütz wrote: Hi, thank you for the answer. I defined Wicket 1.5.3 in the pom.xml. There is no other

Form with variable number of inputs

2012-03-07 Thread Bertrand Guay-Paquet
Hi, I have a form with a list of FormComponentPanels for phone numbers. Currently, adding a new phone number to the list involves an ajax request to add a new FormComponentPanel instance to the form and then another request to submit the form. Is there a way to achieve this without the

Re: Form with variable number of inputs

2012-03-08 Thread Bertrand Guay-Paquet
. On Wed, Mar 7, 2012 at 9:52 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, I have a form with a list of FormComponentPanels for phone numbers. Currently, adding a new phone number to the list involves an ajax request to add a new FormComponentPanel instance to the form and then another

Re: proper way to refresh a DataTable?

2012-03-08 Thread Bertrand Guay-Paquet
Hi, Have you added the datatable to the AjaxRequestTarget of the link's onClick method? That should do it. On 08/03/2012 7:56 PM, mlabs wrote: I'm trying to refresh the model of a DataTable when the user clicks an ajax link on my page... I pass an instance of SortableDataProviderfoo to the

Re: Upgrade from 1.4 to 1.5: timeframe?

2012-03-09 Thread Bertrand Guay-Paquet
Hi, I haven't done any migration myself (started on 1.5), but while reading this list, I noticed a number of users having issues with page mountings and page versioning. Try the following query for more hints: http://wicket-users.markmail.org/search/?q=migrate+1.5+-subject%3A%3A[announce]

Re: support for L10N in templates

2012-03-17 Thread Bertrand Guay-Paquet
What is it you are trying to do? In the html files, you can put wicket:message tags to have wicket automatically replace the contents with a localized message. Example: wicket:message key=MyLocalizedMessageKeyMyLocalizedMessage/wicket:message with a properties file containing:

Re: support for L10N in templates

2012-03-18 Thread Bertrand Guay-Paquet
Yeah I threw that out there in case it also applied to templates. I don't know anything about them in Wicket... On 18/03/2012 8:19 PM, infiniter wrote: Oh no. What I need is to be able to support something like the following, but for TEMPLATES, 'cause I want to localize them: public void

Images, ajax requests and caching

2012-03-18 Thread Bertrand Guay-Paquet
Hi, I have image resources which fetch the proper thumbnail picture stored in a DB based on the image's file name. I used the file name instead of parameters to make sure client-side caching would work. By chance, I just discovered that the images are always reloaded on ajax requests. This

Re: Images, ajax requests and caching

2012-03-19 Thread Bertrand Guay-Paquet
: we have a noncachingimage subclass... :) -igor On Sun, Mar 18, 2012 at 9:33 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, I have image resources which fetch the proper thumbnail picture stored in a DB based on the image's file name. I used the file name instead of parameters

Re: Images, ajax requests and caching

2012-03-19 Thread Bertrand Guay-Paquet
be updated or not. Just override org.apache.wicket.markup.html.image.Image#shouldAddAntiCacheParameter On Mon, Mar 19, 2012 at 4:07 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Indeed, but I don't understand how that helps in my case. NonCachingImage takes the behavior of Image one

Re: Images, ajax requests and caching

2012-03-20 Thread Bertrand Guay-Paquet
Ok you're right, it all makes perfect sense now. Thanks again. On 20/03/2012 3:27 AM, Martin Grigorov wrote: Hi, On Mon, Mar 19, 2012 at 6:18 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Thanks for the explanation Martin. I don't fully understand your second paragraph though

Re: New guy's question about component refresh.

2012-03-20 Thread Bertrand Guay-Paquet
Hi, You haven't showed the MerchantEditPanel, so first make sure it uses an ajax component to submit the form. Then, in its submit method, you should use the following code : // Closes modal window edit.close(ajaxRequestTarget); // Refreshes the form wicket:id=UpdateForm element and all its

Re: What real life scenario calls for page ID?

2012-04-04 Thread Bertrand Guay-Paquet
Hi, Is there a JIRA issue tracking this render wrong page based on page version problem? I'm very interested in this issue since sharing links to stateful pages containing a page version is essentially broken. Regards, Bertrand On 20/03/2012 12:45 PM, Igor Vaynberg wrote: On Tue, Mar 20,

Re: What real life scenario calls for page ID?

2012-04-04 Thread Bertrand Guay-Paquet
Guay-Paquet ber...@step.polymtl.ca wrote: Hi, Is there a JIRA issue tracking this render wrong page based on page version problem? I'm very interested in this issue since sharing links to stateful pages containing a page version is essentially broken. Regards, Bertrand On 20/03/2012 12:45 PM

isVisible for DataTable columns?

2012-04-05 Thread Bertrand Guay-Paquet
Hi, I need to determine the visibility of a DataTable's column dynamically based on a model value. Is this possible? I looked at the source and didn't find anything available for implementations of IColumn to determine visibility. Searching the net revealed this post from 2008 with the same

Re: 1.5 Wicket Enclosure

2012-04-07 Thread Bertrand Guay-Paquet
Hi, After creating the EnclosureContainer, add the following call : container.setRenderBodyOnly(false); In the EnclosureContainer's constructor, this is actually set to true which means that the HTML tag is not part of the rendered markup if the Enclosure is not visible on first render. When

Re: 1.5 Wicket Enclosure

2012-04-10 Thread Bertrand Guay-Paquet
need ajax and are also in one of the situations described in the javadoc? On 10/04/2012 3:21 AM, Martin Grigorov wrote: Enclosure was never able to work in Ajax. That's why InlineEnclosure has been introduced. On Sat, Apr 7, 2012 at 6:04 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote

Re: Same versioned link opens different pages on different machines

2012-04-11 Thread Bertrand Guay-Paquet
Hi, A ticket regarding this was created and resolved in 1.5 (WICKET-4488). From the work log: There was code for this situation but it didn't cover the case 100%. Now if a request to page2?0 is made and the type of the found page with id=0 is not Page2 then a new instance of Page2 is

Re: Same versioned link opens different pages on different machines

2012-04-12 Thread Bertrand Guay-Paquet
it to user1. I.e. a new instance of page2 I hope I described it clearly. i think thats *exactly* what i said... -igor Thanks, Alec On Wed, Apr 11, 2012 at 4:08 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi, A ticket regarding this was created and resolved in 1.5 (WICKET-4488

Re: Same versioned link opens different pages on different machines

2012-04-12 Thread Bertrand Guay-Paquet
you simply need to check what page class is mounted, and if the page retrieved by id is not of that class then dont render it but redirect to the bookmarkable url instead. -igor Both pages actually use the same MyPage.java class in this case. The only difference is the page parameter encoded in

Re: Data in session and debugger

2012-04-15 Thread Bertrand Guay-Paquet
Hi, Is the ResultClass Serializable (members + itself implement Serializable)? If not, you should see stack traces in the logs each time a page is rendered. On 14/04/2012 2:47 PM, Andre Schütz wrote: Hi, I tried the debugBar in my WebPage and could analyze the session size and the data of

setResponsePage swallows my session feedback messages

2012-06-28 Thread Bertrand Guay-Paquet
Hi, I have 2 pages, each with a feedback panel. Page2 does the following: setACookie(); Session.get().info(blah); setResponsePage(Page1.class); The problem I have is that blah is never displayed in the feedback panel of Page1. I stepped in the request processing code and found that

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
, I am open to contradiction). · If possible, can you move your code to a component onSubmit() method (of Page2 or the previous page, if any)? Regards, Ian Bertrand Guay-Paquet wrote Hi, I have 2 pages, each with a feedback panel. Page2 does the following: setACookie(); Session.get().info

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
cookie?) data to your Page1, and you will see by trial and error whether your flash message makes it to Page1 or not. Regards, Ian Bertrand Guay-Paquet wrote Hi Ian, Thanks for your reply. By the way, I forgot to mention I'm using Wicket 1.5.7. The (pseudo) code I wrote in my previous email

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
, Jun 29, 2012 at 4:21 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi Ian, Thanks for your reply. By the way, I forgot to mention I'm using Wicket 1.5.7. The (pseudo) code I wrote in my previous email is in Page2's constructor. I tried both approaches and here are the results

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
knows what he is talking about ;) Bertrand Guay-Paquet wrote Hi Ian, I'm sorry, I don't understand. Perhaps some parts of your message didn't make it to the mailing list? (see If you use and and then one of). On 29/06/2012 9:39 AM, Ian Marshall wrote: Hi Bertrand, If you use and then one

Re: setResponsePage swallows my session feedback messages

2012-07-02 Thread Bertrand Guay-Paquet
Hi Martin, Thanks for your answer and code. Indeed, in my case, option 2 is most desirable because the session message is set in a completely different place than where the redirect is done. NonResettingRestartException works great when thrown from a page constructor. However, when thrown

  1   2   >