Cache key collisions (IMarkupCacheKeyProvider)

2010-08-24 Thread Martin Dietze
We've recently run into a situation where in an application the wrong markup was provided for a component implementing IMarkupCacheKeyProvider. It is pretty obvious how this happened, see below, but I'd like to ask whether this behaviour is actually what we want or a bug. We have two components,

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Major Péter
Hi, see inline Usually it is a component that returns false in isStateless or generates a stateful listener interface URL. okay, but how did the 1.4 have nice url in browser bar and Ajax working without this tweak? I mean this new ?number style urls are a bit ugly IMHO, and I have many

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Matej Knopp
2010/8/24 Major Péter majorpe...@sch.bme.hu: Hi, see inline Usually it is a component that returns false in isStateless or generates a stateful listener interface URL. okay, but how did the 1.4 have nice url in browser bar and Ajax working without this tweak? I mean this new ?number style

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Peter Ertl
matej: So the new convention is that named parameters are always query string parameters? Am 24.08.2010 um 02:13 schrieb Matej Knopp: Hi, see the replies below 2010/8/23 Major Péter majorpe...@sch.bme.hu: Hi! As I'm testing wicket 1.5-SNAPSHOT, I'm seeing some strange behaviors:

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Major Péter
okay, but how did the 1.4 have nice url in browser bar and Ajax working without this tweak? I mean this new ?number style urls are a bit ugly IMHO, and I have many ajaxified pages, so I don't know how to deal with this right now.. If you use regular bookmarkable pages in 1.4 with Ajax and

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Matej Knopp
On Tue, Aug 24, 2010 at 11:47 AM, Peter Ertl pe...@gmx.org wrote: matej: So the new convention is that named parameters are always query string parameters? It depends on the mapper. It is true for the standard mappers, unless the mapping looks like /mount/path/{name1}/{name2} where name1 and

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Matej Knopp
2010/8/24 Major Péter majorpe...@sch.bme.hu: okay, but how did the 1.4 have nice url in browser bar and Ajax working without this tweak? I mean this new ?number style urls are a bit ugly IMHO, and I have many ajaxified pages, so I don't know how to deal with this right now.. If you use

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Major Péter
I don't think there is simple way to do that (unless you tweak the mapper). Why would you want to do that though? All bookmarkable URLs are generated without the page Id, The redirect is temporary (so google indexes the original URL). URL is still bookmarkable so users can copy and paste it,

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Matej Knopp
2010/8/24 Major Péter majorpe...@sch.bme.hu: I don't think there is simple way to do that (unless you tweak the mapper). Why would you want to do that though? All bookmarkable URLs are generated without the page Id, The redirect is temporary (so google indexes the original URL). URL is still

Shouldn't an IConverter also work for StringResourceModels?

2010-08-24 Thread Michael Sparer
Hi, I've got an entry in a properties file that looks like this: text=I'll pay ${moneyAmount} where moneyAmount is an Object like the one below public class MoneyAmount { long amount; // getters and setters } I registered a converter in the Application that does the formatting depending

WicketFilter.init() being called multiple times in Glassfish 3

2010-08-24 Thread Wilhelmsen Tor Iver
(Resending with some more text and less stacktrace because Apache's spam filter did not like it the first couple of times). Since we are using Wicket 1.4.8 portlets we have situations where the same portlet is rendered multiple times on a page. However, under Glassfish 3 this somehow leads to

Re: Shouldn't an IConverter also work for StringResourceModels?

2010-08-24 Thread Igor Vaynberg
file an issue, attach a patch if you can. -igor On Tue, Aug 24, 2010 at 5:33 AM, Michael Sparer michael.spa...@gmx.at wrote:  Hi, I've got an entry in a properties file that looks like this: text=I'll pay ${moneyAmount} where moneyAmount is an Object like the one below public class

Re: WicketFilter.init() being called multiple times in Glassfish 3

2010-08-24 Thread Igor Vaynberg
if filter.init is called more then once then its a problem in glassfish. -igor On Tue, Aug 24, 2010 at 5:35 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote: (Resending with some more text and less stacktrace because Apache's spam filter did not like it the first couple of times). Since we

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Igor Vaynberg
2010/8/24 Major Péter majorpe...@sch.bme.hu: well, I've tried this with this quickstart: http://aldaris.sch.bme.hu/quick.tar.gz , but this really didn't worked. Also on my bigger project I was seeing weird redirections: * the app is on / contextroot * the homepage could have parameters, but

Re: [1.5] new wicket URL-related questions

2010-08-24 Thread Matej Knopp
Sorry, my bad. -Matej On Tue, Aug 24, 2010 at 5:08 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: 2010/8/24 Major Péter majorpe...@sch.bme.hu: well, I've tried this with this quickstart: http://aldaris.sch.bme.hu/quick.tar.gz , but this really didn't worked. Also on my bigger project I was

Re: Cache key collisions (IMarkupCacheKeyProvider)

2010-08-24 Thread Igor Vaynberg
IMarkupCacheKeyProvider is for advanced users. you have to know what you are doing when you implement the interface. it makes sense to me that the key is application-scoped since there is really no other scope that makes sense, and yes, like you said, its a good idea to prefix the key with the

Best practice for component interaction

2010-08-24 Thread Patrick Petermair
Hi! Let's say I have a page with 2 panels. CalendarPanel shows a simple calendar, FormPanel a basic form. Whenever the user clicks on a date in the calendar, the textfield of the form should show the selected date. What is the best practice for this kind of interaction? Right now we hold a

Downloading generated PDF behavior different with apache in front of appserver

2010-08-24 Thread Doug Leeper
All, We have an application that generates a PDF (via PD4ML) and sends it back in the same request. This works fine and dandy when accessing our app server (weblogic/http) directly. However, when we access the same functionality but via Apache and SSL to weblogic, we get a message that the

Re: Best practice for component interaction

2010-08-24 Thread Igor Vaynberg
usually this kind of linkage is created by pointing both the calendar and the textfield to the same model object, like a property of a common parent, etc. -igor On Tue, Aug 24, 2010 at 8:37 AM, Patrick Petermair patrick.peterm...@openforce.com wrote: Hi! Let's say I have a page with 2 panels.

Re: Best practice for component interaction

2010-08-24 Thread James Carman
Yes, but how do you make sure all the components that need to be updated via ajax are updated? They can point to the same model, but if they're not added to the AjaxRequestTarget, then they won't be updated when their values change. You'd need some sort of event listener I would think (unless

Re: Best practice for component interaction

2010-08-24 Thread Igor Vaynberg
you can accomplish it using a simple visitor. 1.5 has a more formalized approach for managing events between components. -igor On Tue, Aug 24, 2010 at 10:07 AM, James Carman ja...@carmanconsulting.com wrote: Yes, but how do you make sure all the components that need to be updated via ajax are

Re: Best practice for component interaction

2010-08-24 Thread James Carman
What do you mean? What would the visitor look for? On Tue, Aug 24, 2010 at 1:12 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: you can accomplish it using a simple visitor. 1.5 has a more formalized approach for managing events between components. -igor On Tue, Aug 24, 2010 at 10:07 AM,

Re: Best practice for component interaction

2010-08-24 Thread Igor Vaynberg
onclick(final AjaxRequestTarget target) { getPage().visitChildren(CaresAboutMyAjaxEvent.class, new IVisitorCaresAboutMyAjaxEvent () { Object visit(CaresAboutMyAjaxEent object) { object.onMyAjaxEvent(target); }}} -igor On Tue, Aug 24, 2010 at 10:19 AM, James Carman

Wicket and Netbeans

2010-08-24 Thread LutherBaker
Per the http://wicket.apache.org/start/quickstart.html quickstart page , I built the quickstart project ala: c:\var\dev\netbeansmvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4.10 -DgroupId=foo.bar

Re: Best practice for component interaction

2010-08-24 Thread James Carman
So, you're saying you'd introduce an interface that you'd have all of the components implement if they're interested in a certain event. Interesting. What about just using a metadata key? On Tue, Aug 24, 2010 at 1:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: onclick(final

Re: Wicket and Netbeans

2010-08-24 Thread Igor Vaynberg
looks like netbeans is not copying the .html file into the build dir (which should be set to target/classes) after you save it. you can figure out how to toggle this setting in netbeans, or add this to your application's init: getResourceSettings().addResourceFolder(src/main/java); -igor On

Re: Best practice for component interaction

2010-08-24 Thread Igor Vaynberg
anything way to identify components that subscribe to a topic works. -igor On Tue, Aug 24, 2010 at 10:30 AM, James Carman ja...@carmanconsulting.com wrote: So, you're saying you'd introduce an interface that you'd have all of the components implement if they're interested in a certain event.

Re: Wicket and Netbeans

2010-08-24 Thread Girts Ziemelis
I am not using maven with netbeans any more - at some point I configured, that it worked more or less OK, but I did not see any benefit in using it (from netbeans). Everything was slower and just pain to configure and run. Built in ant for netbeans works very well. Starting Jetty from runner

trouble with setOutputMarkupId() and WicketStuff ProgressBar

2010-08-24 Thread Chris Merrill
I'm trying to build a simple example of the ProgressBar from WicketStuff. I'm getting this stack trace when pressing the start button: java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [Page class =

Re: Wicket and Netbeans

2010-08-24 Thread bht
Hi, If you use the default ant projects in NetBeans, then you get deploy on save with session preservation. I haven't found this functionality in maven under netbeans yet. You don't need to re-start any server just save your file and reload the page. The advantage is that you can develop the

Re: trouble with setOutputMarkupId() and WicketStuff ProgressBar

2010-08-24 Thread Igor Vaynberg
maybe you need to put it all into a container? -igor On Tue, Aug 24, 2010 at 1:09 PM, Chris Merrill ch...@webperformance.com wrote: I'm trying to build a simple example of the ProgressBar from WicketStuff. I'm getting this stack trace when pressing the start button:

Re: trouble with setOutputMarkupId() and WicketStuff ProgressBar

2010-08-24 Thread Chris Merrill
On 8/24/2010 4:25 PM, Igor Vaynberg wrote: maybe you need to put it all into a container? That fixed it. I thought a page _was_ a container? Hmmmph. I'll have to come back to try to understand this one better at some point Thanks again, Igor! Wicket rocks : Chris --

Store session in custom datastore

2010-08-24 Thread Anton
Hello! Can anybody share solution to store session in db or memcache? Thanks, Anton - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: Store session in custom datastore

2010-08-24 Thread Igor Vaynberg
im sure if you google for wicket session memcache you will find your answer. -igor On Tue, Aug 24, 2010 at 2:05 PM, Anton exe...@googlemail.com wrote: Hello! Can anybody share solution to store session in db or memcache? Thanks, Anton

Re: Store session in custom datastore

2010-08-24 Thread James Carman
http://www.lmgtfy.com/?q=wicket+session+memcache On Tue, Aug 24, 2010 at 5:10 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: im sure if you google for wicket session memcache you will find your answer. -igor On Tue, Aug 24, 2010 at 2:05 PM, Anton exe...@googlemail.com wrote: Hello! Can

Re: Store session in custom datastore

2010-08-24 Thread Anton
Hello Igor, thanks for advice. I already found [1] and [2], but this is server-specific solutions. And here [3] are missing import com.base.cache.AsyncMemcache; import com.base.cache.ICache and DBCache Classes/Interface. [1] http://github.com/magro/memcached-session-manager/tree [2]

JavaScript form submission does not go to Button.onSubmit() method

2010-08-24 Thread Nishant Neeraj
I have a form which has a button. The processing code after submission is written in Button.onSubmit() and Form.onSubmit() is not overridden. Now, when I add a JavaScript confirmation asking if the user is ready to submit the form. The JavaScript performs $('#formId').submit(). The form submission

Re: Wicket and Netbeans

2010-08-24 Thread LutherBaker
Thanks for the suggestions. In this case, I was able to navigate to the project's properties and find Build | Compile where I changed the Compile on Save option to For both application and test execution. That seemed to do it. Jetty now restarts automatically on changes to class and templates.