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, both rendering their cache keys in the
same way:

| public String getCacheKey( final MarkupContainer container,
|final Class? containerClass ) {
|   return getId();
| }

The cache key was implemented in this simplistic way as the
component would always render markup of which the only dynamic
bit is the ID (an inner component is created with that ID and
then added to the component itself which derives from Panel).

In their respective pages both components were used in a
RepeatingView, thus their IDs were integer numbers as provided
by newChildId().

After having successfully loaded the page containing the first
of the two components loading the page containing the second
component fails. Further analysis revealed the following:

In MarkupCache#getMarkup() the respective components are 
returned as cache key providers; then getMarkupFromCache() is
called on the cache key. The getMarkupFromCache() method has an
argument `MarkupContainer container', but it is not used in the
default implementation.

Consequently, the markup cache returns the markup for the wrong
component (since both happened to be created with the same IDs).

This means that for the worst case one has to take care that
the cache keys created in components such as the above need to
be collision-free across the whole application.

I can only speculate on why the respective component's container
is ignored when looking up the markup from the cache. One could
argue that this approach is simpler, also one could actually
make use of this behaviour by reusing markup across components.

The drawback is that this is error-prone (as in this case). Also
if I use third-party components implementing IMarkupCacheKeyProvider 
the way they create their cache keys is beyond my control which
makes keeping cache keys collision-free potentially problematic.

As an immediate fix I think one should add a warning to the
IMarkupCacheKeyProvider's JavaDoc pointing out that no checking
of the components' hierarchy is performed, so that cache keys
need to be application-wide unique. From my experience adding 
the fully qualified class name to the cache key is usually a
good idea (unfortunately I had considered this unnecessary for
such simplistic components)...

Apart from that I'd like to ask whether this way of dealing with
the markup cache is really what we want?

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Ich trink kein Wasser. Da ficken Fische drin...

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 ajaxified pages, so I don't know how to deal with
this right now..

 when I try to hit the URL now:
 showuser/id/1234
 then I'm going to have indexed parameters and not named parameter with
 'id' name. Q3: Why is that?
 
 Because it's not a named paramerer (by default). The URL in question
 will have two indexed parameters. id and 1234.
 Big problem in 1.4 was that there was no distinction between indexed
 parameters (part of path) and named parameters (usually part query
 string). So it was difficult to build URLs such as
 showpage/13?sort=asc
 
 1.5 fixes this by defining URL scheme like this:
 
 /page/mount/path/indexed-param0/indexed-param1?named1=value1name2=value2
 
 Btw. you should be able to mount the url in question as
 showuser/id/{user-id}
 wicket should then make user-id a named parameter.

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 it's not mandatory
* and it's mapped to /app/show and /app/show/id/{id} too
now when I open / I get redirected to /app/show/id/{id}?3
when I open /app/show/id/123 then I got redirected to
/app/show/id/{id}/show/id/123?4

 It is still the same page instance. Obviously in your case you take
 the page parameters into account only in page constructor. So when you
 later change the id value (but leave page id the same) nothing
 changes.
 
 However if  you for example override page onBeforeRender() and call
 getPageParameters() there the id parameter will have proper value.

so people should move model bindings to onBeforeRender, or move to
stateless pages to be able to do this? Can't you store that page id
somewhere else?

 Also how could I make Wicket to use by default the /id/1234 format
 instead of ?3id=1234 for link creation??
 
 You can either set id and 1234 as indexed parameters or mount the page
 as /showuser/id/{user-id}

Probably my code is guilty, can you go through my quickstart?

Thank you,
Peter

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 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 refresh
the page then all your Ajax state is gone! This is why URLS are hybrid
by default in 1.5.

 when I try to hit the URL now:
 showuser/id/1234
 then I'm going to have indexed parameters and not named parameter with
 'id' name. Q3: Why is that?

 Because it's not a named paramerer (by default). The URL in question
 will have two indexed parameters. id and 1234.
 Big problem in 1.4 was that there was no distinction between indexed
 parameters (part of path) and named parameters (usually part query
 string). So it was difficult to build URLs such as
 showpage/13?sort=asc

 1.5 fixes this by defining URL scheme like this:

 /page/mount/path/indexed-param0/indexed-param1?named1=value1name2=value2

 Btw. you should be able to mount the url in question as
 showuser/id/{user-id}
 wicket should then make user-id a named parameter.

 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 it's not mandatory
 * and it's mapped to /app/show and /app/show/id/{id} too
 now when I open / I get redirected to /app/show/id/{id}?3
 when I open /app/show/id/123 then I got redirected to
 /app/show/id/{id}/show/id/123?4
I don't think you can mount same page twice.

 It is still the same page instance. Obviously in your case you take
 the page parameters into account only in page constructor. So when you
 later change the id value (but leave page id the same) nothing
 changes.

 However if  you for example override page onBeforeRender() and call
 getPageParameters() there the id parameter will have proper value.

 so people should move model bindings to onBeforeRender, or move to
 stateless pages to be able to do this? Can't you store that page id
 somewhere else?
Huh? Why should we store it somewhere else? It's part of page
parameters. Page parameters are current page parameters for the
requests. You can use models properly and reload the data on every
request (by quering getPageParameters().getNamedParameter(user-id)
for the id.

 Also how could I make Wicket to use by default the /id/1234 format
 instead of ?3id=1234 for link creation??

 You can either set id and 1234 as indexed parameters or mount the page
 as /showuser/id/{user-id}

 Probably my code is guilty, can you go through my quickstart?
You didn't put any code in the archive, just class files.

-Matej

 Thank you,
 Peter

 -
 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: [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:
 With 1.4 I've used to have url's like:
 showuser/id/1234
 now when I open simply the page without params, I will see the following
 URL:
 showuser?[0-9]+
 
 The number after ? is page id. Since wicket is a stateful framework
 (by default) we need to track page instances.
 
 When I looked at the JavaDoc of the new MountMapper (which is the
 replacement for mountBookmarkablePage), I saw that I'm having this URL,
 because my page is not stateless.
 
 In a way, yes. Stateless pages generally do not have page ids in URL.
 
 Q1: with 1.4 this was possible, because the URL contained the pagemap
 instance number, or is there something else?
 Q2: (a little n00b question) how can I find out which component makes my
 page stateful?
 
 Usually it is a component that returns false in isStateless or
 generates a stateful listener interface URL.
 
 
 when I try to hit the URL now:
 showuser/id/1234
 then I'm going to have indexed parameters and not named parameter with
 'id' name. Q3: Why is that?
 
 Because it's not a named paramerer (by default). The URL in question
 will have two indexed parameters. id and 1234.
 Big problem in 1.4 was that there was no distinction between indexed
 parameters (part of path) and named parameters (usually part query
 string). So it was difficult to build URLs such as
 showpage/13?sort=asc
 
 1.5 fixes this by defining URL scheme like this:
 
 /page/mount/path/indexed-param0/indexed-param1?named1=value1name2=value2
 
 Btw. you should be able to mount the url in question as
 showuser/id/{user-id}
 
 wicket should then make user-id a named parameter.
 
 if I have a page with URL in browser:
 showuser?8id=123
 and I rewrite the id to 124, then I'm going to still see the page for
 123, which is really disturbing! Q4: is there a solution for this to
 work? Or should I make my page stateless to be able to do this?? (How?)
 
 It is still the same page instance. Obviously in your case you take
 the page parameters into account only in page constructor. So when you
 later change the id value (but leave page id the same) nothing
 changes.
 
 However if  you for example override page onBeforeRender() and call
 getPageParameters() there the id parameter will have proper value.
 
 
 Also how could I make Wicket to use by default the /id/1234 format
 instead of ?3id=1234 for link creation??
 
 You can either set id and 1234 as indexed parameters or mount the page
 as /showuser/id/{user-id}
 
 -Matej
 
 
 Thanks for your help.
 
 Best Regards,
 Peter Major
 
 -
 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: [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 refresh
 the page then all your Ajax state is gone! This is why URLS are hybrid
 by default in 1.5.

I don't mind that, is there a way to change the default?

 I don't think you can mount same page twice.

Okay, how can I create aliases for a page then? And how could I create a
nice url for parameterless and 'parameterful' pages? like /show shows a
user own profile, and /show/id/{id} shows another users profile?

 Huh? Why should we store it somewhere else? It's part of page
 parameters. Page parameters are current page parameters for the
 requests. You can use models properly and reload the data on every
 request (by quering getPageParameters().getNamedParameter(user-id)
 for the id.

I don't think you're using http referers to find out which page did the
request came from, I think you're using the browser bar URL when you
create the links for the page content. So the links on the page are
already containing the page id's, that's great. But the browser bar URL
is not used for anything after page rendering, or?

 Also how could I make Wicket to use by default the /id/1234 format
 instead of ?3id=1234 for link creation??

 You can either set id and 1234 as indexed parameters or mount the page
 as /showuser/id/{user-id}

 Probably my code is guilty, can you go through my quickstart?
 You didn't put any code in the archive, just class files.

doh, right.. The working url is http://aldaris.sch.bme.hu/myproject.tar.gz
Just execute a mvn jetty:run and see how it 'works'.

Thanks,
Peter

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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
name2 will be named parameters but they are encoded in the path.

-Matej


 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:
 With 1.4 I've used to have url's like:
 showuser/id/1234
 now when I open simply the page without params, I will see the following
 URL:
 showuser?[0-9]+

 The number after ? is page id. Since wicket is a stateful framework
 (by default) we need to track page instances.

 When I looked at the JavaDoc of the new MountMapper (which is the
 replacement for mountBookmarkablePage), I saw that I'm having this URL,
 because my page is not stateless.

 In a way, yes. Stateless pages generally do not have page ids in URL.

 Q1: with 1.4 this was possible, because the URL contained the pagemap
 instance number, or is there something else?
 Q2: (a little n00b question) how can I find out which component makes my
 page stateful?

 Usually it is a component that returns false in isStateless or
 generates a stateful listener interface URL.


 when I try to hit the URL now:
 showuser/id/1234
 then I'm going to have indexed parameters and not named parameter with
 'id' name. Q3: Why is that?

 Because it's not a named paramerer (by default). The URL in question
 will have two indexed parameters. id and 1234.
 Big problem in 1.4 was that there was no distinction between indexed
 parameters (part of path) and named parameters (usually part query
 string). So it was difficult to build URLs such as
 showpage/13?sort=asc

 1.5 fixes this by defining URL scheme like this:

 /page/mount/path/indexed-param0/indexed-param1?named1=value1name2=value2

 Btw. you should be able to mount the url in question as
 showuser/id/{user-id}

 wicket should then make user-id a named parameter.

 if I have a page with URL in browser:
 showuser?8id=123
 and I rewrite the id to 124, then I'm going to still see the page for
 123, which is really disturbing! Q4: is there a solution for this to
 work? Or should I make my page stateless to be able to do this?? (How?)

 It is still the same page instance. Obviously in your case you take
 the page parameters into account only in page constructor. So when you
 later change the id value (but leave page id the same) nothing
 changes.

 However if  you for example override page onBeforeRender() and call
 getPageParameters() there the id parameter will have proper value.


 Also how could I make Wicket to use by default the /id/1234 format
 instead of ?3id=1234 for link creation??

 You can either set id and 1234 as indexed parameters or mount the page
 as /showuser/id/{user-id}

 -Matej


 Thanks for your help.

 Best Regards,
 Peter Major

 -
 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



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 regular bookmarkable pages in 1.4  with Ajax and refresh
 the page then all your Ajax state is gone! This is why URLS are hybrid
 by default in 1.5.

 I don't mind that, is there a way to change the default?
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, page Id is pretty
much harmless.


 I don't think you can mount same page twice.

 Okay, how can I create aliases for a page then? And how could I create a
 nice url for parameterless and 'parameterful' pages? like /show shows a
 user own profile, and /show/id/{id} shows another users profile?
You can't mount the page twice, because in that case wicket will not
know which mapping to use for the page when generating the URL.
If you need page to be accessible on both
/show
and
/show/id/4

then you need to mount it on /show and treat /id/3 as indexed parameters.

 Huh? Why should we store it somewhere else? It's part of page
 parameters. Page parameters are current page parameters for the
 requests. You can use models properly and reload the data on every
 request (by quering getPageParameters().getNamedParameter(user-id)
 for the id.

 I don't think you're using http referers to find out which page did the
 request came from, I think you're using the browser bar URL when you
 create the links for the page content. So the links on the page are
 already containing the page id's, that's great. But the browser bar URL
 is not used for anything after page rendering, or?
Http refereres? Where did that come from?

As I said, every time you call getPageParameters() it contains the
*current* URL parameters. It might be different from the
PageParameters that you got in page constructor, because that was
during page construction only.

so if you have an entity to show, best way is to use LDM
i.e.
new LoadableDetachableModel() {
public Object load() {
   return userdao.load(getPageParameters().getNamedParameter(user-id));
}
}

This will result of the correct entity loaded even if you change page
parameters (while leaving the original page id).

-Matej

 Also how could I make Wicket to use by default the /id/1234 format
 instead of ?3id=1234 for link creation??

 You can either set id and 1234 as indexed parameters or mount the page
 as /showuser/id/{user-id}

 Probably my code is guilty, can you go through my quickstart?
 You didn't put any code in the archive, just class files.

 doh, right.. The working url is http://aldaris.sch.bme.hu/myproject.tar.gz
 Just execute a mvn jetty:run and see how it 'works'.

 Thanks,
 Peter

 -
 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: [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, page Id is pretty
 much harmless.

I would like to have clean URLs, and page Id on every single URL isn't
that pretty.

 I don't think you can mount same page twice.

 Okay, how can I create aliases for a page then? And how could I create a
 nice url for parameterless and 'parameterful' pages? like /show shows a
 user own profile, and /show/id/{id} shows another users profile?
 You can't mount the page twice, because in that case wicket will not
 know which mapping to use for the page when generating the URL.
 If you need page to be accessible on both
 /show
 and
 /show/id/4
 
 then you need to mount it on /show and treat /id/3 as indexed parameters.

will do, but what about aliases? Let's say I want to support legacy
uri's, what should I do then?

 Http refereres? Where did that come from?
 
 As I said, every time you call getPageParameters() it contains the
 *current* URL parameters. It might be different from the
 PageParameters that you got in page constructor, because that was
 during page construction only.
 
 so if you have an entity to show, best way is to use LDM
 i.e.
 new LoadableDetachableModel() {
 public Object load() {
return userdao.load(getPageParameters().getNamedParameter(user-id));
 }
 }
 
 This will result of the correct entity loaded even if you change page
 parameters (while leaving the original page id).

oh yeah, I don't use LDM's (I know I should), instead I'm using simple
propertymodels and compoundpropertymodels. This is a method of yours to
make people use LDM everywhere?

Also the main question was unanswered:
are you using the browser bar URL for anything after page rendering?

p.s: the quickstart is here: http://aldaris.sch.bme.hu/myproject.tar.gz

Thanks,
Peter

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 bookmarkable so users can copy and paste it, page Id is pretty
 much harmless.

 I would like to have clean URLs, and page Id on every single URL isn't
 that pretty.
We need to store page id somewhere. The scenario when user loses all
state by refreshing page (in Wicket 1.4) is far from being ideal.

 I don't think you can mount same page twice.

 Okay, how can I create aliases for a page then? And how could I create a
 nice url for parameterless and 'parameterful' pages? like /show shows a
 user own profile, and /show/id/{id} shows another users profile?
 You can't mount the page twice, because in that case wicket will not
 know which mapping to use for the page when generating the URL.
 If you need page to be accessible on both
 /show
 and
 /show/id/4

 then you need to mount it on /show and treat /id/3 as indexed parameters.

 will do, but what about aliases? Let's say I want to support legacy
 uri's, what should I do then?

Make your own mapper for legacy URL that just redirects to the new one.


 Http refereres? Where did that come from?

 As I said, every time you call getPageParameters() it contains the
 *current* URL parameters. It might be different from the
 PageParameters that you got in page constructor, because that was
 during page construction only.

 so if you have an entity to show, best way is to use LDM
 i.e.
 new LoadableDetachableModel() {
     public Object load() {
        return userdao.load(getPageParameters().getNamedParameter(user-id));
     }
 }

 This will result of the correct entity loaded even if you change page
 parameters (while leaving the original page id).

 oh yeah, I don't use LDM's (I know I should), instead I'm using simple
 propertymodels and compoundpropertymodels. This is a method of yours to
 make people use LDM everywhere?
It's your choice. We don't make you use LDM.

 Also the main question was unanswered:
 are you using the browser bar URL for anything after page rendering?
I have answered the question. I told you that after page rendering the
parameters from browser bar are available in getPageParameters().
Wicket doesn't do anything with those parameters as they are specific
to your application. You can query them any time you want.

-Matej

 p.s: the quickstart is here: http://aldaris.sch.bme.hu/myproject.tar.gz

 Thanks,
 Peter

 -
 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



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 on locale whenever I use a PropertyModel or a simple Model 
(i.e. whenever getModelObjectAsString gets invoked). However when using 
a StringResourceModel, or Component#getString() the IConverter won't be 
invoked and a simple MoneyAmount.toString will show up as replacement of 
${moneyAmount} (on PropertyVariableInterpolator on line 90 btw.). 
Shouldn't there be a lookup for the converter or am I missing something 
and there's an easier way?


cheers,

Michael

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 init() being called multiple times the first time a portlet 
occurs on a page, and this in turn leads to the Application.init() complaining 
that the mount URL has already been used (since it reuses the object). After 
this one error the rendering on later refreshes goes well for portlet all 
instances on any page

Is this a known error in Glassfish? Filters should only be initialized once as 
far as I can read the specs... or is it an issue with some Wicket component?

Environment: Glassfish 3.0.1 on Windows XP with Liferay Portal CE 5.2.3

Sample stacktrace:

24T13:30:57.719+0200|WARNING|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-1;|ApplicationDispatcher[/rss-portlets]
 PWC1231: Servlet.service() for servlet RSSPortlet threw exception
org.apache.wicket.WicketRuntimeException: edit is already mounted for 
BookmarkablePageEncoder[page=class no.nsb.intranet.rss.wicket.pages.AddRSSPage]
at 
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.mount(WebRequestCodingStrategy.java:468)
at 
org.apache.wicket.protocol.http.WebApplication.mount(WebApplication.java:321)
at 
org.apache.wicket.protocol.http.WebApplication.mountBookmarkablePage(WebApplication.java:356)
at 
no.nsb.intranet.rss.wicket.RSSApplication.init(RSSApplication.java:24)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:719)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)


Med vennlig hilsen

TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: toriv...@arrive.no
http://www.arrive.no
http://servicedesk.arrive.no





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 MoneyAmount {

 long amount;

 // getters and setters

 }

 I registered a converter in the Application that does the formatting
 depending on locale whenever I use a PropertyModel or a simple Model (i.e.
 whenever getModelObjectAsString gets invoked). However when using a
 StringResourceModel, or Component#getString() the IConverter won't be
 invoked and a simple MoneyAmount.toString will show up as replacement of
 ${moneyAmount} (on PropertyVariableInterpolator on line 90 btw.). Shouldn't
 there be a lookup for the converter or am I missing something and there's an
 easier way?

 cheers,

 Michael

 -
 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: 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 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 init() being called multiple times the first time a portlet 
 occurs on a page, and this in turn leads to the Application.init() 
 complaining that the mount URL has already been used (since it reuses the 
 object). After this one error the rendering on later refreshes goes well for 
 portlet all instances on any page

 Is this a known error in Glassfish? Filters should only be initialized once 
 as far as I can read the specs... or is it an issue with some Wicket 
 component?

 Environment: Glassfish 3.0.1 on Windows XP with Liferay Portal CE 5.2.3

 Sample stacktrace:

 24T13:30:57.719+0200|WARNING|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-1;|ApplicationDispatcher[/rss-portlets]
  PWC1231: Servlet.service() for servlet RSSPortlet threw exception
 org.apache.wicket.WicketRuntimeException: edit is already mounted for 
 BookmarkablePageEncoder[page=class 
 no.nsb.intranet.rss.wicket.pages.AddRSSPage]
        at 
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.mount(WebRequestCodingStrategy.java:468)
        at 
 org.apache.wicket.protocol.http.WebApplication.mount(WebApplication.java:321)
        at 
 org.apache.wicket.protocol.http.WebApplication.mountBookmarkablePage(WebApplication.java:356)
        at 
 no.nsb.intranet.rss.wicket.RSSApplication.init(RSSApplication.java:24)
        at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:719)
        at 
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)


 Med vennlig hilsen

 TOR IVER WILHELMSEN
 Senior systemutvikler
 Arrive AS
 T (+47) 48 16 06 18
 E-post: toriv...@arrive.no
 http://www.arrive.no
 http://servicedesk.arrive.no





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 it's not mandatory
 * and it's mapped to /app/show and /app/show/id/{id} too
 now when I open / I get redirected to /app/show/id/{id}?3
 when I open /app/show/id/123 then I got redirected to
 /app/show/id/{id}/show/id/123?4

thats because the default placeholder format is ${key} not {key}

-igor

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 seeing
 weird redirections:
 * the app is on / contextroot
 * the homepage could have parameters, but it's not mandatory
 * and it's mapped to /app/show and /app/show/id/{id} too
 now when I open / I get redirected to /app/show/id/{id}?3
 when I open /app/show/id/123 then I got redirected to
 /app/show/id/{id}/show/id/123?4

 thats because the default placeholder format is ${key} not {key}

 -igor

 -
 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: 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 fqn unless you want to share the
markup with other componets.

-igor



On Tue, Aug 24, 2010 at 1:21 AM, Martin Dietze d...@fh-wedel.de wrote:
 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, both rendering their cache keys in the
 same way:

 | public String getCacheKey( final MarkupContainer container,
 |                            final Class? containerClass ) {
 |   return getId();
 | }

 The cache key was implemented in this simplistic way as the
 component would always render markup of which the only dynamic
 bit is the ID (an inner component is created with that ID and
 then added to the component itself which derives from Panel).

 In their respective pages both components were used in a
 RepeatingView, thus their IDs were integer numbers as provided
 by newChildId().

 After having successfully loaded the page containing the first
 of the two components loading the page containing the second
 component fails. Further analysis revealed the following:

 In MarkupCache#getMarkup() the respective components are
 returned as cache key providers; then getMarkupFromCache() is
 called on the cache key. The getMarkupFromCache() method has an
 argument `MarkupContainer container', but it is not used in the
 default implementation.

 Consequently, the markup cache returns the markup for the wrong
 component (since both happened to be created with the same IDs).

 This means that for the worst case one has to take care that
 the cache keys created in components such as the above need to
 be collision-free across the whole application.

 I can only speculate on why the respective component's container
 is ignored when looking up the markup from the cache. One could
 argue that this approach is simpler, also one could actually
 make use of this behaviour by reusing markup across components.

 The drawback is that this is error-prone (as in this case). Also
 if I use third-party components implementing IMarkupCacheKeyProvider
 the way they create their cache keys is beyond my control which
 makes keeping cache keys collision-free potentially problematic.

 As an immediate fix I think one should add a warning to the
 IMarkupCacheKeyProvider's JavaDoc pointing out that no checking
 of the components' hierarchy is performed, so that cache keys
 need to be application-wide unique. From my experience adding
 the fully qualified class name to the cache key is usually a
 good idea (unfortunately I had considered this unnecessary for
 such simplistic components)...

 Apart from that I'd like to ask whether this way of dealing with
 the markup cache is really what we want?

 Cheers,

 M'bert

 --
 --- / http://herbert.the-little-red-haired-girl.org / -
 =+=
 Ich trink kein Wasser. Da ficken Fische drin...

 -
 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



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 reference to the FormPanel in CalendarPanel and 
attach our custom CalendarAjaxBehavior to it. Whenever the 
CalendarAjaxBehavior gets a request / click, it updates the FormPanel's 
model directly.


I don't really know if this is some ugly hack or if there is a better 
way of different panels to update / communicate with each other - other 
than holding references to one another...


Cheers,
Patrick

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 resultant file is 
corrupted.  Not sure why this is occurring.   It appears that stream is being 
closed before the content upload has been completed.  We have static PDF served 
up via apache/weblogic that don't have any problems.

Does anyone have any idea where I need to start looking?  I am assuming this is 
not a Wicket issue as it works when the appserver is accessed directly but 
could 
be wrong.

Thanks
- Doug

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. 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 reference to the FormPanel in CalendarPanel and attach
 our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior
 gets a request / click, it updates the FormPanel's model directly.

 I don't really know if this is some ugly hack or if there is a better way of
 different panels to update / communicate with each other - other than
 holding references to one another...

 Cheers,
 Patrick

 -
 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: 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 you want to pass around references to
the components that need updating).

On Tue, Aug 24, 2010 at 12:56 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 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. 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 reference to the FormPanel in CalendarPanel and attach
 our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior
 gets a request / click, it updates the FormPanel's model directly.

 I don't really know if this is some ugly hack or if there is a better way of
 different panels to update / communicate with each other - other than
 holding references to one another...

 Cheers,
 Patrick

 -
 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: 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 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 you want to pass around references to
 the components that need updating).

 On Tue, Aug 24, 2010 at 12:56 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 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. 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 reference to the FormPanel in CalendarPanel and attach
 our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior
 gets a request / click, it updates the FormPanel's model directly.

 I don't really know if this is some ugly hack or if there is a better way of
 different panels to update / communicate with each other - other than
 holding references to one another...

 Cheers,
 Patrick

 -
 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



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, James Carman
 ja...@carmanconsulting.com wrote:
 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 you want to pass around references to
 the components that need updating).

 On Tue, Aug 24, 2010 at 12:56 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 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. 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 reference to the FormPanel in CalendarPanel and attach
 our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior
 gets a request / click, it updates the FormPanel's model directly.

 I don't really know if this is some ugly hack or if there is a better way 
 of
 different panels to update / communicate with each other - other than
 holding references to one another...

 Cheers,
 Patrick

 -
 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



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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
ja...@carmanconsulting.com wrote:
 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, James Carman
 ja...@carmanconsulting.com wrote:
 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 you want to pass around references to
 the components that need updating).

 On Tue, Aug 24, 2010 at 12:56 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 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. 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 reference to the FormPanel in CalendarPanel and attach
 our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior
 gets a request / click, it updates the FormPanel's model directly.

 I don't really know if this is some ugly hack or if there is a better way 
 of
 different panels to update / communicate with each other - other than
 holding references to one another...

 Cheers,
 Patrick

 -
 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



 -
 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 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 -DartifactId=foo

opened it in Netbeans, created the action jetty:run and started the
application. All is well and I can see the greeting page.

If I change the text on the html file or alter the message in the class file
- nothing happens. If I shutdown and restart jetty:run, the changes appear.
I added the scanIntervalSeconds:

plugin
groupIdorg.mortbay.jetty/groupId
artifactIdmaven-jetty-plugin/artifactId
configuration
   
scanIntervalSeconds3/scanIntervalSeconds
/configuration
/plugin

to the POM file but still no change. Is there something else I must do in
Netbeans to see and publish changes I make to Wicket files or ... is there a
better way to do this so that I'm not constantly restarting the web server?

I also tried the 'Start' class - and I can see the pages - but they do not
refresh when I change anything on them or their related class files.

What is generally the best routine for the smoothest development workflow
with wicket. A different IDE?

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Netbeans-tp2337063p2337063.html
Sent from the Wicket - User 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: 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 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
 ja...@carmanconsulting.com wrote:
 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, James Carman
 ja...@carmanconsulting.com wrote:
 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 you want to pass around references to
 the components that need updating).

 On Tue, Aug 24, 2010 at 12:56 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 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. 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 reference to the FormPanel in CalendarPanel and 
 attach
 our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior
 gets a request / click, it updates the FormPanel's model directly.

 I don't really know if this is some ugly hack or if there is a better 
 way of
 different panels to update / communicate with each other - other than
 holding references to one another...

 Cheers,
 Patrick

 -
 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



 -
 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: 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 Tue, Aug 24, 2010 at 10:27 AM, LutherBaker lutherba...@gmail.com wrote:

 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 -DartifactId=foo

 opened it in Netbeans, created the action jetty:run and started the
 application. All is well and I can see the greeting page.

 If I change the text on the html file or alter the message in the class file
 - nothing happens. If I shutdown and restart jetty:run, the changes appear.
 I added the scanIntervalSeconds:

                        plugin
                                groupIdorg.mortbay.jetty/groupId
                                artifactIdmaven-jetty-plugin/artifactId
                                configuration

 scanIntervalSeconds3/scanIntervalSeconds
                                /configuration
                        /plugin

 to the POM file but still no change. Is there something else I must do in
 Netbeans to see and publish changes I make to Wicket files or ... is there a
 better way to do this so that I'm not constantly restarting the web server?

 I also tried the 'Start' class - and I can see the pages - but they do not
 refresh when I change anything on them or their related class files.

 What is generally the best routine for the smoothest development workflow
 with wicket. A different IDE?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Netbeans-tp2337063p2337063.html
 Sent from the Wicket - User 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: 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.
 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 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
 ja...@carmanconsulting.com wrote:
 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, James Carman
 ja...@carmanconsulting.com wrote:
 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 you want to pass around references to
 the components that need updating).

 On Tue, Aug 24, 2010 at 12:56 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 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. 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 reference to the FormPanel in CalendarPanel and 
 attach
 our custom CalendarAjaxBehavior to it. Whenever the CalendarAjaxBehavior
 gets a request / click, it updates the FormPanel's model directly.

 I don't really know if this is some ugly hack or if there is a better 
 way of
 different panels to update / communicate with each other - other than
 holding references to one another...

 Cheers,
 Patrick

 -
 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



 -
 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



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 class (Shift-F5)
in debug mode handles many class changes without Jetty restart. F11 rebuilds
war and copies html. And restarting jetty is very fast.

Jetty7 runner class:
public class Main {
  public static void main(String[] args) throws Exception {
Server server = new Server(8084);
WebAppContext webapp = new WebAppContext();
webapp.setContextPath(/example);
webapp.setWar(build/web);
server.setHandler(webapp);
server.start();
server.join();
  }
}

 

On Tue, 24 Aug 2010 10:27:32 -0700 (PDT)
LutherBaker lutherba...@gmail.com wrote:

 
 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 -DartifactId=foo
 
 opened it in Netbeans, created the action jetty:run and started the
 application. All is well and I can see the greeting page.
 
 If I change the text on the html file or alter the message in the class file
 - nothing happens. If I shutdown and restart jetty:run, the changes appear.
 I added the scanIntervalSeconds:
 
   plugin
   groupIdorg.mortbay.jetty/groupId
   artifactIdmaven-jetty-plugin/artifactId
 configuration

 scanIntervalSeconds3/scanIntervalSeconds
 /configuration
   /plugin
 
 to the POM file but still no change. Is there something else I must do in
 Netbeans to see and publish changes I make to Wicket files or ... is there a
 better way to do this so that I'm not constantly restarting the web server?
 
 I also tried the 'Start' class - and I can see the pages - but they do not
 refresh when I change anything on them or their related class files.
 
 What is generally the best routine for the smoothest development workflow
 with wicket. A different IDE?
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 =
com.webperformanceinc.office.licmgr.ui.MassUpgradeStatusPage, id = 20, version 
= 0, ajax = 3]
 at 
org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346)
 at org.wicketstuff.progressbar.ProgressBar.start(ProgressBar.java:184)
 at
com.webperformanceinc.office.licmgr.ui.MassUpgradeStatusPage$2.onSubmit(MassUpgradeStatusPage.java:61)
 at 
org.apache.wicket.ajax.markup.html.form.AjaxButton$1.onSubmit(AjaxButton.java:102)
 ...

I have 3 elements with wicket:ids on them in my page, a form, a button and the
progress bar. I've called setOutputMarkupId(true) on all three, plus on the
page, since it was indicated as the offending componenet.  What am I missing?

See below for my code and HTML.

TIA to anyone who can point me in the right direction.
Chris



My page is constructed in this method (called from the page constructors):
private void init()
{
setOutputMarkupId(true);

final ProgressBar bar = new ProgressBar(bar, new ProgressionModel()
{
protected Progression getProgression()
{
return new Progression(progress);
}

protected void onFinished(AjaxRequestTarget target)
{
setVisible(false);
target.appendJavascript(alert('Task done!'));
}
});
add(bar);
bar.setOutputMarkupId(true);

Form form = new Form(form);
add(form);
form.setOutputMarkupId(true);
IndicatingAjaxButton start_button = new 
IndicatingAjaxButton(start_button, form)
{
protected void onSubmit(AjaxRequestTarget target, Form form)
{
bar.start(target);
new Thread()
{
public void run()
{
for (int i = 0; i = 100; i++)
{
try
{
Thread.sleep(200);
}
catch (InterruptedException e)
{
}
progress = i;
}
}
}.start();
}
};
start_button.setOutputMarkupId(true);
form.add(start_button);

}

and my markup is pretty simple:

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.sourceforge.net/;
  head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleapp title/title
  /head
  body
  wicket:extend

pStatus goes here:/p
form action=# wicket:id=forminput type=submit wicket:id=start_button 
value=start/form
div wicket:id=bar[Progress]/div


  /wicket:extend
  /body
/html




-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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 application under the server
that you will deploy it on in production.

Regards,

Bernard


On Tue, 24 Aug 2010 10:27:32 -0700 (PDT), you wrote:


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 -DartifactId=foo

opened it in Netbeans, created the action jetty:run and started the
application. All is well and I can see the greeting page.

If I change the text on the html file or alter the message in the class file
- nothing happens. If I shutdown and restart jetty:run, the changes appear.
I added the scanIntervalSeconds:

   plugin
   groupIdorg.mortbay.jetty/groupId
   artifactIdmaven-jetty-plugin/artifactId
configuration
   
scanIntervalSeconds3/scanIntervalSeconds
/configuration
   /plugin

to the POM file but still no change. Is there something else I must do in
Netbeans to see and publish changes I make to Wicket files or ... is there a
better way to do this so that I'm not constantly restarting the web server?

I also tried the 'Start' class - and I can see the pages - but they do not
refresh when I change anything on them or their related class files.

What is generally the best routine for the smoothest development workflow
with wicket. A different IDE?


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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:

 java.lang.IllegalArgumentException: cannot update component that does not 
 have setOutputMarkupId
 property set to true. Component: [Page class =
 com.webperformanceinc.office.licmgr.ui.MassUpgradeStatusPage, id = 20, 
 version = 0, ajax = 3]
     at 
 org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346)
     at org.wicketstuff.progressbar.ProgressBar.start(ProgressBar.java:184)
     at
 com.webperformanceinc.office.licmgr.ui.MassUpgradeStatusPage$2.onSubmit(MassUpgradeStatusPage.java:61)
     at 
 org.apache.wicket.ajax.markup.html.form.AjaxButton$1.onSubmit(AjaxButton.java:102)
     ...

 I have 3 elements with wicket:ids on them in my page, a form, a button and the
 progress bar. I've called setOutputMarkupId(true) on all three, plus on the
 page, since it was indicated as the offending componenet.  What am I missing?

 See below for my code and HTML.

 TIA to anyone who can point me in the right direction.
 Chris



 My page is constructed in this method (called from the page constructors):
    private void init()
        {
        setOutputMarkupId(true);

        final ProgressBar bar = new ProgressBar(bar, new ProgressionModel()
            {
            protected Progression getProgression()
                {
                return new Progression(progress);
                }

            protected void onFinished(AjaxRequestTarget target)
                {
                setVisible(false);
                target.appendJavascript(alert('Task done!'));
                }
            });
        add(bar);
        bar.setOutputMarkupId(true);

        Form form = new Form(form);
        add(form);
        form.setOutputMarkupId(true);
        IndicatingAjaxButton start_button = new 
 IndicatingAjaxButton(start_button, form)
            {
            protected void onSubmit(AjaxRequestTarget target, Form form)
                {
                bar.start(target);
                new Thread()
                {
                public void run()
                    {
                    for (int i = 0; i = 100; i++)
                        {
                        try
                            {
                            Thread.sleep(200);
                            }
                        catch (InterruptedException e)
                            {
                            }
                        progress = i;
                        }
                    }
                }.start();
                }
            };
        start_button.setOutputMarkupId(true);
        form.add(start_button);

        }

 and my markup is pretty simple:

 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
    xmlns:wicket=http://wicket.sourceforge.net/;
  head
    meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
    titleapp title/title
  /head
  body
      wicket:extend

 pStatus goes here:/p
 form action=# wicket:id=forminput type=submit 
 wicket:id=start_button value=start/form
 div wicket:id=bar[Progress]/div


      /wicket:extend
  /body
 /html




 --
  -
 Chris Merrill                           |  Web Performance, Inc.
 ch...@webperformance.com                |  http://webperformance.com
 919-433-1762                            |  919-845-7601

 Web Performance: Website Load Testing Software  Services
  -

 -
 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: 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



-- 
 -
Chris Merrill   |  Web Performance, Inc.
ch...@webperformance.com|  http://webperformance.com
919-433-1762|  919-845-7601

Web Performance: Website Load Testing Software  Services
 -

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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

 -
 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: 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 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



 -
 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: 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] http://github.com/victori/jetty-session-cache
[3] http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit/

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:
  



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



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
does not take place. (page refreshes but no submission)

On debugging, I realized that  if I perform JavaScript form submission
(using  $('#formId').submit()) -- the control never goes to
Button.onSubmit(), rather it goes to only to Form.onSubmit(). So, my page
just reloads.

Is there a work-around so that if I perform $('#formId').submit() on
front-end -- the submit button's onSubmit() get called?

I would be reluctant to move code from Button.onSubmit() to Form.onSubmit()
because I have many forms where submission logic is written in
Button.onSubmit() and I may need to change those as well.

---

I am currently trying to simulate JavaScript's confirm behavior for button,
so that Button.onSubmit() get's the control when confirms the dialog. It's
here
http://stackoverflow.com/questions/3560872/returning-value-from-confirmation-dialog-using-jquery-ui-dialog

Thanks
Nishant


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.

This last comment peaked my interest - session preservation would be nice -
ie: I assume that hot deploys are in place and the server doesn't actually
restart.

H


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Netbeans-tp2337063p2337510.html
Sent from the Wicket - User 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