Re: How to detect model leakage into session

2009-08-26 Thread Bas Gooren
)); // - getFoo() add(new Label(bar)); // - getBar() add(new Label(baz)); // - getBaz() HTH Sven On Mi, 2009-08-26 at 21:29 +0200, Bas Gooren wrote: Hi all, My problem is as follows: I use LoadableDetachableModels throughout my application, and have made sure I never use a model without

Re: How to detect model leakage into session

2009-08-26 Thread Bas Gooren
().getFoo()); } })); ... or even better ... setModel(new CompoundPropertyModel(ldm)); add(new Label(foo)); // - getFoo() add(new Label(bar)); // - getBar() add(new Label(baz)); // - getBaz() HTH Sven On Mi, 2009-08-26 at 21:29 +0200, Bas Gooren wrote: Hi all, My problem is as follows: I use

Re: How to detect model leakage into session

2009-08-26 Thread Bas Gooren
, den 26.08.2009, 21:29 +0200 schrieb Bas Gooren: Hi all, My problem is as follows: I use LoadableDetachableModels throughout my application, and have made sure I never use a model without it being attached to a component to prevent models which never get their detach() method called. Nonetheless

Re: How to detect model leakage into session

2009-08-26 Thread Bas Gooren
session size as it's a direct reference to an object. Thanks for giving me some pointers! Bas - Original Message - From: Bas Gooren b...@iswd.nl To: users@wicket.apache.org Sent: Wednesday, August 26, 2009 10:27 PM Subject: Re: How to detect model leakage into session Michael

Re: How to detect model leakage into session

2009-08-26 Thread Bas Gooren
Am Mittwoch, den 26.08.2009, 21:29 +0200 schrieb Bas Gooren: Hi all, My problem is as follows: I use LoadableDetachableModels throughout my application, and have made sure I never use a model without it being attached to a component to prevent models which never get their detach() method called

Re: How to detect model leakage into session

2009-08-27 Thread Bas Gooren
Eelco, Thanks for your tip. Bas - Original Message - From: Eelco Hillenius eelco.hillen...@gmail.com To: users@wicket.apache.org Sent: Thursday, August 27, 2009 10:09 AM Subject: Re: How to detect model leakage into session One 'hack' of a way to check whether you have stuff in

Wicket + Webservice

2009-08-28 Thread Bas Gooren
I would like to integrate a webservice callable by others into my existing Wicket application. The reason is that I'm integration a third-party payment provider and they provide a callback mechanism in the form of a WSDL I need to implement. Now I've taken a look at enunciate, which looks great

Re: Wicket + Webservice

2009-08-28 Thread Bas Gooren
martinez wael nino.martinez.w...@gmail.com To: users@wicket.apache.org Sent: Friday, August 28, 2009 1:16 PM Subject: Re: Wicket + Webservice Going for the web page, you could in theory do REST... But how smooth it are i do not know.. regards Nino 2009/8/28 Bas Gooren b...@iswd.nl: I would like

Re: Wicket + Webservice

2009-08-28 Thread Bas Gooren
a closer look at the blog, it's already described there.. So you know that wicket can return XML 2009/8/28 nino martinez wael nino.martinez.w...@gmail.com: Ahh ok, you can also make a web page return xml. Im not sure how SOAP communicates. But this might be the way for you... 2009/8/28 Bas Gooren b

Re: Wicket + Webservice

2009-08-28 Thread Bas Gooren
/filter-mapping 2009/8/28 Bas Gooren b...@iswd.nl: Yeah, I've built Wicket pages which return XML responses before, so that's not the problem. But since I have to adhere to a certain WSDL and hand-constructing the SOAP response seems like the wrong thing to do, I was hoping that there might

Re: Wicket + Webservice

2009-08-28 Thread Bas Gooren
Subject: Re: Wicket + Webservice Bas Gooren schrieb: I have found JAX-WS Guice integration (see https://jax-ws-commons.dev.java.net/guice/), so maybe I can find a way to make it use the wicket-guice injector. easy, done it. i´ll publish it on sunday and send you a private mail. cu uwe

Re: Selectively ignoring required fields

2009-09-15 Thread Bas Gooren
Phil, The way we deal with this is by using an ajax behavior on radiobuttons, and update the required flag on dependant fields from there. Another way (without ajax) could be to update the required flag on the form components on submit, prior to validation. E.g. by overriding Form.process()

Re: Selectively ignoring required fields

2009-09-15 Thread Bas Gooren
, there are some private methods of Form that I would need to call. Has anyone perhaps had a similar issue somewhere else? Thanks again, Phil. 2009/9/15 Bas Gooren b...@iswd.nl: Phil, The way we deal with this is by using an ajax behavior on radiobuttons, and update the required flag on dependant fields

Handle file uploads in Behavior and respond using AjaxRequestTarget

2009-08-05 Thread Bas Gooren
Hi all, Since I've seen many great answers on this list it's time to ask one of my questions ;-) The thing that strikes me as odd is how hard it is right now to handle file uploads and respond as if it were an AJAX request. I've built (based on various sources) a solution which uses a Panel

Re: Handle file uploads in Behavior and respond using AjaxRequestTarget

2009-08-05 Thread Bas Gooren
Igor, First off: thanks for the amazingly fast response! Yes, it feels like I'm overcomplicating things. But then again: there does not seem to be an easy way. An upload + AJAX refresh always needs 2 requests, which means (for me) that I need to preserve the upload somewhere between those

Re: Handle file uploads in Behavior and respond using AjaxRequestTarget

2009-08-05 Thread Bas Gooren
Interesting, it looks like you simply POST the form to the AJAX url using an IFRAME. How does it work server-side? I would expect that it does not work, since the form action no longer contains it's usual value, and the new form action points directly to an interface (IBehaviorListener). But

Re: Handle file uploads in Behavior and respond using AjaxRequestTarget

2009-08-07 Thread Bas Gooren
Great! Will take a look at it soon. This is what I love about Wicket most: very active development (constant flow of improvement). Thanks Igor. Bas - Original Message - From: Igor Vaynberg igor.vaynb...@gmail.com To: users@wicket.apache.org Sent: Friday, August 07, 2009 7:28 PM

Re: Wicket + Guice + other framework (e.g. Jersey)

2010-09-02 Thread Bas Gooren
Johannes, yes, this is no problem, see http://code.google.com/p/wicket-guice-jaxws/ Bas - Original Message - From: Johannes Schneider maili...@cedarsoft.com To: users@wicket.apache.org Sent: Thursday, September 02, 2010 3:58 PM Subject: Wicket + Guice + other framework (e.g. Jersey)

Re: Replacing content in head

2010-09-20 Thread Bas Gooren
Martin, Wicket tags need to be part of a valid (x)html tree. So what you want can be achieved by giving the style tag a wicket:id and generating the CSS including the .container { ... } code. Sebastian - Original Message - From: Martin Makundi martin.maku...@koodaripalvelut.com

Re: Replacing content in head

2010-09-20 Thread Bas Gooren
); super.onComponentTag(tag); } }); ** Martin 2010/9/20 Bas Gooren b...@iswd.nl: Martin, Wicket tags need to be part of a valid (x)html tree. So what you want can be achieved by giving the style tag a wicket:id and generating the CSS including the .container { ... } code. Sebastian

Re: using IOC in panels?

2010-09-23 Thread Bas Gooren
I'd be curious to hear for what other classes you have in mind. You'll always need to call the instantiation listener at some point to invoke the injector. So simply implementing IInstantiable will not be enough to have injection magically work. I think the reason it's currently implemented

Re: The Long, Long Dependency Trail

2010-09-23 Thread Bas Gooren
More recent versions of hibernate are available in the JBoss maven repo (which I do not see in your pom.xml): repository idjboss/id urlhttps://repository.jboss.org/nexus/content/repositories/releases/url /repository Sebastian - Original Message - From: Josh Kamau

Re: The Long, Long Dependency Trail

2010-09-23 Thread Bas Gooren
, Sep 23, 2010 at 2:48 PM, Bas Gooren b...@iswd.nl wrote: More recent versions of hibernate are available in the JBoss maven repo (which I do not see in your pom.xml): repository idjboss/id urlhttps://repository.jboss.org/nexus/content/repositories/releases/url /repository Sebastian

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Bas Gooren
AFAIK onConfigure() is _always_ called, also when a Component is invisible; If I recall correctly this was done to remove the callOnBeforeRenderIfInvisble() method and switching visibility in onBeforeRender(). Bas - Original Message - From: Jeremy Thomerson jer...@wickettraining.com

Re: get localized string from Model class?

2010-10-30 Thread Bas Gooren
The component parameter can be null. e.g. if you look at getObject() in the ResourceModel class: return Application.get().getResourceSettings().getLocalizer().getString(resourceKey,(ComponentString)null, defaultValue); It calls Localizer#getString with the resource key and optionally a

Re: Basic Webpage security

2010-12-10 Thread Bas Gooren
Well, since your page will never be constructed when the user is not logged in, it is secure. Even when your page is stateless, a user will never be able to reference components on the page. So if the isLoggedIn() method on your UserLoggedInSession works (and is tested!) you should be good to

Re: URL coding strategies

2010-12-16 Thread Bas Gooren
There are two ways to achieve what you are looking for: 1) store a stable, unique textual identifier per product (e.g. Ford-Ranger-Model-2005), and lookup the product from this identifier 2) store a textual identifier - ID mapping in your session and do the lookup when the page is accessed; of

Re: How to tackle field labels when using CompoundPropertyModels?

2010-12-16 Thread Bas Gooren
Hi Matthias, There are several options, but most importantly: there is special handling for this on FormComponent (see LabeledWebMarkupContainer). You could either scope the fields by setting translations per page/panel, but this can get rather tedious. Another option is to create

Re: URL coding strategies

2010-12-16 Thread Bas Gooren
Well, look at it this way: when the user enters your application without any known state (session or other), how can you differentiate? Only by what you know/get from the url. So yes, if the name itself is not enough input to make a textual identifier unique, you'll have to include more

Re: Localized mount points for BookmarkablePages?

2010-12-23 Thread Bas Gooren
I think in wicket 1.4.x this is only possible with a custom mount point; In other words: Override/implement a version of bookmarkable page handling which takes into accoun the locale. Have a look at BookmarkablePageRequestTargetUrlCodingStrategy. You could implement this class, overriding

Re: Handling OnKeyPress event

2010-12-29 Thread Bas Gooren
Hi Josh, Have a look at http://databinder.net/javadoc/net/databinder/components/AjaxOnKeyPausedUpdater.html It's a Java + Javascript ready-to-run component, of which the source is available. Bas - Original Message - From: Martin Grigorov mgrigo...@apache.org To:

Re: TextField Double type introduces commas

2011-01-15 Thread Bas Gooren
Wicket uses converters to convert form fields from object - string and back from string - object. This is done in a locale-aware fashion (so local users can use their preferred decimal separator etc). Have a look at class DoubleConverter in the wicket sources (which is used in your case,

Re: Modify element attribute, preserve content

2011-01-26 Thread Bas Gooren
Use a WebMarkupContainer and add a SimpleAttributeModifier behavior to it. It will not touch the contents of the tag it's attached to, leaving your own html as it is. Bas Op 26-1-2011 22:38, Alexandros Karypidis schreef: Hello, I have the following case which I do not know how to handle

Re: Modify element attribute, preserve content

2011-01-26 Thread Bas Gooren
Or, come to think of it, since you want to generate a href yourself on a link tag, use ExternalLink http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/ExternalLink.html. Since it's a WebMarkupContainer underneath it will leave whatever is inside your a-tag intact. Bas

Re: Problem while passing TextField value as parameter to other page

2011-02-17 Thread Bas Gooren
Hi Jehan, You'll need to provide your TextField with a model where it can load/store it's value. This is easy to do: new TextFieldString(atext, Model.of()); Kind regards, Bas Op 17-2-2011 10:56, Jehan schreef: -HelloWorld.Html form wicket:id=*myform*

Re: Problem while passing TextField value as parameter to other page

2011-02-17 Thread Bas Gooren
). Bas Op 17-2-2011 11:32, Jehan schreef: Thanks Bas Gooren, Passing values other pages using PageParameter is like Query String. What are other ways in wicket of passing values from one page to other. On Thu, Feb 17, 2011 at 3:08 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: I think

Re: LoadableDetachableModel small issue

2011-03-04 Thread Bas Gooren
Hi, I use a custom refreshingview which uses a LDM for existing items, and a serializing model for new items. When converting the input in my custom refreshingview (which is the component that owns the list) I handle both types of models. On refresh (re-display) it replaces the serializing

Re: LoadableDetachableModel small issue

2011-03-04 Thread Bas Gooren
, This is what I wanted to find out if you guys use a different model for new items(before saving them). I had previously headed in the wrong way by not using LDM so I wanted to be sure I'm doing it correctly now. Thanks, Alexandru On 03/04/2011 04:19 PM, Bas Gooren wrote: Hi, I use a custom

Re: entity manager in webapp

2011-03-10 Thread Bas Gooren
Have a look at databinder or warp-persist for a better implementation. Should you go with your own implementation, do not forget to clear the ThreadLocal at the end of the request to prevent: a) leaking b) re-using an EntityManager from a previous request (most if not all application servers

Re: entity manager in webapp

2011-03-10 Thread Bas Gooren
Which is basically warp-persist, but integrated into guice. But as far as I know, it will be only be integrated as of guice 3.0; Bas Op 10-3-2011 15:29, nino martinez wael schreef: I'd go for guice persist if thats an option.. 2011/3/10 Bas Goorenb...@iswd.nl Have a look at databinder or

Re: mountSharedResource() on huge amount of images

2011-03-10 Thread Bas Gooren
The general idea is to mount a single handler, which takes the filename from the url. There is no reason to mount all images by such a handler one-by-one. Bas Op 10-3-2011 23:01, Ladislav DANKO schreef: Hi all, what is the recommended way to mount huge amount of an images (thousands) in app?

Re: How to block browser Suggestion ?

2011-03-14 Thread Bas Gooren
See https://developer.mozilla.org/en/how_to_turn_off_form_autocompletion Using an attribute: autocomplete=off. This is something originally implemented by IE, so it works there as well. Also have a look here:

Re: mountSharedResource() on huge amount of images

2011-03-15 Thread Bas Gooren
to do it better way? Thanks, Laco -Original Message- From: Bas Gooren [mailto:b...@iswd.nl] Sent: Thursday, March 10, 2011 11:32 PM To: users@wicket.apache.org Subject: Re: mountSharedResource() on huge amount of images The general idea is to mount a single handler, which takes

Re: mountSharedResource() on huge amount of images

2011-03-15 Thread Bas Gooren
. Works fine but in extreme situation there is user with more than 3.000 images in one photoalbum. Or -how to do it better way? Thanks, Laco -Original Message- From: Bas Gooren [mailto:b...@iswd.nl] Sent: Thursday, March 10, 2011 11:32 PM To: users@wicket.apache.org Subject: Re

Re: Need a CodingStrategy to parse parameter from prefix

2011-03-18 Thread Bas Gooren
Yes it is, e.g. have a look at https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html In your case, you would need to strip the first path parameter from the url and store it in the request for later retrieval. Bas Op 17-3-2011 23:58, Steve Mactaggart schreef: I guess I'll have a

Re: Listview gives mysterious log info

2011-03-30 Thread Bas Gooren
Sounds like you are calling setOutputMarkupId on a container. So I googled your error message and founr WICKET-3237 (https://issues.apache.org/jira/browse/WICKET-3237) Bas Op 30-3-2011 8:54, nino martinez wael schreef: Listview gives mysterious log info what does it mean? This feels a bit

Re: DropDownChoice sorted choice rendered Values

2011-04-21 Thread Bas Gooren
A simple solution is to create a custom model which stores the result of Locale.getAvailableLocales() in a list, and you sort that list with a custom comparator. You can then pass this model to your DropDownChoice and have the result you were looking for. Bas Op 21-4-2011 16:46, schreef

Re: Back button problem in wicket

2011-04-28 Thread Bas Gooren
Hi, It sounds like you use spring dependency injection directly, which will indeed cause serialization issues. Instead, use the wicket spring integration, which will inject serializable proxies. See https://cwiki.apache.org/WICKET/spring.html for more info. Bas Op 28-4-2011 8:36, schreef

Re: Serializing restfb DefaultFacebookclient in a wicket facebook application

2011-05-15 Thread Bas Gooren
I assume you create the fbclient within the AppPage class? If so, you'll need to store a serializable value/object in the page (or session) with which you can re-create the FacebookClient. Your authToken variable would be a good starting point, see if that is serializable. If so, store the

Re: Serializing restfb DefaultFacebookclient in a wicket facebook application

2011-05-15 Thread Bas Gooren
No, since a session will also be serialized at some point, you will have the same problem, only less frequent. What you can do is manage the client per request, either through a custom RequestCycle, or if you use google guice or something similar you can use a request-scoped provider.

Re: IStringResourceLoader database implementation

2011-05-19 Thread Bas Gooren
You could always preload all strings, or preload sets of strings. This way you'll have fewer database requests, and faster lookups since you'll have everything you need in a local map. Bas Op 19-5-2011 8:23, schreef Mathias Nilsson: Thanks, My concern is also name component collition. The

Re: Use pageparameters from authorized page to login

2011-05-25 Thread Bas Gooren
Hi, You can always get the PageParameters from the page itself (given you received them in the constructor). In case you do not want to handle this on a page-by-page basis, they are also available through the RequestCycle (in wicket 1.4). You could check if the params contain login and pass

Re: [OT] Configure wicket.configuration outside web.xml in Tomcat 6

2011-07-04 Thread Bas Gooren
Hi, As suggested on the mailing list once, what I've been using for a while now is having deployment in web.xml, and adding -Dwicket.configuration=development to my tomcat command line from Eclipse. This way you always package a production-ready jar/war/ear and can run in development mode

Re: What does this syntax say?

2011-07-28 Thread Bas Gooren
This syntax is for use when you need a generic placeholder. In this case, it means that W is determined by the call site: IModelBusinessObject model = OtherModel.wrapOnInheritance( Component ); The above means that W is checked to be BusinessObject for all occurrences of W. A better to

Re: tomcat eats memory

2011-08-05 Thread Bas Gooren
Actually, I think mounting a custom resource _is_ the way to go. To keep things simple, let me suggest two options: (1) Create a custom resource which serves the correct image based on a url parameter (see WebResource) This will allow you to generate user-friendly urls to your images (2)

Re: onClick on Image

2011-08-15 Thread Bas Gooren
If the image is inside the link, your code should read: add(link); link.add(new Image(...)); Bas Op 15-8-2011 12:28, schreef Charles Moulliard: Hi, I would like to change the Locale setting when we click on a Image (flag corresponding to the Locale - France, UK, ...). So in my HTML page, I

LocaleFirstMapper in wicket 1.5

2011-09-14 Thread Bas Gooren
Hi all, I'm in the process of migrating our internal code library to 1.5. So far the main feeling is: wow, most things became a lot easier and cleaner. In other words: thanks wicket team! Now on to my question: If I look at the LocaleFirstMapper [1] in wicket-examples, I see that in

Re: LocaleFirstMapper in wicket 1.5

2011-09-14 Thread Bas Gooren
Ok, done: https://issues.apache.org/jira/browse/WICKET-4055 Sebastian Op 14-9-2011 21:32, schreef Igor Vaynberg: yes, good catch Bas. please open a jira ticket. -igor On Wed, Sep 14, 2011 at 12:12 PM, Bas Goorenb...@iswd.nl wrote: Hi all, I'm in the process of migrating our internal code

Wicket 1.5: request mapper to make all urls absolute

2011-09-14 Thread Bas Gooren
Hi, Another wicket 1.5 migration question: In 1.4 we created a IRequestCodingStrategy decorator which, in encode(), translates all urls to be absolute. We did this by checking if the url started with /, and if not, removing all occurrences of ../ and ./. To handle being behind a reverse

Re: LocaleFirstMapper in wicket 1.5

2011-09-15 Thread Bas Gooren
Another question regarding LocaleFirstMapper: in mapHandler() it always adds the locale as the first segment. In wicket 1.4 a url could start with ../-strings in the IRequestCodingStrategy.encode() call. Wicket would generate a relative url to the wicket filter. Since LocaleFirstMapper

Re: LocaleFirstMapper in wicket 1.5

2011-09-15 Thread Bas Gooren
So does that mean that all urls generated by mapHandler() are relative to the wicket filter, and are later made relative to the current page url? When looking at RequestCycle.urlFor() and UrlRenderer it appears this way. Op 15-9-2011 14:00, schreef Martin Grigorov: The code that makes the Url

Re: Panel Loop

2011-09-15 Thread Bas Gooren
Have a look at repeaters (e.g. RepeatingView and ListView). Op 15-9-2011 17:10, schreef Fred: Hello, I have a panel to which I want to add multiple items. I have put it into a loop and as long as I have only one panel I am good, with more than one it errorsI get why it errors, it has a panel

Re: Wicket 1.5: request mapper to make all urls absolute

2011-09-15 Thread Bas Gooren
Ok, I've been playing around with this, and it doesn't work. WebPageRenderer#respond() compares the current url to the target url. The current url is always normalized (without context path), so if my absolute mapper generates a target url which is absolute, and as such includes the context

1.5 bug: nested component ids cannot start with dash when dealing with links

2011-09-16 Thread Bas Gooren
See https://issues.apache.org/jira/browse/WICKET-4061 for further details. Just thought I'd send it to the group. I guess more people are upgrading to 1.5 right now, and this can cause applications to break in an unexpected fashion. When dealing with ids that start with one or more dashes

Re: Wicket 1.5: request mapper to make all urls absolute

2011-09-18 Thread Bas Gooren
is a good place to share this code so other wicket users can save themselves the time? Op 16-9-2011 1:20, schreef Bas Gooren: Ok, I've been playing around with this, and it doesn't work. WebPageRenderer#respond() compares the current url to the target url. The current url is always normalized

Re: Wicket 1.5: request mapper to make all urls absolute

2011-09-19 Thread Bas Gooren
an AbsoluteUrlRenderer (which extends the default UrlRenderer). What is a good place to share this code so other wicket users can save themselves the time? Op 16-9-2011 1:20, schreef Bas Gooren: Ok, I've been playing around with this, and it doesn't work. WebPageRenderer#respond() compares the current

Re: AttributeModifier and AjaxLink in 1.5

2011-09-21 Thread Bas Gooren
Since you want to decorate the javascript generated by the AjaxLink, why not override AjaxLink#getAjaxCallDecorator() and override the generated javascript in #decorateScript()? This is how we do it, albeit internally since we've created an AjaxConfirmLink subclass: @Override protected

RuntimeException when a stateless page throws a 404 which is also handled by wicket

2011-09-29 Thread Bas Gooren
We have the following situation: The wicket filter is configured to handle 404 responses (by a page mounted at /404), this is set in web.xml; We have a stateless (product) page at /shop/product, which contains a Stateless form which offers the customer the possibility to order. Some

Re: RuntimeException when a stateless page throws a 404 which is also handled by wicket

2011-09-30 Thread Bas Gooren
is there a cleaner way to handle this that anyone is aware of? Op 29-9-2011 14:28, schreef Bas Gooren: We have the following situation: The wicket filter is configured to handle 404 responses (by a page mounted at /404), this is set in web.xml; We have a stateless (product) page at /shop/product

Re: W 1.5: templates added to head on ajax reload ...

2011-10-10 Thread Bas Gooren
Override Component#renderHeader(IHeaderResponse response) and call response.renderOnDomReadyJavascript() The above assumes wicket 1.5, although this is also possible in 1.4. OnDomReady javascript code is handled properly for both regular and ajax requests. Op 10-10-2011 17:27, schreef

Re: Recommended way for wicket:for and markupIDs

2011-10-13 Thread Bas Gooren
Wicket will automatically use your id if you specify one in the markup. So if you have id=xyz in the markup, wicket will not overwrite it. In other words: specify whatever ID you need so you can access the correct tag from javascript. Op 13-10-2011 21:34, schreef Matthias Keller: On

Re: private Logger log property in WebPage and Component

2011-10-14 Thread Bas Gooren
Out of curiosity: why would you want the component logger? If you create one locally (private static final Logger log = LoggerFactory.getLogger(YourClass.class);), you have the benefit of controlling log output since the logger is bound to the actual component and not the superclass. E.g. at

Handling form ajax submit on enter key in form field

2011-11-01 Thread Bas Gooren
Hi all, To handle the case where somebody hits enter in a form field which has an (Ajax)Button to submit the entire form by ajax, we used an AjaxFormSubmitBehavior attached to the form's onsubmit in wicket 1.4.x After upgrading to 1.5 our ajax indicator was not hidden after the ajax

Re: Handling form ajax submit on enter key in form field

2011-11-02 Thread Bas Gooren
Hi, Yes we currently do form.add( new AjaxFormSubmitBehavior(form, onsubmit)); I've been testing what you describe (enter keys calls submit button), and this works. 99% of the time we only have one submit button, so that's good enough for us. Thanks! Op 1-11-2011 23:54, schreef Andrea Del

Re: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread Bas Gooren
The latter problem is logical: your mapping is focused on incoming requests. When wicket renders a link to AnotherPage.class, which url should be generated? My guess is that a request for /b comes in, wicket then checks if the url is valid for AnotherPage.class by generating a url for it,

Re: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread Bas Gooren
My eyes too :-) I was working on absolute urls the other day, and then came along this pearl. But since you are the one who reported/created WICKET-3347 you've enjoyed the sight of this method before :-) But back on-topic: The TS should create a single root mapper which maps

Re: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread Bas Gooren
Well, the simplest solution would be: - set Index.class as your homepage (through the corresponding method in your application class) - use mount(new MountedMapper(/${param}, AnotherPage.class)); that should at least get /b and /c working. Unfortunately (?) that will also allow /xyz and /abc

Re: MIgration to 1.5.2 seems a disaster

2011-11-05 Thread Bas Gooren
See https://issues.apache.org/jira/browse/WICKET-4163 for your first issue. You can ignore it (it's harmless) or use the workaround until 1.5.3 is released. Your second issue rings a bell (maybe other people reported this recently). It could also be related to

Re: Mounting page to mutliple urls with different pageparameter

2011-11-06 Thread Bas Gooren
Another way is to override some methods in MountedMapper (thus creating your AnotherPageMapper or something like that). Methods of interest: - getCompatibilityScore(): should only return 1 if the url starts with b or c See the default MountedMapper implementation, you could simply say: if(

Re: new blog on leveraging cdi conversations to simplify wicket code

2011-12-01 Thread Bas Gooren
Just a quick email to say: thanks! I appreciate your blog posts a lot, it's very helpful to see usage examples like yours. Sebastian Op 1-12-2011 17:25, schreef Igor Vaynberg: here is a follow up demonstrating a more complex example:

Re: Avoid creating an HttpSession before login

2011-12-09 Thread Bas Gooren
Hi, It's certainly possible, with some additional work by you. The easiest way: - redirect the user to your login page, add a variable to the PageParameters which helps you redirect them back - after logging in, check for said variable in PageParameters and redirect the user back Now the

Re: Avoid creating an HttpSession before login

2011-12-09 Thread Bas Gooren
You can either call setResponsePage or throw a RestartResponseException. I think the main reason for implementing this is security. Since it's handled through the session, the user cannot tamper with the url. Of course it's also very easy to use. Furthermore it's very easy to implement by a

Re: wicket appl architecture

2012-01-19 Thread Bas Gooren
When he wrote wtf he probably mean ftw (for the win), to indicate it's a solid combination ;-) Op 19-1-2012 2:19, schreef nazeem: Russell Pitre wrote Separate front-end sounds fine. Use a REST architecture with JSON as the data exchange format. I'm pretty Spring MVC supports this through the

Communication (in-vm) between webapps

2012-02-03 Thread Bas Gooren
Hi All, Maybe a fellow wicketeer can help me with this: We deploy one of our apps in two components: a frontend and an admin. We recently implemented a StringResourceLoader which fetches translations from a database. So far so good. Now we face the following problem: the frontend uses this

Re: Communication (in-vm) between webapps

2012-02-04 Thread Bas Gooren
Yeah, I was thinking the same thing. The only thing I need to take care of then is access control, normal users should not be able to invoke a cache clear by calling the url. But since the call made from the admin to the frontend will not go over a public network I can simply use a pre-shared

Re: Communication (in-vm) between webapps

2012-02-04 Thread Bas Gooren
app to a cluster François Meillet Le 4 févr. 2012 à 12:17, Bas Gooren a écrit : Yeah, I was thinking the same thing. The only thing I need to take care of then is access control, normal users should not be able to invoke a cache clear by calling the url. But since the call made from

Re: Communication (in-vm) between webapps

2012-02-05 Thread Bas Gooren
Thanks Jeremy! Since I needed something up running quickly I have implemented the flush cache operation through a page with pre-shared key auth for now. Op 4-2-2012 15:04, schreef Jeremy Thomerson: I agree a messaging queue is a nice scalable system. But I also think pragmatic approaches

Re: Contributing comments to the head section

2012-02-10 Thread Bas Gooren
You can always opt for a either - a label (with setRenderBodyOnly(true)) which renders it - a header contributor Both of these could use either a hardcoded bit of html in which you replace ${urlForCss} with the result of a call to urlFor(...). You can also store this html as a text template,

Re: Wicket 'hook' point for page render timing

2012-02-11 Thread Bas Gooren
FYI: I'd skip the part where you build something manually, and simply use new relic's RPM tool for a month to dig into your app's performance. They give you a breakdown of slow requests so you can see how much time is spent in database calls, and even which sql queries are run. Op 11-2-2012

Architectural question

2012-02-12 Thread Bas Gooren
Hi All, I have an architectural question about wicket, DDD and the service layer. Let's say we have a simple JPA entity (Customer), and a few simple CRUDL screens. For database access, we have a DAO layer (CustomerDao) which delegates to an EntityManager, and provides some convenience methods

Re: Architectural question

2012-02-12 Thread Bas Gooren
Ok, so you mean detaching entities when returning them to the view layer (wicket)? How do you propose updating the underlying entities? Send the detached entities back to the service layer and copying their changes to attached entities? Or ...? Op 12-2-2012 14:22, schreef Martin Makundi:

Re: Architectural question

2012-02-12 Thread Bas Gooren
Martin, Ok, and do you perform all such copying manually or do you use something automated for that? (Or simply a JPA merge?) Op 12-2-2012 16:22, schreef Martin Makundi: Yeah.. what we do is we detach entities when loading from service layer to view layer and when user is ready to commit we

Re: Architectural question

2012-02-12 Thread Bas Gooren
We already use OSIV, thanks to guice-persist. This means the read-side of things is rather trivial, and that the service and dao layers do need to be aware of the exact data the view needs (since lazy loading is possible). With regard to the write-side of things: we do what you do (call

Re: Architectural question

2012-02-12 Thread Bas Gooren
Chris, Thanks for your response. It sounds like the exposed domain model is what we are using right now. Our current DAOs are what are called Repositories in EDM. I am investigating moving away from it because of the clear lack of layers, which is what brought me to consider DTO's etc. I'm

Re: 1.5.4 error handling with web.xml error-page issue

2012-02-17 Thread Bas Gooren
It's documented here: https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html Op 17-2-2012 2:39, schreef pkc: I have no idea if this is documented and why it is needed but it works after changing web.xml to filter-mapping filter-namewicket/filter-name

Re: Adding a header contribution as the first in the head tag

2012-03-02 Thread Bas Gooren
Josh, You can use an application-wide IResponseFilter for this. Have a look at how ServerHostNameAndTimeFilter (in wicket-examples (*)) does it. *) E.g. look at

Re: java.util.Date cannot be cast to java.sql.Date

2012-03-19 Thread Bas Gooren
Declare the dob field as: @Temporal(TemporalType.Date) private (java.util.)Date dob; Op 19-3-2012 14:02, schreef Alok Pathak: I have an application in Wicket 1.4, where i am using JPA. I declared an entity (Customer) with property *dob* of type *java.sql.Date*. Now i want to migrate that

Re: [1.5] unwanted page refresh

2012-03-21 Thread Bas Gooren
Hi, Sounds like you have a redirect somewhere. Do you have any components on the page which at some point in time call setResponsePage or an equivalent? Bas Op 21-3-2012 12:49, schreef Pierre Goupil: Good afternoon, I have a couple of ModalWindow s in my code that respond to closing using

After upgrading from wicket 1.5.0 to 1.5.1+ we have a simple problem

2012-03-21 Thread Bas Gooren
We have the following simple setup: BasePage checks if user is logged in, if not (and this is not the LoginPage), RestartResponseException(LoginPage.class); LoginPage extends BasePage; contains a form to login; The application runs in the root context. Now on 1.5.0 this works like a charm;

Re: After upgrading from wicket 1.5.0 to 1.5.1+ we have a simple problem

2012-03-24 Thread Bas Gooren
Martin, Thanks for your pointer. This is indeed the reason for the loop: no buffered response is found. Something must have changed between 1.5.0 and 1.5.1 regarding (session) cookies and continueToOriginalDestination(), since it is no longer setting a session cookie. For all our

  1   2   3   >