Re: 1.5 RequestMapper and Form submit

2010-10-14 Thread Matej Knopp
Why don't you store the locale in session every time it is in URL? Or
if you need more control store it in the page instance.

Kind regards,
Matej Knopp
InMethod

On Thu, Oct 14, 2010 at 4:37 PM, marco.behler m...@coderwerk.com wrote:

 First of all, congratulations to the new request handling functionality. I've
 been running into a tiny issue however.
 Similarily to wicket-examples, I've got the following mapping:

 root.add(new LocaleMapper(new MountedMapper(/myPage, MyPage.class)));

 which let's me access the page via /de/myPage or /ch/myPage etc.

 Now on that page I've got a form, which's onSubmit() is dependent on the
 locale of the first url segment - but I'd like to not have to store the
 locale in a hidden field when rendering the form.

 Wicket naturally maps the form's action to /../wicket?jadajada., leaving
 out the locale, which messages up my onSubmit().

 Any way around this?

 Thank you!



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/1-5-RequestMapper-and-Form-submit-tp2995427p2995427.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



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



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: [1.5] new wicket URL-related questions

2010-08-23 Thread 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



Re: Wicket 1.5-M1 migration experiences

2010-08-12 Thread Matej Knopp
We don't have convenience urlfor methods on request cycle any more,
however there is a convenience urlFor(Class, PageParameters) on
Component, so look there to see how it's done.

Instead of setRequestTarget you can do this

RequestCycle#scheduleRequestHandlerAfterCurrent(handler)

-Matej

2010/8/12 Major Péter majorpe...@sch.bme.hu:
 What's the substitute for RequestCycle#urlFor(Class, PageParameters) ?

 In 1.4 I was using RequestCycle#setRequestTarget(IResourceStream) and
 ResourceStreamRequestTarget to make dynamically generated PDF/CSV/etc
 files downloadable for users. How is that possible in 1.5-M1?

 Thanks,
 Peter

 2010-08-12 12:11 keltezéssel, Martin Grigorov írta:
 Good catch!

 There is no WebRequestCycle anymore. You'll need to extend RequestCycle now.
 Override org.apache.wicket.Application.createRequestCycle(Request, Response)
 to return your class.
 The current entry point
 is org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach().
 For now you'll have to wrap this method with try/finally to simulate
 onBefore/onEnd.

 We will discuss it and probably these two methods will be added again there
 for M2.

 2010/8/12 dzb zenberg.d...@gmail.com

 Hi,

 It seems RequestCycle has a big change in 1.5-M1.

 How can I do things like below codes on 1.5 ?

 public class MyRequestCycle extends WebRequestCycle {

 �...@override
  protected void onBeginRequest() {
   super.onBeginRequest();
   ...
  }

 �...@override
  protected void onEndRequest() {
    ...
    super.onEndRequest();
  }
 }

 Where is the request pipline's entry?

 dzb,zenberg.d...@gmail.com
 2010-08-12
 - Original Message -
 From: Major_P閠er
 To: users
 Sent: 2010-08-12, 06:53:39
 Subject: Wicket 1.5-M1 migration experiences


 Hi,

 I've just tried to move our application to Wicket 1.5-M1, and I've faced
 with the following problems:
 * new HeaderContributor(new IHeaderContributor() {...} isn't working
 anymore, the constructor is gone.
 After looking into JavaDoc I've find out that HeaderContributor.forCss
 and other methods are deprecated in 1.4.9, but not in 1.5-M1, so wtf?

 * PageParameters#getAsLong and other helper methods are missing, instead
 we have PageParameters#getNamedParameter()#toLong and etc.

 There are Indexed Parameters and Named Parameters, what's the difference?
 based on the JavaDoc I would thought indexed parameter is like
 '/show/id/1' and named is 'show?id=1'
 if this is true, why isn't there simply a
 getParameterIDon'tCareAboutTheTypeOfIt function, if I want to support
 both of them?

 The deprecated PageParameters constructors are lacking JavaDoc
 deprecation note, or it could be a bit enhanced at least.

 * AjaxButton now has onError function, which needs to be implemented
 * IBehavior#unbind

 * In MyApplication I've had a method like this:
 @Override
    public RequestCycle newRequestCycle(Request request, Response
 response) {
        if
 (!Configuration.getEnvironment().equals(Environment.PRODUCTION)) {
            return super.newRequestCycle(request, response);
        } else {
            return new WebRequestCycle(this, (WebRequest) request,
 (WebResponse) response) {

               �...@override
                public Page onRuntimeException(Page page,
 RuntimeException ex) {
                    if (ex instanceof PageExpiredException) {
                        return new PageExpiredError();
                    }
                    return new InternalServerError(page, ex);
                }
            };
        }
    }

 now newRequestCycle is gone, we have createRequestCycle, which is final
 and it uses RequestCycleProvider. so changing this to

 setRequestCycleProvider(new IRequestCycleProvider() {

           �...@override
            public RequestCycle get(RequestCycleContext context) {
                if
 (!Configuration.getEnvironment().equals(Environment.PRODUCTION)) {
                    return new RequestCycle(context);
                } else {
                    return new RequestCycle(context) {

                       �...@override
                        protected IRequestHandler
 handleException(Exception e) {
                            //etc
                        }
                    };
                }
            }
        });

 should have the same behavior, or??

 Also I couldn't find a substitute for this:

 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/protocol/http/WebApplication.html#mount(java.lang.String,%20org.apache.wicket.util.lang.PackageName)
 and also for HybridUrlCodingStrategy. Or is hybrid even needed anymore?
 Where can I find out more about these new requestmapper stuff? (Please
 don't say in wicket-examples, I'm looking for a doc, like
 https://cwiki.apache.org/confluence/display/WICKET/URL+Coding+Strategies )

 Thanks

 Regards,
 Peter

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

Re: Welcome Martin Grigorov as a core team member

2010-07-20 Thread Matej Knopp
Welcome Martin!

-Matej

On Tue, Jul 20, 2010 at 5:21 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 not working on wicket has made you lazy johan! :)

 -igor

 On Tue, Jul 20, 2010 at 7:46 AM, Johan Compagner jcompag...@gmail.com wrote:
 welcome!

 hope you happily merge even more stuff ;)

 johan


 On Tue, Jul 20, 2010 at 13:21, Martin Grigorov
 martin.grigo...@gmail.com wrote:
 Thanks a lot for the voted trust in me, team!

 As a big open source believer it is an honour for me to be a part of
 the team that made such a great framework!

 Looking forward to make 1.5 production ready !


 2010/7/20 Ian Marshall ianmarshall...@gmail.com


 Many congratulations Martin!

 (In my extremely limited experience with web application frameworks, Wicket
 is just so excellent. Developing with Wicket really is fun, too.)
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Welcome-Martin-Grigorov-as-a-core-team-member-tp2294324p2295166.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



 -
 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: [Wicketstuff / Inmethod-Grid] A handful of patches

2010-06-07 Thread Matej Knopp
Hi,

I'm too busy to review the patches now, also they didn't get through
as the mailing list doesn't allow attachments.

Perhaps when JIRA works on wicket stuff again you can create issues in
grid project and attache the patches there.

-Matej


On Mon, Jun 7, 2010 at 5:48 PM, Charles Deal chuckdea...@gmail.com wrote:
 We've been using the grid for quite some time now and have accumulated a few
 changes to the codebase.  I'd like to submit them for other users to review
 and discuss, in the hopes that they will make it into the wicketstuff
 codebase in the future.  The following are brief descriptions of the
 attached files.

 inmethodgrid-script.patch
 This patch simply adds a resize event to the grid.  We noticed that when the
 browser was resized, the grid wouldn't resize until the user attempted to
 scroll.

 inmethodgrid-columns.patch
 Some small changes to facilitate more code reuse.

 inmethodgrid-form.patch
 Move the header and toolbars into the form.  This allows the header to
 determine the form automatically so that, for example, when sorting a grid,
 the behavior can submit the form to retain any transient changes to the
 grid.

 inmethodgrid-gridbehavior.patch
 Refactor the AjaxFormSubmitBahvior implementation into its own class to be
 used by custom behaviors.  Altered the code to use the new class.

 inmethodgrid-insert.patch
 Add support for adding rows to the grid.

 As I said, my team have been successfully using (almost all of) these
 patches since at least June 2008.  The script patch is the only one that is
 a recent change.  I'd appreciate some feedback and if no objections are
 made, I'd like to get these patches into the scm.


 -
 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: Don't increment the Session.pageIdCounter for stateless pages?

2010-03-13 Thread Matej Knopp
I'm not sure about all this.

If the session has not been bound the page id will always be 0. If the
session has been bound, I don't think we shouldn't increment page Id.
Stateless page can became stateful any time, not incrementing the id
can have sideeffects.

-Matej

On Sat, Mar 13, 2010 at 10:55 PM, Martin Grotzke
martin.grot...@javakaffee.de wrote:
 Hi,

 just submitted this as
 https://issues.apache.org/jira/browse/WICKET-2782

 I tried incrementing the pageId when the page's numericId is first
 accessed, but soon realized, that this does happen rather often (also
 e.g. to construct bookmarkable page links) ;-) Seems to be not as easy
 as I thought. Still, it would be really cool if this could be
 implemented!

 Cheers,
 Martin


 On Wed, 2010-03-10 at 08:49 -0800, Igor Vaynberg wrote:
 i think we can do this in 1.5

 i would rather not mess with 1.4 because i think there is a lot of
 code there that depends on the fact that the id is available right
 away.

 please create a jira issue for this

 -igor

 On Mon, Mar 8, 2010 at 4:30 PM, Martin Grotzke
 martin.grot...@javakaffee.de wrote:
  Hi,
 
  the Page.init(PageMap) invokes setNextAvailableId(), which invokes
  getSession().nextPageId() if isPageIdUniquePerSession is set.
 
  getSession().nextPageId() modifies the Session.pageIdCounter.
 
  When I have a session and afterwards access a stateless page, the
  Session.pageIdCounter is the only data that is changed in the session
  AFAICS, everything else is the same as in the request before.
 
  Is it possible _not_ to modify the Session.pageIdCounter if the page is
  really stateless (or just don't invoke Page.setNextAvailableId())?
 
  I'm interested in this, as I'm just implementing a feature for the
  memcached-session-manager ([1], memcached based session replication),
  which checks if session data has changed and replicates sessions only if
  this is provided. If session data did not change, the replication is
  omitted. Therefore, if the Session.pageIdCounter would be left unchanged
  for stateless pages, this would allow to make use of this feature in
  wicket apps.
 
  Thanx  cheers,
  Martin
 
 
  [1] http://code.google.com/p/memcached-session-manager/
 
 
 

 -
 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: inmethod DataGrid problem in IE8

2010-03-12 Thread Matej Knopp
If you run grid examples is the problem present?

-Matej

On Fri, Mar 12, 2010 at 9:54 PM, Russell Morrisey
russell.morri...@missionse.com wrote:
 I am having trouble with the layout of my inmethod DataGrid in wicket.  It 
 appears that the header columns and the data columns are not lining up 
 correctly.  There is a thin outer layer surrounding the individual columns on 
 each row that is pushing the data outside of the viewable area.  This only 
 happens in IE 8, it works fine in lower versions of IE and Firefox.  The 
 summary and header rows work properly but the data rows are the problem.

 Marsha


 
 This is a PRIVATE message. If you are not the intended recipient, please 
 delete without copying and kindly advise us by e-mail of the mistake in 
 delivery.
 NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
 order or other contract unless pursuant to explicit written agreement or 
 government initiative expressly permitting the use of e-mail for such purpose.


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



Re: InMethod grid AbstractColumn#getHeaderCssClass() problem.

2010-02-01 Thread Matej Knopp
But the css class is in the output. Can't it be a styling problem?
I.e. the css being by more specific rule?

Can you try something like

th.centerAlign *  {
  text-align: center !important;
}

Or even more specific clas

th.centerAlign div.imxt-a {
text-align:center !important;
}

If that doesn't work, this should

div.imxt-vista table.imxt-head th.centerAlign div.imxt-a {
text-align:center !important;
}

You should use firebug (or something similar) to inspect the elements
to see which CSS ruels get applied and how to override them.

-Matej

On Mon, Feb 1, 2010 at 4:45 PM, Warren Bell warrenbe...@gmail.com wrote:
 I am having a problem with AbstractColumn#getHeaderCssClass() in an inmethod
 datagrid. It is writing my css class to the th tag but my css class is not
 working. I think it is something to do with IE8. Unfortunately the company
 that uses this app uses IE8 and the app is written for IE8. Digging threw
 the code, I can see were the css class name is added, but there does not
 seem to be any way to modify it or implementing my own ColumnHeader panel
 without copying a whole lot of classes. I think it would probably be better
 if the users css class was added to its own div tag.

 Anyway, does anyone know of a simple way of getting my css class to work in
 an InMethod grid header? All I want to do is center the header text.
 Customers can get real nit picky.

 The same class works for an individual cell:

           @Override
           public String getCellCssClass(IModel rowModel, int rowNum)
           {
               return centerAlign;
           }
          but, this does not work for the header:

           @Override
           public String getHeaderCssClass()
           {
               return centerAlign;
           }

 The th tag that is getting created is:

 th style=width:125px class=imxt-want-prelight centerAligndiv
 class=imxt-adiv class=imxt-ba id=id20 href=#
 class=imxt-sort-header imxt-sort-header-none onclick=var
 wcall=wicketAjaxGet('?wicket:interface=:4:body:grid:header:header:getOrderCostFromItems::IBehaviorListener:0:',null,null,
 function() {return Wicket.$('id20') != null;}.bind(this));return !wcall;
 div class=imxt-sort-header1divTotal/div/div
 /a/diva class=imxt-handle href=# onclick=return
 false/a/div/th

 My css class:

 .centerAlign {
   text-align: center;
 }

 --
 Thanks,

 Warren


 -
 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: Should Duration be deprecated?

2010-01-26 Thread Matej Knopp
There is a difference between

MILLISECONDS.toSeconds(duration) and duration.toSeconds()

As for all data being stored as primitives, sometimes being able to
access it on higher level can be kinda nice...

-Matej

On Tue, Jan 26, 2010 at 9:00 PM, James Carman
jcar...@carmanconsulting.com wrote:
 All data in Java is ultimately stored as some sort of primitive type.

 On Tue, Jan 26, 2010 at 2:55 PM, Jonathan Locke
 jonathan.lo...@gmail.com wrote:


 TimeUnit is icky and storing time values in primitive types is a bad idea.


 Alexandru Objelean wrote:

 I was wondering why would wicket need Duration class as long as java
 provides a similar TimeUnit. Maybe it would be a good idea to deprecate
 this
 class  encourage usage of TimeUnit?

 Alex Objelean



 --
 View this message in context: 
 http://old.nabble.com/Should-Duration-be-deprecated--tp27323675p27328738.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



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



Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Matej Knopp
Just because it's the same page class it doesn't mean it's the same
page instance. How does the URL that you invoke look like?

-Matej

On Thu, Jan 7, 2010 at 12:32 PM, manuelbarzi manuelba...@gmail.com wrote:
 Hi,

 - the scenario is this:

 jmeter stress-testing (10 simultaneous users with no ramp-up and an
 infinite-loop cycle) a wicket application (extends SpringWebApplication) by
 only refreshing the HomePage.

 - the result is:

 observing the disk, the pagemap file for each session (10 items), there is
 an infinite increasing (about 10kb each one) up to arriving the 10MB
 (default max size for diskpagestore).

 opening the pagemap file (text editor) there is a repetition of the same
 HomePage serialized infinite times til arriving the max size allowed for
 the file...

 - the question is:

 why is this happening? shouldn't the pagemap only store the new pages, but
 only conserving one reference to a page that was already serialized? why
 is it serializing the same page (HomePage) to the infinite?


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



Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Matej Knopp
You have the exact same problem with every stateful application. If
you want to avoid a DoS attack (which isn't really always possible)
you need a good firewall.

-Matej

On Thu, Jan 7, 2010 at 2:29 PM, manuelbarzi manuelba...@gmail.com wrote:
 if this is the behaviour by default, then, how do you avoid a DoS attack? i
 mean, to put an example, if a simple app like this receives thousand of
 users just refreshing the home page, then the pagestore will be
 overloaded... may this become a disk I/O overhead and its other possible
 consequences.


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



Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Matej Knopp
You can make your home page stateless. Of course that limits what
components you can put on it.

-Matej

On Thu, Jan 7, 2010 at 2:42 PM, manuelbarzi manuelba...@gmail.com wrote:
 hmmm... but we are talking about something very basic: the home page!
 there's no way to avoid repetition of this page in pagestore? i guess
 pagestore does not repeat other internal pages (with extended url - not home
 page - if their are correctly independent, no new object references inside
 on each reload and so on, let's say) by following internal rules (based on
 object state and references), why couldn't it be applied a similar mechanism
 for the home page?

 On Thu, Jan 7, 2010 at 2:31 PM, Matej Knopp matej.kn...@gmail.com wrote:

 You have the exact same problem with every stateful application. If
 you want to avoid a DoS attack (which isn't really always possible)
 you need a good firewall.

 -Matej

 On Thu, Jan 7, 2010 at 2:29 PM, manuelbarzi manuelba...@gmail.com wrote:
  if this is the behaviour by default, then, how do you avoid a DoS attack?
 i
  mean, to put an example, if a simple app like this receives thousand of
  users just refreshing the home page, then the pagestore will be
  overloaded... may this become a disk I/O overhead and its other possible
  consequences.
 

 -
 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: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Matej Knopp
SetVersioned(false) does not help with new page instances being created.

-Matej

On Thu, Jan 7, 2010 at 9:46 PM, Wilhelmsen Tor Iver toriv...@arrive.no wrote:
 about unversioned, i have just done a quick test on wicket-examples 
 helloworld, adding serialVersionUID (not informed in the examples) and
 the
 result is the same: pagestore file increasing to the infinite (max
 size of
 course :)

 I meant Wicket's

 setVersioned(false);

 the serialVersionUID is just for binary serialization, as long as the fields 
 do not change the computed value the VM generates for you should be the same.

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

2010-01-06 Thread Matej Knopp
Caused by: java.util.MissingResourceException: Unable to find property:
'id1' for component: grid1:header:header:id1

You are missing property id1 for column header in your property file.

-Matej

On Wed, Jan 6, 2010 at 6:35 PM, Igor Racic igor.ra...@gmail.com wrote:
 Hi,

 I am trying to adapt datagrid example and can't resolve following:

 ERROR - RequestCycle               - Exception in rendering component:
 [Component id = id1]
 org.apache.wicket.WicketRuntimeException: Exception in rendering component:
 [Component id = id1]
    at org.apache.wicket.Component.renderComponent(Component.java:2658)
    at
 org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:62)
    at org.apache.wicket.Component.render(Component.java:2450)
    at
 com.inmethod.grid.common.ColumnsHeaderRepeater.onRender(ColumnsHeaderRepeater.java:142)
    at org.apache.wicket.Component.render(Component.java:2450)
    at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
    at
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
    at
 org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675)
    at
 org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
    at org.apache.wicket.Component.renderComponent(Component.java:2619)
    at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
    at org.apache.wicket.Component.render(Component.java:2450)
    at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
    at
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
    at
 org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675)
    at
 org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
    at org.apache.wicket.Component.renderComponent(Component.java:2619)
    at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
    at org.apache.wicket.Component.render(Component.java:2450)
    at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
    at
 org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1528)
    at org.apache.wicket.Page.onRender(Page.java:1545)
    at org.apache.wicket.Component.render(Component.java:2450)
    at org.apache.wicket.Page.renderPage(Page.java:914)
    at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
    at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
    at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
    at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
    at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
    at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
    at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
    at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:295)
    at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
    at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
    at
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
    at
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
 Caused by: java.util.MissingResourceException: Unable to find property:
 'id1' for component: grid1:header:header:id1
 [class=com.inmethod.grid.column.AbstractColumn$1]
    at org.apache.wicket.Localizer.getString(Localizer.java:344)
    at org.apache.wicket.Localizer.getString(Localizer.java:138)
    at
 org.apache.wicket.model.ResourceModel$AssignmentWrapper.getObject(ResourceModel.java:125)
    at
 org.apache.wicket.model.ResourceModel$AssignmentWrapper.getObject(ResourceModel.java:92)
    at
 org.apache.wicket.Component.getDefaultModelObject(Component.java:1657)
    at
 org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1676)
    at
 

Re: PageWindowManager (DiskPageStore) causing PageExpiredException when working in different browser tabs

2009-12-18 Thread Matej Knopp
Hi,

problem in your case is that that the diskpagestore overflows. That
normal, it's cyclic, but it shouldn't happen too often. The default
size is 10 megabytes (can be increased), that means it should be able
to accommodate quite a few (well, hundreds) of pages. So even with
multiple tabs the expiration shouldn't happen too often. That is,
unless your serialized pages are particularly big, which would
indicate that you're not using detachable models properly and
serialize lot of stuff.

Btw, seeing your are working for EEA, try contacting Tomas Drencak
(EEA KE), he might be able to help you with this.

-Matej

2009/12/18 Tom Kmec tom.k...@eea.sk:
 Hello,

 we are experiencing occasional page expirations in our Wicket based
 application when user is working in several browser tabs.

 After some debugging, i got to PageWindowManager class, which manages
 positions and size of serialized pages in the pagemap file.

 I have identified adjustWindowSize(int index, int size) method as the source
 of my problem, namely this part:

 // merge as many times as necessary
 while (window.filePartSize  size  index  windows.size() - 1)
 {
    mergeWindowWithNext(index);
 }

 The problem with this is that beyond the resized window there might be a
 page window containing data of another page (open in another browser tab).
 This code just wipes the data out.

 I haven't found any 'quick fix' solution for this.
 I might replace DiskPageStore with SimpleSynchronousFilePageStore, but that
 will perform badly in production. as the documentation states and it will
 require altering wicket code anyway, so I'd prefer another solution...
 any thoughts?

 Thanks,
 Tom Kmec
 eea cz


 -
 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: Modal Window Problems On Internet Explorer.

2009-12-15 Thread Matej Knopp
Have you cleared your browser cache?

-Matej

On Wed, Dec 16, 2009 at 12:02 AM, victorTrapiello vic...@trapiello.net wrote:

 Please check the second example in that wicket page (the panel) check it with
 IE8, that exactly what is happend to me, and before with IE 7 it
 didn´t I just downloaded the latest wicket release and still the
 same...
 thanks for the support!!


 Loritsch, Berin C. wrote:

 The question is whether there is a problem with Javascript or not.
 Setting up the debugger for IE is a pain in the arse, but worth doing when
 tracking down strange behaviors.  Are you also having problems in Chrome
 or Safari?  Chrome also has some javascript debugging tools, and the
 engine is different enough from Firefox that you may catch the offending
 code.

 -Original Message-
 From: victorTrapiello [mailto:vic...@trapiello.net]
 Sent: Tuesday, December 15, 2009 1:56 PM
 To: users@wicket.apache.org
 Subject: Re: Modal Window Problems On Internet Explorer.


 hahahahha I knew that someone was going to come up with this, yes it does,
 it
 works fine in the apache wicket offcial page, but when I do the example
 and
 compile it, it only works in Mozilla! maybe I do not have the last Wicket
 release, what do you think¿?

 Thanks for the reply Johan


 Johan Compagner wrote:

 Modal windows are working find for me on IE8

 http://wicketstuff.org/wicket14/ajax/modal-window

 are you saying that above example doesnt work?


 On Mon, Dec 14, 2009 at 01:41, victorTrapiello vic...@trapiello.net
 wrote:


 Hello guyss, I find it anoying as well I´m developing a web app and now
 I
 realize that the modal window only works in mozilla... when I try to
 open
 it
 wit I explorer 7 or 8 it comes up with an error page the url does not
 exist

 do you know how to fix that or it means our lovely java framewor
 Wickets
 is becoming oldfashion...

 Thank you very much guys!!


 bgooren wrote:
 
  I don't have this problem with the Modal Window, so my guess is that
 you
  have some custom javascript which tries to set the focus to an element
  which is either invisible or inactive.
 
  Bas
 
 
  carlo c wrote:
 
  Hi,
 
  I keep on experiencing this when I try to open a modal window in IE6,
 7
  and 8.
 
 
  I don't know if any of you encountered it from before.
 
  Can't move focus to the control because it is invisible, not
 enabled,
  or of a type that does not accept the focus
 
 
  It's happeningd on Internet Explorer only and it's quite annoying.
 
  Thanks A Lot
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Modal-Window-Problems-On-Internet-Explorer.-tp26572367p26771544.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





 --
 View this message in context:
 http://old.nabble.com/Modal-Window-Problems-On-Internet-Explorer.-tp26572367p26799812.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




 --
 View this message in context: 
 http://old.nabble.com/Modal-Window-Problems-On-Internet-Explorer.-tp26572367p26803424.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: Limiting PageStore size

2009-12-11 Thread Matej Knopp
It's in the 2.0 in alternate future. Time travel is a tricky thing.

-Matej

On Fri, Dec 11, 2009 at 9:37 PM, Johan Compagner jcompag...@gmail.com wrote:
 did wicket 2.0 had a tardis??
 i am checking svn right now for those lost diamonds!

 On 11/12/2009, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 maybe wicket 2.0 will come with a TardisPageStore :)

 -igor

 On Fri, Dec 11, 2009 at 8:56 AM, Neil Curzon neil.cur...@gmail.com wrote:
 You are right, I was not testing correctly. The pages were just cached and
 clicking on any non-bookmarkable link in them caused a page expired.

 Thanks

 On Thu, Dec 10, 2009 at 6:11 PM, Matej Knopp matej.kn...@gmail.com
 wrote:

 Are you sure you have been testing it correctly? The pagestore is
 cyclic. That means once it reaches it's limit it's the oldest pages
 get overwritten.

 -Matej

 On Thu, Dec 10, 2009 at 11:56 PM, Neil Curzon neil.cur...@gmail.com
 wrote:
  Hi all,
 
  We're in the process of going live with our wicket app, so we're trying
 to
  figure out certain details, currently PageStore size.
 
  I notice that by looking at the page store on disk, typically our pages
 add
  10-20kb each to the pagemap. The default 10mb limit would store a lot
  of
  pages, but we were thinking of using a smaller limit. I tried adjusting
 the
  limit to 100kb, and as expected, the page store size capped out at
  about
  100kb.
 
  I was expecting the consequence of this to be that the back button
  would
 not
  work all the way to the beginning. Actually, what happens is that,
  after
 my
  page map size hits the limit and stops growing, even if I continue to
 click
  around the app for a while, I can still hit the back button all the way
 back
  to the login, without hitting our page expired page. This surprised
  me.
 Is
  this expected behavior? If the back button works with a 100kb page map
 file,
  why use a 10mb one?
 
  Any help would be appreciated!
 
  Thanks,
  Neil
 

 -
 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: class cast exception when using setAutomaticMultiWindowSupport(true)

2009-12-11 Thread Matej Knopp
Why are you using trunk? Trunk is currently in highly unstable
experimental state.

-Matej

On Fri, Dec 11, 2009 at 11:02 PM, Douglas Ferguson
doug...@douglasferguson.us wrote:
 Anybody have any advice on how to do this quick start?

 Here's how I create the issue.

 1) Open a new window (so that the AutomaticMultiWindowSupport adds the params)
 2) Open a page with hidden modal
 3) Click on link to show the hidden modal
 4) Click on my ajax link in the modal == Blow UP

 I'm not sure how to recreate step 1 using wicket tester.

 D/


 On Dec 11, 2009, at 1:40 AM, Jonas wrote:

 I think there was a message on this list reporting the same
 String/String ClassCastException
 a few days ago, but I don't remember if it was related to autocomplete.

 On Fri, Dec 11, 2009 at 4:05 AM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 The problem exists on the trunk.

 Has anybody else seen this?

 If nobody has seen this I will try to make a quickstart.

 D/

 On Dec 10, 2009, at 4:11 PM, nino martinez wael wrote:

 have you tried with the latest from trunk? That way you can see quickly if
 it's fixed there...

 2009/12/10 Douglas Ferguson doug...@douglasferguson.us

 I traced through this and there appears to be 2 items in the pagemap and I
 think it is related to
 getPageSettings().setAutomaticMultiWindowSupport(true);

 wicket:pageMapName = [people, resources]
 org.apache.wicket.markup.html.WicketEventReference = wicket-event.js



 On Dec 10, 2009, at 12:36 PM, Douglas Ferguson wrote:

 I'm getting this error from autocomplete after upgrading..
 ...
 java.lang.ClassCastException:
 [Ljava.lang.String; cannot be cast to java.lang.String

 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:91)


 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:507)


 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:191)

    org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)

    org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)

    org.apache.wicket.RequestCycle.request(RequestCycle.java:545)


 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468)


 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301)


 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)


 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)


 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)


 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)


 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)


 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)


 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)


 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)

    org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)

    org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)

    org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)


 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)


 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)


 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)

    java.lang.Thread.run(Thread.java:636)


 -
 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: Limiting PageStore size

2009-12-10 Thread Matej Knopp
Are you sure you have been testing it correctly? The pagestore is
cyclic. That means once it reaches it's limit it's the oldest pages
get overwritten.

-Matej

On Thu, Dec 10, 2009 at 11:56 PM, Neil Curzon neil.cur...@gmail.com wrote:
 Hi all,

 We're in the process of going live with our wicket app, so we're trying to
 figure out certain details, currently PageStore size.

 I notice that by looking at the page store on disk, typically our pages add
 10-20kb each to the pagemap. The default 10mb limit would store a lot of
 pages, but we were thinking of using a smaller limit. I tried adjusting the
 limit to 100kb, and as expected, the page store size capped out at about
 100kb.

 I was expecting the consequence of this to be that the back button would not
 work all the way to the beginning. Actually, what happens is that, after my
 page map size hits the limit and stops growing, even if I continue to click
 around the app for a while, I can still hit the back button all the way back
 to the login, without hitting our page expired page. This surprised me. Is
 this expected behavior? If the back button works with a 100kb page map file,
 why use a 10mb one?

 Any help would be appreciated!

 Thanks,
 Neil


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



Re: inmethod grid sorting on FireFox

2009-12-07 Thread Matej Knopp
I just tried the sorting with grid examples in Firefox 3.5.5 and it
works just fine.

-Matej

On Mon, Dec 7, 2009 at 10:20 PM, Charles Deal chuckdea...@gmail.com wrote:
 I'm using Wicket 1.4.1 with inmethod grid 1.4.1.

 We have successfully used the inmethod grid in a few different scenarios but
 have focused mostly on supporting IE6.  When a grid column is sortable, you
 can click the header for the column to initiate the sort.  In IE6 this works
 as expected, however we are now testing our app in FF3.5.5 and when the
 header is clicked we receive
 Ajax POST stopped because of precondition check,
 url:../../../../?wicket:interface=:10:contentPanel:dataForm:romEvents:2:collapsibleBody:sections:1:nonemptyLanguage:subsections:slocWrapper:romSlocData:collapsibleBody:sections:1:slocData:datagrid:form:header:header:csu::IActivePageBehaviorListener:0:4wicket:ignoreIfNotActive=true
 in the Wicket Ajax Debug window.

 Upon investigation with FireBug, the Wicket.$$ is returning false.  It is at
 this point that I am at a loss.  The Wicket.$$ method is able to
 getElementById and return an instance of the object but for some reason it
 is a different instance of the same element.  In my example, the
 getElementById returns an instance that has children (correct) while the
 element that was passed to the Wicket.$$ method does not have children
 (incorrect).  How could the 'this' object (which is what is passed to the
 Wicket.$$ method as element) not match what getElementById() returns?
 *
 *
 As a sanity check has anyone else implemented a sorting column with inmethod
 DataGrid and used FireFox 3.5.5 to test it?  Can anyone shed some light on
 this problem for me?


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



Re: Wicket 1.5 experiences

2009-12-01 Thread Matej Knopp
Hi,

Wicket 1.5 is currently highly experimental. I definitely wouldn't
recommend using it for anything even half serious.

-Matej

2009/12/1 Major Péter majorpe...@sch.bme.hu:
 Hi,

 I'm trying to make my project 1.5-compatible, but I had run into two issues:
 First I was stumbled when saw IComponentBorder has been deleted, but
 after some Googling I found the corresponding ticket:
 https://issues.apache.org/jira/browse/WICKET-2280
 Okay, that's great, but I can't see this @deprecation javadoc in my
 1.4.3 source code (downloaded by maven), so could this commit just
 missed somehow in the 1.4-releasing?

 Another thing is, that I have problems with EJB injecting:
 - with Wicket 1.3 - Wicket 1.4 I saw that ComponentInjector moved into
 wicket-ioc (great, caused me some headache)
 - now Wicket 1.4 - Wicket 1.5 I'm unable again to use
 wicket-contrib-javaee like JavaEEComponentInjector, because
 ComponentInjector is deleted now. (see 830078 commit via Igor). Now my
 only question would be: how can I use @EJB annotation, now that this
 class is deleted (okay I could rewrite it, but I'd happy to hear better
 ways)? Or anyway, how can I use my EJB's the _right_ way, what would you
 recommend?
 (I can see, that you don't like @EJB annotation, I just guess, that you
 have a better approach then..)

 Any help would be really appreciated.

 Best Regards,
 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: Wicket in JBoss cluster

2009-10-22 Thread Matej Knopp
Well, if JBoss doesn't deserialize session immediately after
replication (which i have no idea if it does) the back button will not
work. However if you are using sticky sessions (which you definitely
should) then this will only be issue when user click  back button
after a node went down.

-Matej

On Thu, Oct 22, 2009 at 10:27 PM, Jan Grathwohl
jan.grathw...@googlemail.com wrote:
 Dear all,

 would you be so kind and share your experience about whether it is
 reasonable to use Wicket for app development in the following situation:

 We are planning to develop an application that will be deployed in our
 customer's portlet environment (JBoss Portal). There will be two clustered
 JBoss instances with JBoss's own session replication mechanism enabled. The
 main reason for the clustering is to have failover that should be
 transparent for logged in users, and this has to work really reliably. I
 don't know what the exact configuration of the load balancer and the JBoss
 servers will be, and how much influence we will have on it.

 Is it safe to use wicket in such a situation, or should we rather go for a
 more stateless framework?

 I did some tests to run a very simple Wicket app in two clustered JBoss
 instances, and after I shut down the instance with the active session, the
 session continues to be available on the other cluster node, and the links
 in the pages still work. So far, so good. But when I hit the browser's back
 button, I receive a Page Expired Error. This probably means that the content
 of the page store is not correctly replicated to the other cluster node?

 Is this a known limitation, or caused by some wrong configuration?

 Thanks for any feedback on these topics, please let me know what your
 experiences and opinions are.

 Kind regards,

 Jan


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



Re: Wicket in JBoss cluster

2009-10-22 Thread Matej Knopp
Yes. But wicket tries to store the page being sent across cluster
during replication when the session is deserialized on target node.

-Matej

On Thu, Oct 22, 2009 at 11:46 PM, Randy S. randypo...@gmail.com wrote:
 Isn't this caused by the storage of past pages in files on disk rather than
 in HTTP Session? This is in the default ISessionStore implementation (see
 SecondLevelCacheSessionStore, DiskPageStore).

 On Thu, Oct 22, 2009 at 3:27 PM, Jan Grathwohl jan.grathw...@googlemail.com
 wrote:

 Dear all,

 would you be so kind and share your experience about whether it is
 reasonable to use Wicket for app development in the following situation:

 We are planning to develop an application that will be deployed in our
 customer's portlet environment (JBoss Portal). There will be two clustered
 JBoss instances with JBoss's own session replication mechanism enabled. The
 main reason for the clustering is to have failover that should be
 transparent for logged in users, and this has to work really reliably. I
 don't know what the exact configuration of the load balancer and the JBoss
 servers will be, and how much influence we will have on it.

 Is it safe to use wicket in such a situation, or should we rather go for a
 more stateless framework?

 I did some tests to run a very simple Wicket app in two clustered JBoss
 instances, and after I shut down the instance with the active session, the
 session continues to be available on the other cluster node, and the links
 in the pages still work. So far, so good. But when I hit the browser's back
 button, I receive a Page Expired Error. This probably means that the
 content
 of the page store is not correctly replicated to the other cluster node?

 Is this a known limitation, or caused by some wrong configuration?

 Thanks for any feedback on these topics, please let me know what your
 experiences and opinions are.

 Kind regards,

 Jan



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



Re: Wicket in JBoss cluster

2009-10-22 Thread Matej Knopp
Not quite. On every request when page is changed and the session with
page is replicated on cluster the receiving nodes should store the
page to diskpagestore. This way every state of page should be saved.
But this will only work if the container deserializes sessions
immediately after replication.

-Matej

On Fri, Oct 23, 2009 at 12:00 AM, Randy S. randypo...@gmail.com wrote:
 Are you saying that because HTTP Session will contain the
 last-displayed-page, a single back button after failover should have worked
 because the second server would have persisted that one page to its own
 disk?

 On Thu, Oct 22, 2009 at 4:49 PM, Matej Knopp matej.kn...@gmail.com wrote:

 Yes. But wicket tries to store the page being sent across cluster
 during replication when the session is deserialized on target node.

 -Matej

 On Thu, Oct 22, 2009 at 11:46 PM, Randy S. randypo...@gmail.com wrote:
  Isn't this caused by the storage of past pages in files on disk rather
 than
  in HTTP Session? This is in the default ISessionStore implementation (see
  SecondLevelCacheSessionStore, DiskPageStore).



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



Re: inmethod IDataSource

2009-10-19 Thread Matej Knopp
Does it also happen when you call result.setTotalCount(books.size())
before calling getCount()?

From IDataSource:
/**
 * Sets the total items count. Alternatively, if the total item
count can't be determined,
 * either {...@link #MORE_ITEMS} or {...@link #NO_MORE_ITEMS} 
constant can
be used to indicate
 * whether there are more items left or not.
 *
 * If the real items count is specified, it might affect the 
result of
 * {...@link IQuery#getCount()}, so it is preferred to call 
this method
before calling
 * {...@link #setItems(Iterator)}.
 *
 * @param count
 *the total count of items
 */

public void setTotalCount(int count);

-Matej

On Mon, Oct 19, 2009 at 2:52 PM, Linda van der Pal
lvd...@heritageagenturen.nl wrote:
 Hello,

 I have a problem with the inmethod IDataSource. I've provided my own
 implementation for it, including implementing the query method. But for some
 reason, it only seems to want to return one row, while I know there should
 be two. Can anybody tell me what I might be doing wrong? It must be that
 I've made a stupid mistake somewhere, because I did get it working for two
 other kinds of data. I simply don't see what I did differently.

 Here's the query method. It's the initializing of the QueryParam variable
 that fails. When I add in the line that I've commented out just below it, I
 do get the two rows I'm expecting.

 public void query(final IQuery query, final IQueryResult result) {
       String sortProperty = null;
       boolean sortAsc = true;
             // is there any sorting
       if (query.getSortState().getColumns().size()  0) {
           // get the most relevant column
           ISortStateColumn state = query.getSortState().getColumns().get(0);
                     // get the column sort properties
           sortProperty = convertToFieldName(state.getPropertyName());
           sortAsc = state.getDirection() == IGridSortState.Direction.ASC;
       }
             ListBook resultList;
       try {
           filter.setSort(sortProperty);
           filter.setSortOrder(sortAsc);
                      // HERE'S MY PROBLEM: query.getCount() is 1 for some
 reason
           QueryParam qp = new QueryParam(query.getFrom(), query.getCount());
           //QueryParam qp = new QueryParam(0, 0);
                     ListBook books = new
 BookRetriever().getAllBooks(filter, qp);
           // determine the total count
           result.setTotalCount(books.size());
                     resultList = books;
       } catch (Exception e) {
           resultList = new ArrayListBook();
       }
             result.setItems(resultList.iterator());
   }

 Regards,
 Linda

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

2009-10-19 Thread Matej Knopp
The total count can not depend on query parameters. It is the total
count of all books that match the filter, regardless of offset and
pagesize.

-Matej

On Mon, Oct 19, 2009 at 4:16 PM, Linda van der Pal
lvd...@heritageagenturen.nl wrote:
 The trouble is that getting the books is dependent on the queryparam
 variable.

 Matej Knopp wrote:

 Does it also happen when you call result.setTotalCount(books.size())
 before calling getCount()?

 From IDataSource:
                /**
                 * Sets the total items count. Alternatively, if the total
 item
 count can't be determined,
                 * either {...@link #MORE_ITEMS} or {...@link #NO_MORE_ITEMS}
 constant can
 be used to indicate
                 * whether there are more items left or not.
                 *
                 * If the real items count is specified, it might affect
 the result of
                 * {...@link IQuery#getCount()}, so it is preferred to call
 this method
 before calling
                 * {...@link #setItems(Iterator)}.
                 *
                 * @param count
                 *            the total count of items
                 */

                public void setTotalCount(int count);

 -Matej

 On Mon, Oct 19, 2009 at 2:52 PM, Linda van der Pal
 lvd...@heritageagenturen.nl wrote:


 Hello,

 I have a problem with the inmethod IDataSource. I've provided my own
 implementation for it, including implementing the query method. But for
 some
 reason, it only seems to want to return one row, while I know there
 should
 be two. Can anybody tell me what I might be doing wrong? It must be that
 I've made a stupid mistake somewhere, because I did get it working for
 two
 other kinds of data. I simply don't see what I did differently.

 Here's the query method. It's the initializing of the QueryParam variable
 that fails. When I add in the line that I've commented out just below it,
 I
 do get the two rows I'm expecting.

 public void query(final IQuery query, final IQueryResult result) {
      String sortProperty = null;
      boolean sortAsc = true;
            // is there any sorting
      if (query.getSortState().getColumns().size()  0) {
          // get the most relevant column
          ISortStateColumn state =
 query.getSortState().getColumns().get(0);
                    // get the column sort properties
          sortProperty = convertToFieldName(state.getPropertyName());
          sortAsc = state.getDirection() == IGridSortState.Direction.ASC;
      }
            ListBook resultList;
      try {
          filter.setSort(sortProperty);
          filter.setSortOrder(sortAsc);
                     // HERE'S MY PROBLEM: query.getCount() is 1 for some
 reason
          QueryParam qp = new QueryParam(query.getFrom(),
 query.getCount());
          //QueryParam qp = new QueryParam(0, 0);
                    ListBook books = new
 BookRetriever().getAllBooks(filter, qp);
          // determine the total count
          result.setTotalCount(books.size());
                    resultList = books;
      } catch (Exception e) {
          resultList = new ArrayListBook();
      }
            result.setItems(resultList.iterator());
  }

 Regards,
 Linda

 -
 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
  


 No virus found in this incoming message.
 Checked by AVG - www.avg.com Version: 8.5.422 / Virus Database:
 270.14.21/2445 - Release Date: 10/19/09 06:40:00




 -
 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: inmethod datagrid and wicket 1.4 and generics

2009-10-13 Thread Matej Knopp
Sure. If you have commit access to wicket stuff feel free to branch the trunk.

-Matej

On Tue, Oct 13, 2009 at 10:24 AM, Stefan Lindner lind...@visionet.de wrote:
 May I create a branch like inmethod-grid-1.0b4? This would help me in 
 checking in intermediate steps and revert if I'm on the wrong way. Approx 
 half of inmehtod grid is generic now.

 Stefan

 -Ursprüngliche Nachricht-
 Von: Matej Knopp [mailto:matej.kn...@gmail.com]
 Gesendet: Montag, 12. Oktober 2009 17:26
 An: users@wicket.apache.org
 Cc: e...@shinsetsu.nl
 Betreff: Re: inmethod datagrid and wicket 1.4 and generics

 I think there is a datagrid project in wicket stuff jira. If you do
 any work (against current trunk - not 1.3) patch is always welcome.
 You can create a jira issue for it and attach it there.

 -Matej

 On Mon, Oct 12, 2009 at 5:24 PM, Stefan Lindner lind...@visionet.de wrote:
 Thenk you all for your replies!

 I found a hand full of mailing list entrys with hints for patches to
 make some classes generic. Are there any attempts to integrate them into
 the current trunk? I think a generic IGridColumn would be very handy.
 Should I start doing it?

 Stefan

 -
 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: One inmethod datagrid question

2009-10-13 Thread Matej Knopp
Why do you call getGrid().setDefaultModelObject() again? You should
keep the same data source just let it output different data.

-Matej

2009/10/13 François Jeunesse francois.jeune...@a-syst.com:
 Hi,



 First, thanks Matej for you job!

 Here is my question:

 I use the editable datagrid example, and I have added one column to permit
 deleting functionality.

 When one user click on delete a row, I modify my datasource, and call the
 ‘getGrid().setDefaultModelObject(new DataSource…)’ function.

 This work fine, if I click in the paging navigation on page 2 and next, come
 back to the 1st, my datagrid is refreshed.



 How can I force the refresh directly without click in the navigation paging?

 PS: Not working with update() function.



 Thanks for help please.







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



Re: inmethod datagrid and wicket 1.4 and generics

2009-10-12 Thread Matej Knopp
I think there is a datagrid project in wicket stuff jira. If you do
any work (against current trunk - not 1.3) patch is always welcome.
You can create a jira issue for it and attach it there.

-Matej

On Mon, Oct 12, 2009 at 5:24 PM, Stefan Lindner lind...@visionet.de wrote:
 Thenk you all for your replies!

 I found a hand full of mailing list entrys with hints for patches to
 make some classes generic. Are there any attempts to integrate them into
 the current trunk? I think a generic IGridColumn would be very handy.
 Should I start doing it?

 Stefan

 -
 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: Two inmethod datagrid questions

2009-10-12 Thread Matej Knopp
On Mon, Oct 12, 2009 at 10:24 PM, Stefan Lindner lind...@visionet.de wrote:
 I play around with the DefaultDataGrid component and I have two questions:

 1. Is it possible to register for a column resized event? This would give 
 us the ability to remember the user's favorite column widths.
Override onColumnStateChanged

 2. Is it possible to hide the navigation footer? Yes, I can do it via css but 
 if I don't need a footer why should there be an invisible one.
Don't used DefaultDataGrid. Make your own subclass and don't add PagingToolbar.

-Matej

 Very nice component!


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



Re: London Wicket Event, Saturday November 21st

2009-10-07 Thread Matej Knopp
Hey! My first london wicket event. Certainly looking forward to that.

-Matej

On Tue, Oct 6, 2009 at 3:10 PM, jWeekend jweekend_for...@cabouge.com wrote:
 Our next London Wicket Event will be held on Saturday, November 21st.
 This is going to be quite some event again, with Matej Knopp (SVK), Jeremy
 Thomerson (USA) and Alastair Maw (UK), all core developers, amongst our 5 or
 6 presenters.
 I am still working on securing a suitable location and fine tuning the
 schedule (probably at least 5 or 6 hours) and the exact format, but keep
 your diary clear if you'd like to come along and we will set up registration
 at the usual place [1] in the next few days (do not register until we've
 updated the data for the registration page) once the
 location/format/logistics are nailed down.
 Watch this space ...

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket Training and Development http://jWeekend.com

 [1] http://jweekend.com/dev/LWUGReg


 -
 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: Feedback messages, input and label

2009-10-07 Thread Matej Knopp
try putting inputPwd = Password in your property file.

-Matej

On Wed, Oct 7, 2009 at 5:33 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required! without
 modifying wicket:id attribute nor adding specific required message for the
 component.
 Is this possible?

 Kind regards,
 Tom;

 -
 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: iPhone webapp support?

2009-10-06 Thread Matej Knopp
On Tue, Oct 6, 2009 at 5:32 PM, Johan Compagner jcompag...@gmail.com wrote:
 no i did build something special in wicket so that it will never work on
 those iphones.

 Stop buying those fully controlled by apple phones.. Think for your self !
 Freedom Freedom!

Are people still making fun of your huge nokia? ;-)

-Matej

 johan
 :)

 On Tue, Oct 6, 2009 at 13:00, Edmund Urbani e...@liland.org wrote:

 Hi all,

 I was wondering whether there is some special support for iPhones available
 with
 Wicket. Something to render pages/components in native iPhone LookFeel,
 like
 eg. here:
 http://www.ibm.com/developerworks/library/os-eclipse-iphone/

 Cheers
  Edmund

 --
 Liland ...does IT better

 Liland IT GmbH
 Software Architekt
 email: edmund.urb...@liland.at

 office: +43 (0)463 220111 | fax: +43 (0)463 220111 33 | mobil: +43 (0)699
 122011 16
 http://www.Liland.at

 -
 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: vps hosting for wicket app

2009-10-06 Thread Matej Knopp
On Wed, Oct 7, 2009 at 6:13 AM, Jan Kriesten kries...@mail.footprint.de wrote:

 Hi,

 I'm always surprised, how expensive hosting is on the other side of the 
 ocean. ;-)

 Just two examples from Germany, where server performance make Slicehost look
 like a lame duck:

 http://hetzner.de/en/ (my favorite!)

I'm using slicehost but looking at this it just seems insane. Have you
actually used this hosting? Is there a catch somewhere?

-Matej

 http://webtropia.com/home/ (only in Germany, sorry)

 I agree, though, that if the data has to travel from Germany to the US the
 experience might not be the same like from here. ;-)

 Best regards, --- Jan.



 -
 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: inMethod DataGrid initial selection

2009-10-02 Thread Matej Knopp
Make sure that the equals method on your model(s) is properly
implemented. Also check equals on your entities.

-Matej

On Fri, Oct 2, 2009 at 1:37 PM, Swanthe Lindgren
swanthe.lindg...@megasol.se wrote:
 Yes, I got that part right, thank you. But somehow the item is not
 hi-lighted in my grid.
 When the grid instance is constructed and added to the page, the data to be
 shown in the grid has not yet been loaded. I know that the row i want
 selected is going to be there once the data is loaded and the grid is
 displayed, so I tried to create a Model containing the selected object and
 setting it on the grid with DataGrid.selectItem(), and obviously it
 partially works since other components that are depending on the grid for
 model data is displaying the item correct information from the preselected
 item.
 But still, the row in the displayed grid remains unselected.

 So far I have configured my grid with
 datagrid.setRowsPerPage(10);
 datagrid.setClickRowToSelect(true);
 datagrid.setClickRowToDeselect(false);
 datagrid.setAllowSelectMultiple(false);
 datagrid.selectItem(preselectedModel, true);


 Any other suggestions?

 Martin Grigorov wrote:

 grid.selectItem(rowModel);

 El vie, 02-10-2009 a las 11:25 +0200, Swanthe Lindgren escribió:


 Does anybody know how to get a row initially selected when the grid is
 first drawn?

 //Swanthe


 -
 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: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Matej Knopp
On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com wrote:
 We have this requirement in which we cannot allow the customer to copy
 paste the url that's appearing in the address bar into the same
 browser.
 Crazy thing. How about to include an request counter to your url
 encode/decode strategy?

That wouldn't work. Or it would prevent refresh as well. This is not
really doable. If you need this kind of control web applications
simply aren't what you should be doing.

-Matej



 On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:

 Hi everyone,

 We have this requirement in which we cannot allow the customer to copy
 paste the url that's appearing in the address bar into the same
 browser. For example in a different tab or in a new window. This can
 easily be done in Wicket Framework since the url has a corresponding
 page attached to it. For example if i get
 http://localhost/wicket:interface=1 appearing in the address bar, I
 can open anew tab paste the url and I could get into the same page.
 The users don't want this behavior. Could I make it work in such a way
 that I copy http://localhost/wicket:inteface=1, when i try to copy and
 paste it, it will redirect me to an error page? This happens even
 after the user has already logged in. Really need help on this
 one.

 Thanks

 Carlo

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




 --
 Pedro Henrique Oliveira dos Santos


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



Re: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Matej Knopp
Your options here are rather limited. Wicket or not, it is still a web
application. HTTP is a stateless protocol. There are ways/hacks to
detect opening page in new window/tab but they require javascript and
are not 100% bullet proof. If you need real solution for this forget
about web applications. Do it as java applet or flash or silverlight
or something similar.

-Matej

On Tue, Sep 29, 2009 at 7:55 PM, Carlo Camerino
carlo.camer...@gmail.com wrote:
 ya it's sort of our requirement i don't think i would set my pagemap to 0.

 i'm thinking of a control i could use in order to determine that this
 page is accessed. i'm thinking of the best way to do it though.
 i could maybe include a hidden field in each of my form that i have to
 check each time and check each request.
 i don't know if this is possible.

 On Wed, Sep 30, 2009 at 1:29 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 could'nt he just have a page map with a size of 0? Of course reloads
 would'nt work and probably a bunch of other stuff too.. Seems like at
 strange thing to limit on though.

 2009/9/29 Matej Knopp matej.kn...@gmail.com

 On Tue, Sep 29, 2009 at 6:48 PM, Pedro Santos pedros...@gmail.com wrote:
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser.
  Crazy thing. How about to include an request counter to your url
  encode/decode strategy?

 That wouldn't work. Or it would prevent refresh as well. This is not
 really doable. If you need this kind of control web applications
 simply aren't what you should be doing.

 -Matej

 
 
  On Tue, Sep 29, 2009 at 1:41 PM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:
 
  Hi everyone,
 
  We have this requirement in which we cannot allow the customer to copy
  paste the url that's appearing in the address bar into the same
  browser. For example in a different tab or in a new window. This can
  easily be done in Wicket Framework since the url has a corresponding
  page attached to it. For example if i get
  http://localhost/wicket:interface=1 appearing in the address bar, I
  can open anew tab paste the url and I could get into the same page.
  The users don't want this behavior. Could I make it work in such a way
  that I copy http://localhost/wicket:inteface=1, when i try to copy and
  paste it, it will redirect me to an error page? This happens even
  after the user has already logged in. Really need help on this
  one.
 
  Thanks
 
  Carlo
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 

 -
 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: Preventing Copy Pasting URL's In Same Browser Session

2009-09-29 Thread Matej Knopp
What happens if the user (perhaps accidentally) refreshes page?

-Matej

On Tue, Sep 29, 2009 at 11:43 PM, Andreas Petersson
andr...@petersson.at wrote:
 I am not aware that Wicket has direct support for this kind of
 (mis-)behavior.
 You can, however employ some kind of cheating here. if you set the http
 headers to no-cache with the help of a servlet filter, the browser will not
 allow the page to be copy-pasted from local cache, and will re-request the
 page. if you include a (crypted) counter as one of the page parameters, you
 can easily check if this page was already served (if the counter is lower or
 equal than the last served url) and redirect to an error page accordingly.

 to fully disable the browser-cache use:
 response.addHeader(“Pragma”, “no-cache”);
 response.addHeader(“Cache-Control”, “no-cache”);
 response.addHeader(“Cache-Control”, “must-revalidate”);
 response.addHeader(“Expires”, “Mon, 8 Aug 2006 10:00:00 GMT”); // some date
 in the past

 BR
 Andreas

 The users don't want this behavior. Could I make it work in such a way
 that I copy http://localhost/wicket:inteface=1, when i try to copy and
 paste it, it will redirect me to an error page? This happens even
 after the user has already logged in. Really need help on this
 one.



 -
 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: inmethod DataGrid javascript error (with fix?)

2009-09-25 Thread Matej Knopp
Thanks. Should be fixed in SVN.

-Matej

On Fri, Sep 25, 2009 at 2:05 AM, Russell Morrisey rmorri...@csc.com wrote:
 I'm getting a javascript error using the inmethod DataGrid; it looks to me
 like a bug with the DataGrid's script code. I am hoping that the DataGrid
 script can be patched =)

 When using the inmethod grid (com.inmethod.grid.datagrid.DataGrid), I get
 the error whenever I hover the mouse over a row in the grid. This seems to
 happen:
 -Only in IE6
 -Only when window.update is already defined. In my case, my page has:
 input id=update value=UPDATE type=button /. (This button is just a
 stub, not wicket-enabled yet.) Debugging in Visual Studio, I see that
 there is a reference to the button (update) already defined, which seems
 to be generated automatically by IE.

 When I mouse over the grid I get: Object does not support this property
 or method, in AbstractGrid/res/script.js, in the updatePrelight method,
 on this line:

 update = function(e) {

                                var scrollLeft;

                                if (Wicket.Browser.isOpera()) {
                                        // for some reason opera doesn't
 preserve the scroll offset when changing/removing style
                                        bodyContainer1 = this.getElement(
 div, imxt-body-container1);
                                        scrollLeft =
 bodyContainer1.scrollLeft;
                                        //e.style.visibility = hidden;
                                }

                                if (e.imxtPrelight == true) {
                                        addClass(e, imxt-prelight);
                                } else {
                                        removeClass(e, imxt-prelight);
                                }

                                if (Wicket.Browser.isOpera()) {
                                        //e.style.visibility = ;
                                        bodyContainer1 = this.getElement(
 div, imxt-body-container1);
                                        bodyContainer1.scrollLeft =
 scrollLeft;
                                }

                        }.bind(this);

 We use the DataGrid on another page in our production app and it doesn't
 experience this problem. The other page does not have a DOM element with
 id=update, or a window.update property. I think the script needs to be
 changed to:

 var update = function...

 So that the locally defined function isn't trying to overwrite the
 window.update property.

 I'm using datagrid version: 1.0.0-SNAPSHOT according to our project's POM.

 Thanks!

 Russell E. Morrisey
 Application Designer Associate Professional
 CSC

 NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
 any order or other contract unless pursuant to explicit written agreement
 or government initiative expressly permitting the use of e-mail for such
 purpose.

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



Re: InMethod data grid data source query question

2009-09-17 Thread Matej Knopp
I'm afraid that is not possible. The grid gives you notification
immediately when selection status changes and for that it needs to
load the items.

-Matej

On Thu, Sep 17, 2009 at 1:24 AM, Bryce Bell bryce.z.b...@gmail.com wrote:
 How do you keep a data grid from querying it's data source when you check
 the check box in the header that auto checks all the rows on the page? I
 just need all the check boxes on the page checked, I do not need the data
 source queried again.

 Bryce

 -
 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: InMethod data grid data source query question

2009-09-17 Thread Matej Knopp
Isn't caching the data an option?

-Matej

On Thu, Sep 17, 2009 at 5:16 PM, Bryce Bell bryce.z.b...@gmail.com wrote:
 Is it possible to just remove the checkbox from the header? If so, can you
 give me an idea where in the source code that is? I was thinking that the
 user would not be tempted to click the header if the checkbox was not there.
 The problem is that the data source takes a long time to be queried, so the
 user continues to click on the check box with no indication as to what is
 happening.

 Matej Knopp wrote:

 I'm afraid that is not possible. The grid gives you notification
 immediately when selection status changes and for that it needs to
 load the items.

 -Matej

 On Thu, Sep 17, 2009 at 1:24 AM, Bryce Bell bryce.z.b...@gmail.com
 wrote:


 How do you keep a data grid from querying it's data source when you check
 the check box in the header that auto checks all the rows on the page? I
 just need all the check boxes on the page checked, I do not need the data
 source queried again.

 Bryce

 -
 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: HttpSessionStore instead of the default SecondLevelCacheSessionStore

2009-09-15 Thread Matej Knopp
There really is no good reason to use http session store instead of
secondlevelcachesessionstore unless you are experiencing performance
problems. HttpSessionStore uses more memory and keeps much shorter
history so your users will be experiencing page expiration much more
often.

-Matej

On Tue, Sep 15, 2009 at 10:54 AM, Eyal Golan egola...@gmail.com wrote:
 Hi,
 I read this post
 http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5-and-grails/
 and he suggested to use HttpSessionStore instead of the second cache...

 I looked into the javadoc and the code itself and understood the
 differences.

 However, can anyone explain in a bit more detail the implications /
 differences of using the Http instead of the SecondLayer?
 The reason I'm asking this, is because, if it's better use, then I want to
 convince my team that we change the implementation of our application to use
 Http store.


 Thanks very much.

 Eyal Golan
 egola...@gmail.com

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really necessary


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



Re: HttpSessionStore instead of the default SecondLevelCacheSessionStore

2009-09-15 Thread Matej Knopp
Well,

there are two kinds of overhead with SecondLevelCacheSessionStore.
Object serialization and writing to disk. I can imagine antivirus
interfering with the writing.

-Matej

On Tue, Sep 15, 2009 at 11:25 AM, Johan Compagner jcompag...@gmail.com wrote:
 And that back and forward buttons in the browser dont really work well in
 the HttpSessionStore

 But i cant believe that the overhead he is reporting is really the
 overhead..

 It could be an Antivirus checker or other stuff like that.
 Besides that if that would be a problem just get an SSD and place that into
 your server where you point the DiskStore to
 Then you will really not see any difference

 johan


 On Tue, Sep 15, 2009 at 11:07, Matej Knopp matej.kn...@gmail.com wrote:

 There really is no good reason to use http session store instead of
 secondlevelcachesessionstore unless you are experiencing performance
 problems. HttpSessionStore uses more memory and keeps much shorter
 history so your users will be experiencing page expiration much more
 often.

 -Matej

 On Tue, Sep 15, 2009 at 10:54 AM, Eyal Golan egola...@gmail.com wrote:
  Hi,
  I read this post
 
 http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5-and-grails/
  and he suggested to use HttpSessionStore instead of the second cache...
 
  I looked into the javadoc and the code itself and understood the
  differences.
 
  However, can anyone explain in a bit more detail the implications /
  differences of using the Http instead of the SecondLayer?
  The reason I'm asking this, is because, if it's better use, then I want
 to
  convince my team that we change the implementation of our application to
 use
  Http store.
 
 
  Thanks very much.
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 

 -
 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: inMethod DataGrid row values

2009-09-11 Thread Matej Knopp
onCellClicked gets the row model object as argument. Call
model.getObject() to get the actual object.

-Matej

On Fri, Sep 11, 2009 at 9:32 AM, Oliver-Sven Fritscho...@3blogos.com wrote:
 Hi group!

 I want to open a ModalPanel with detailed information when the user clicks
 on a row in my DataGrid. To do so I override the onCellClicked method. My
 problem is that I don't know how to get the rowdata. No matter which
 approach I try all I see is that I can get the information for the column
 which wont help in my use case. I think this is a very common task (getting
 rowdata i.e. primary key or so).

 Any ideas would be really appreciated!

 Oliver

 -
 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: Flash/ExternalInterface does not work in IE if movie is fetched via Wicket/Ajax

2009-09-08 Thread Matej Knopp
Well, it's not exactly wrong. Looks like an IE quirk to me. But I
suppose we can just move the element anyway.

-Matej

On Tue, Sep 8, 2009 at 11:10 PM, Matej Knoppmatej.kn...@gmail.com wrote:
 Hi,

 can you create jira issue with problem description? The code indeed
 looks wrong I can fix it once the issue is created.

 -Matej

 On Tue, Sep 8, 2009 at 9:59 PM, Heikki
 Uotinenheikki.uoti...@syncrontech.com wrote:
 There is a bug in wicket-ajax.js:268 (1.4.1) that breaks 
 IE+Flash/ExternalInterface:

        // place all newly created elements before the old element
        while(tempParent.childNodes.length  0) {
                var tempElement = tempParent.childNodes[0];
           tempParent.removeChild(tempElement); 
                parent.insertBefore(tempElement, element);
                tempElement = null;
        }

 Calling removeChild is not needed because insertBefore moves element from 
 its original place.
 If you remove removeChild line and check tempParent.childNodes.length 
 you can see that it is
 decreased by one after insertBefore.

 This removeChild breaks Flash/ExternalInterface in IE. If removeChild is 
 removed then everything
 works fine. IE is more strict here than other browsers.

 Demonstration is still at (there is no need for Flash CS4 to test this)

 http://download.syncrontech.com/public/quickstart_noname.zip


 Could someone confirm this and suggest how to proceed ?


 -Heikki


 -Original Message-
 From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com]
 Sent: 7. syyskuuta 2009 9:21
 To: users@wicket.apache.org
 Subject: RE: Flash/ExternalInterface does not work in IE if movie is fetched 
 via Wicket/Ajax

 There is a problem with IE/ExternalInterface if movie is added to DOM f.ex 
 appendChild
 JavaScript functions are called but they do not return any value.

 This is clearly MS problem but could IE specific function in wicket-ajax.js 
 be adjusted somehow ?

 Simple test case has

        var flashMovie = 'OBJECT id=testId codeBase=http://fpdownload..

        // Works in IE and FF
                document.getElementById(testdiv).innerHTML = flashMovie;

        // ExternalInterface.call calls JS but does not return value in IE. 
 Works in FF
        var tempDiv = document.createElement(div);
        tempDiv.innerHTML = flashMovie;
        document.body.appendChild(tempDiv);

 Here is complete code (ajax.swf can be found in zip files)

 http://pastebin.com/fbc0aa9a

 Here is AS3 code in ajax.fla

 http://pastebin.com/d4efd47b


 -Heikki

 -Original Message-
 From: Mikko Pukki [mailto:mikko.pu...@syncrontech.com]
 Sent: 4. syyskuuta 2009 15:33
 To: users@wicket.apache.org
 Subject: Flash/ExternalInterface does not work in IE if movie is fetched via 
 Wicket/Ajax

 Hi,

 This example demonstrates that ExternalInterface fails with IE only if movie 
 is fetched via Wicket/Ajax.

 ajaxtest.zip:
 (http://download.syncrontech.com/public/ajaxtest.zip)

 Page first.html fetches second.html page via Ajax. Second.html has Flash 
 movie
 that calls JavaScript methods with ExternalInterface and produces output
 Start...
 ExternalInterface.available:true
 ExternalInterface.objectID:testId
 fromJs:text from js (first.html)

 This works both FF 3.5 and IE 7/IE8


 quickstart_noname.zip:
 (http://download.syncrontech.com/public/quickstart_noname.zip)

 Same demonstration with wicket. This fails with IE

 Start...
 ExternalInterface.available:true
 ExternalInterface.objectID:null
 fromJs:null

 ObjectId is null and JavaScript call does not return any value.

 We are aware about EI/IE problems in past, but any of those does not seem to 
 fit here.

 Wicket 1.4.1, Flash Player 10, IE 7/8, FF 3.5

 Has anyone encountered any similar behavior and/or has found any workaround?
 Should I create a Jira issue?


 --
 Mikko Pukki
 Syncron Tech Oy
 Laserkatu 6
 53850 Lappeenranta
 +358 400 757 178


 -
 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: Flash/ExternalInterface does not work in IE if movie is fetched via Wicket/Ajax

2009-09-08 Thread Matej Knopp
Hi,

can you create jira issue with problem description? The code indeed
looks wrong I can fix it once the issue is created.

-Matej

On Tue, Sep 8, 2009 at 9:59 PM, Heikki
Uotinenheikki.uoti...@syncrontech.com wrote:
 There is a bug in wicket-ajax.js:268 (1.4.1) that breaks 
 IE+Flash/ExternalInterface:

        // place all newly created elements before the old element
        while(tempParent.childNodes.length  0) {
                var tempElement = tempParent.childNodes[0];
           tempParent.removeChild(tempElement); 
                parent.insertBefore(tempElement, element);
                tempElement = null;
        }

 Calling removeChild is not needed because insertBefore moves element from its 
 original place.
 If you remove removeChild line and check tempParent.childNodes.length you 
 can see that it is
 decreased by one after insertBefore.

 This removeChild breaks Flash/ExternalInterface in IE. If removeChild is 
 removed then everything
 works fine. IE is more strict here than other browsers.

 Demonstration is still at (there is no need for Flash CS4 to test this)

 http://download.syncrontech.com/public/quickstart_noname.zip


 Could someone confirm this and suggest how to proceed ?


 -Heikki


 -Original Message-
 From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com]
 Sent: 7. syyskuuta 2009 9:21
 To: users@wicket.apache.org
 Subject: RE: Flash/ExternalInterface does not work in IE if movie is fetched 
 via Wicket/Ajax

 There is a problem with IE/ExternalInterface if movie is added to DOM f.ex 
 appendChild
 JavaScript functions are called but they do not return any value.

 This is clearly MS problem but could IE specific function in wicket-ajax.js 
 be adjusted somehow ?

 Simple test case has

        var flashMovie = 'OBJECT id=testId codeBase=http://fpdownload..

        // Works in IE and FF
                document.getElementById(testdiv).innerHTML = flashMovie;

        // ExternalInterface.call calls JS but does not return value in IE. 
 Works in FF
        var tempDiv = document.createElement(div);
        tempDiv.innerHTML = flashMovie;
        document.body.appendChild(tempDiv);

 Here is complete code (ajax.swf can be found in zip files)

 http://pastebin.com/fbc0aa9a

 Here is AS3 code in ajax.fla

 http://pastebin.com/d4efd47b


 -Heikki

 -Original Message-
 From: Mikko Pukki [mailto:mikko.pu...@syncrontech.com]
 Sent: 4. syyskuuta 2009 15:33
 To: users@wicket.apache.org
 Subject: Flash/ExternalInterface does not work in IE if movie is fetched via 
 Wicket/Ajax

 Hi,

 This example demonstrates that ExternalInterface fails with IE only if movie 
 is fetched via Wicket/Ajax.

 ajaxtest.zip:
 (http://download.syncrontech.com/public/ajaxtest.zip)

 Page first.html fetches second.html page via Ajax. Second.html has Flash 
 movie
 that calls JavaScript methods with ExternalInterface and produces output
 Start...
 ExternalInterface.available:true
 ExternalInterface.objectID:testId
 fromJs:text from js (first.html)

 This works both FF 3.5 and IE 7/IE8


 quickstart_noname.zip:
 (http://download.syncrontech.com/public/quickstart_noname.zip)

 Same demonstration with wicket. This fails with IE

 Start...
 ExternalInterface.available:true
 ExternalInterface.objectID:null
 fromJs:null

 ObjectId is null and JavaScript call does not return any value.

 We are aware about EI/IE problems in past, but any of those does not seem to 
 fit here.

 Wicket 1.4.1, Flash Player 10, IE 7/8, FF 3.5

 Has anyone encountered any similar behavior and/or has found any workaround?
 Should I create a Jira issue?


 --
 Mikko Pukki
 Syncron Tech Oy
 Laserkatu 6
 53850 Lappeenranta
 +358 400 757 178


 -
 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: Passing parameters from markup to panels

2009-09-07 Thread Matej Knopp
Slight problem here is that onComponentTag is called during render.
You can't modify component hierarchy at that point.

Only way around this is to find component's markup index in
onBeforeRender and then get the tag from markup stream. But this will
fail in many cases (borders, transparent resolvers). So it's not a
very good way.

-Matej

On Tue, Sep 8, 2009 at 1:38 AM, Jeremy
Thomersonjer...@wickettraining.com wrote:
 It could be done.  I'm pretty sure that if you used onComponentTag (can't
 remember exact name this second - and just walking out the door) - you could
 read any attribute from the tag.  Then hold that number in your component
 and let your model that reads the songs read that number to determine how
 many.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Mon, Sep 7, 2009 at 6:10 PM, Chris Colman
 chr...@stepaheadsoftware.comwrote:

 When my web designer guy wants control over whether he wants to place
 either 10 songs or 50 songs into the 'top of the charts' panel I
 consider that to be something that should definitely not be something we
 have to make separate .java panel classes and markup to achieve.

 To have to get a programmer to adjust code to change the number of items
 displayed in a list would be the subject of thunderous laughter in any
 desktop app development environment - but yet I see that web app
 development changes all the rules about what's funny and what's not =)

 In every other aspect of OO coding since 1990 a scenario like this would
 cause a big light bulb in my head to go off and the word
 'parameterization' would start blinking at me incessantly.

 We programmer propeller heads can do all the smarts on the Java side to
 use a single 'SongChartPanel' to display any number of songs from a list
 based on a single parameter - so long as we can get that parameter
 somehow. It's still MVC because NO code exists in the presentation layer
 - only a parameter is now able to be passed in.

 The value of that parameter is not considered code. Setting up a
 parameter  is something a web design guy can 'understand' (they set
 parameter/attribute values on HTML tags all day long) and it's something
 that directly affects the presentation side that he would want control
 over. That gives him power.

 Without this power I have to get the programmers to create a different
 panel and markup for each different song chart panel even though the
 code will be exactly the same except for the terminating condition of a
 for loop. That's not OO and it's not reusability. It would be funny if
 it wasn't true!

 Let's say we make

 SongChartTop10Panel and SongChartTop50Panel

 (with .java and .html markup for each)

 Now he says he wants to make a top 20 list for one page and a top 40
 list for another page... the inefficiency and non OO nature of this
 approach becomes apparent.

 If a simple parameter were able to be passed to the panel we could reuse
 that panel code to show anywhere from 1 to n songs.

 Please don't confuse a parameter (numbers, identifiers etc.,) with logic
 (algorithms, conditional statements etc.,). No one is suggesting we put
 logic into the presentation layer - the pain of JSP is much too firmly
 burnt into my brain to ever step away from MVC again ;)


  -Original Message-
  From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
  Sent: Tuesday, 8 September 2009 8:19 AM
  To: users@wicket.apache.org
  Subject: Re: Passing parameters from markup to panels
 
  Put simply, no.  In Wicket, this is considered code.  And code goes in
  Java
  files.  Configure it in the YourPage.java file - where you have access
 to
  data sources, session attributes, the user, etc
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
  chr...@stepaheadsoftware.comwrote:
 
   I apologize in advance if there is a completely obvious solution to
 this
   that I have missed...
  
   Is it possible to pass in parameters to a panel via the markup?
  
   Eg., Let's say that there are number of different ways that a
 particular
   panel could be rendered and that these ways are largely determined
 by
   the choice of data source or perhaps even the amount of data to
 display
   (from a collection for example).
  
   Now let's say that I wanted to provide some level of control over
 which
   data source is chosen by allowing the user to pass in an extra
   'parameter' in the markup when declaring the panel in the source
 markup
   like:
  
   span wicket:id=myPanel wicket:attribute=value /span
  
   So for example we might have a panel that displays the 'top 10
 songs' or
   the 'top 50 songs' on a music site. The panel is exactly the same in
   each instance but the markup container that uses that panel can
 control
   how many songs are displayed via specification of an extra parameter
   ('count' in the following example).
  
   Eg.,
  
   One page could have a lot of space and so decide to show the top 50:
  

Re: how to debug Wicket Application

2009-08-19 Thread Matej Knopp
You can start by setting a breakpoint and running the application in debug mode.

-Matej

On Wed, Aug 19, 2009 at 7:39 PM, Oleg Ruchovetsoruchov...@gmail.com wrote:
 Hi , I am new in wicket. I try to modify wicket in action examples and got
 such exception:

       WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = content, page =
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
 1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]

 Root cause:

 java.lang.NullPointerException
 at
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.DiscountsList$1.getItemModels(DiscountsList.java:32)
 at
 org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:104)
 at
 org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at org.apache.wicket.Component.prepareForRender(Component.java:2139)
 at org.apache.wicket.Page.renderPage(Page.java:870)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
 at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
 at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
 at
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:324)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
 at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
 at
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

 Complete stack:

 org.apache.wicket.WicketRuntimeException: Error attaching this container for
 rendering: [MarkupContainer [Component id = content, page =
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
 1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1525)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 

Re: Wicket filestore exploded?

2009-08-14 Thread Matej Knopp
Maybe you had 38000 sessions created and didn't clean them up
properly? (killed server, etc).

-Matej

On Fri, Aug 14, 2009 at 11:09 PM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:
 Hi!

 Recently the filestore has become huge (I deleted it only two days
 ago), is this normal?

 8-8-8-8-
 12.08.2009  12:53    DIR          _febef03_11f4c784efe__7ffb
 12.08.2009  12:53    DIR          _febef03_11f4c784efe__7ffc
 12.08.2009  12:53    DIR          _febef03_11f4c784efe__7ffd
 12.08.2009  12:53    DIR          _febef03_11f4c784efe__7ffe
 12.08.2009  12:53    DIR          _febef03_11f4c784efe__7fff
 12.08.2009  12:53    DIR          _febef03_11f4c784efe__8000
               0 File(s)              0 bytes
           38015 Dir(s)  25 452 068 864 bytes free

 C:\workspaces\project\target\work\WicketMockServlet-filestore

 38015 directories in just few days... slows down the machine quite damn bit.

 I'm runnig 1.4-rc7.

 **
 Martin

 -
 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: Prevent Wicket from creating a new user session while user clicks back button

2009-08-12 Thread Matej Knopp
New session will only be created if the page user lands after clicking
back button is bookmarkable. It is not possible to change this
behavior. If the page is not bookmarkable user will be redirected to
expired page.

-Matej

On Wed, Aug 12, 2009 at 7:17 PM, Andre Bonallibona...@hispeed.ch wrote:
 Hi all
 How can i prevent Wicket from creating a new user session while user has
 been logged out and clicks back button on browser

 Thx for any help
 Andre


 -
 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: Firefox, be afraid be very afraid!!!

2009-08-05 Thread Matej Knopp
Application.getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl(true);

-Matej

On Wed, Aug 5, 2009 at 9:35 AM, Anton
Veretennikovanton.veretenni...@gmail.com wrote:
 how, how?

 On Wed, Aug 5, 2009 at 3:24 PM, Johan Compagnerjcompag...@gmail.com wrote:
 wicket can also do that for you

 On Wed, Aug 5, 2009 at 06:45, Anton Veretennikov 
 anton.veretenni...@gmail.com wrote:

 As I remember, GWT appends some garbage to JS filenames as they change
 to prevent this.

 -- Tony

 On 8/5/09, John Armstrong siber...@siberian.org wrote:
  Install the web developers toolkit plugin for firefox. Its a must if your
  doing front-end web development. Among many many many other features it
 lets
  you do things like easily disable the cache, javascript etc.
  Its a must have IMHO.
 
  J
 
  On Tue, Aug 4, 2009 at 7:41 PM, Igor Vaynberg
  igor.vaynb...@gmail.comwrote:
 
  SHIFT-F5 or SHIFT+clicking the refresh button will bypass the cache
  when reloading the page. i use firefox almost exlucisvely as well and
  had this problem happen sometimes to javascript files.
 
  -igor
 
  On Tue, Aug 4, 2009 at 7:31 PM, Ben Tilfordbentilf...@gmail.com
 wrote:
   It's not Wicket or Firefox its the caching settings (probably on the
   server). If the cached resources aren't expired the browser is
 supposed
  to
   use what it has cached.
  
   Best to set the far future expires to something really short or 0 in
   development.
  
   On Tue, Aug 4, 2009 at 10:17 PM, Jeremy Thomerson 
  jer...@wickettraining.com
   wrote:
  
   Strange - I use FF almost exclusively and have never had this
 problem.
    Did you use something like HttpFox or TamperData to look at the
   headers and see if the expiry headers were coming back correctly?
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
  
  
   On Tue, Aug 4, 2009 at 9:12 PM, Steve Tarltonstarl...@gmail.com
  wrote:
I just spent the better half of a day WASTED because I use Firefox
for
testing my Wicket development. For the life of me, I couldn't
 figure
  out
   why
I couldn't get a simple data picker to center. I wouldn't call
 myself
  an
expert at html so I doubted myself. Turns out that Firefox decided
  that
there is no need to update changes if there is something in cache
 --
   WTF!!!
It wasn't until I got so fed up I tried Internet Explorer and saw
that
   what
I was doing was working all along. I exited Firefox and restarted
it
   and
still not working. It wasn't until I went in and cleared my
 private
   cache
and then visited my app again that it did what it was suppose to
 do.
I
  of
course poked around in Firefox to turn that !...@#$%! cache off but
 the
  only
thing I found was a setting that would automatically flush it when
 I
exited (not closed) Firefox. I will probably still use it for
normal
surfing but unless there is a way to stop it from not updating my
html
changes, I will NOT be useing it for Wicket development!
   
  
   -
   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: Modal window and background color

2009-08-05 Thread Matej Knopp
You can use !important in your override css.

-Matej

On Wed, Aug 5, 2009 at 9:06 PM, Johannes
Schneidermaili...@cedarsoft.com wrote:
 Hi,

 I use the modal window (with a component). But unfortunately white is
 used as background color. This is definied in model.css:164

 div.wicket-modal div.w_content {
        width: 100%;
        background-color: white;
 }


 I tried to override that, but since the modal.css is added after my own
 css files, still white is used.


 Has anyone an idea how I could solve that?


 Thanks,

 Johannes

 -
 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: Modal window and background color

2009-08-05 Thread Matej Knopp
What is there to improve? You can set modal window custom CSS class
and style it from scratch. Or you can override properties of the
standard stylesheet.

-Matej

On Wed, Aug 5, 2009 at 11:12 PM, Johannes
Schneidermaili...@cedarsoft.com wrote:
 Thanks! Worked...

 But if anyone reads this - I think that could/should be improved in the
 ModalWindow...


 Regards,

 Johannes

 Matej Knopp wrote:
 You can use !important in your override css.

 -Matej

 On Wed, Aug 5, 2009 at 9:06 PM, Johannes
 Schneidermaili...@cedarsoft.com wrote:
 Hi,

 I use the modal window (with a component). But unfortunately white is
 used as background color. This is definied in model.css:164

 div.wicket-modal div.w_content {
        width: 100%;
        background-color: white;
 }


 I tried to override that, but since the modal.css is added after my own
 css files, still white is used.


 Has anyone an idea how I could solve that?


 Thanks,

 Johannes

 -
 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: Feedback messages and ajax request

2009-08-03 Thread Matej Knopp
Feedbacks should be processed in prepareRender method which should be
called on Ajax requests as well. If it isn't it would be a bug.

-Matej

On Mon, Aug 3, 2009 at 11:59 AM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:
 Hi!

 In normal requests feedbackmessages are processed like follows:
        public final void beforeRender()
        {
                if (!(this instanceof IFeedback))
                {
                        internalBeforeRender();
                }
                else
                {
                        // this component is a feedback. Feedback must be 
 initialized last, so that
                        // they can collect messages from other components
                        ListComponent feedbacks = 
 getRequestCycle().getMetaData(FEEDBACK_LIST);
                        if (feedbacks == null)
                        {
                                feedbacks = new ArrayListComponent();
                                getRequestCycle().setMetaData(FEEDBACK_LIST, 
 feedbacks);
                        }
                        feedbacks.add(this);
                }
        }


 However, in AJAX requests I cannot find any such logic and feedback is
 often left out. Is this a bug?

 **
 Martin

 -
 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: Form tag does not get rendered on a Panel placed in a TabbedPanel within a ModalWindow

2009-08-03 Thread Matej Knopp
From modal window javadoc:

 * If you want to use form in modal window component make sure that
you put the modal window itself
 * in another form (nesting forms is legal in Wicket).

-Matej

On Mon, Aug 3, 2009 at 8:15 PM, Marcin Palkamarcin.pa...@gmail.com wrote:
 Hi,

 I am experiencing a strange issue with a Form, a TabbedPanel and a
 ModalWindow. It seems that for some reason the form tag is not being
 rendered on my forms. Contents of the form render just fine. The form
 is placed on a Panel that is then placed on a tab of a
 AjaxTabbedPanel. All that stuff is on a ModalWindow. So it looks like
 that when the modal window gets opened and first tab of the AjaxTabbed
 panel is rendered everything looks fine. The form tag is ther and the
 form works properly. But if I navigate to another tab (which by the
 way contains another instance of the same panel) the form tag is
 missing. Then if I navigate back to the first tab the form tag is
 missing there as well.

 Pressing a button (AjaxButton) on any of those broken forms leads to
 the ChannelBusy message on any subsequent Ajax request.

 What I noticed from a Wicket Ajax Debug output is that the HTML on the
 server side of things the HTML is generated properly. I can see the
 form tag and the other stuff being sent from the server just fine.
 Except for that it's not being rendered.

 Anyone knows any workaround?

 I filled a JIRA for this issue:
 https://issues.apache.org/jira/browse/WICKET-2414

 cheers,
 Marcin


 -
 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: Issue with AjaxLinks in ListView

2009-08-02 Thread Matej Knopp
It's hard to say what's going wrong without seeing code for entire page.

-Matej

On Sun, Aug 2, 2009 at 8:29 AM, Kugakvisagam...@infoblox.com wrote:

 Anyone???
 Thanks
 Kuga
 --
 View this message in context: 
 http://www.nabble.com/Issue-with-AjaxLinks-in-ListView-tp24765587p24775312.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: Twenty Six Wicket Tricks

2009-07-28 Thread Matej Knopp
On Tue, Jul 28, 2009 at 8:31 PM, Vladimir Kkoval...@gmail.com wrote:

 Jeremy,

 from my perspective ModalWindow is a mix of javascript widget that works in
 non-wicket mode and an wicket wrapper that bridges js widget with wicket. It
 is always created at the body level. That's why I said it's a cheat. Thus
 are problems with form submitting when nested forms are used.
There is a good reason why the modal window has to be created on body
level. That's the only reliable way to have element
with absolute position. If you create the DOM structure deeper you are
risking that a container has position:relative somewhere which will
essentially break it. Welcome to the wonderful world of CSS.

 Community
 introduced a solution (a wrapping form that is threated as the root) to work
 around the mismatch of ModalWindow structure. There is an issue registered
 about that. But Matej keeps stating that we should put MW into a form. What
 says that he is not aware what the problem is. And there are more problems
 caused by the fact that the form element is created by javascript.
Is it, really?

I've already explained why the DOM structure is created on root level.
If you have form component inside modal window, chances are that
wicket will (to support nested forms) render it as div. If this
happens it is no longer possible to serialize the form when doing an
ajax submit. That's why the actual modal window markup contains a real
form.

And this is why it is necessary to put a modal window inside a form if
you want to have form in modal window. What we should have done is to
put a wicket form inside the modal window panel itself (just to force
all forms in modal window content) to be rendered as nested. But for
some reason i thought that a simple mention in javadoc about putting
modal window to form would be sufficient. My bad.


 From the other hand I believe it is possible to write pure Wicket component
 that would be as trice as simpler and won't suffer with problems with
 request lifecycle. Probably I'm wrong and it is not worth turning the old
 ModalWindow into pure Wicket component due to expensiveness of the effort
 that would be spent to remain it compatible.
Would you mind specifying the actual problems with request
lifecycle? And how exactly would a pure wicket modal window look
like? No javascript?

 The same about tree components. The API is very difficult to comprehend.
 Component does not work as I expect in dynamic context. But thankfully Sven
 implemented different implementation that does what is expect and usable as
 well as DataTable component. I believe forking and fixing the original
 component would be much more expensive. After that so many people should
 start complaining about that to convince core team that there is not just
 one person who is experiencing problems. It is always difficult to
 accomplish.
I would like to have some clarification on this. What is so difficult
about the Wicket Tree API? (apart from the fact that it uses swing
TreeModel which seem to be too confusing for some people). What does
dynamic context mean? Assuming you have properly implemented
TreeModel that fires the proper notifications, wicket tree is capable
for updating itself on ajax request by only transmitting the changed
part to the clients. How much more dynamic can you get?

For next version we will probably ditch swing TreeModel for something
simpler but we will still need some kind of modal change notification.
Wicket tree has many objectives, simplicity is only one of them.
Having simple tree is nice as long as you don't have to refresh the
entire thing every time you expand a node or add a node child.

-Matej


 jthomerson wrote:

 Why create your own?  Submit a patch to fix what you see is wrong with
 the current one.  Everyone wins.

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Tue, Jul 28, 2009 at 12:20 PM, Vladimir Kkoval...@gmail.com wrote:

 ModalWindow (being a wicket cheat :) ) deserves a sole book of tricks.
 I'll
 definitely author my own modal window unless someone fixes the original
 one.
 -1 on including ModalWindow to the book.


 egolan74 wrote:

 I can't wait for yet another great Wicket book.
 I will surly buy it.

 regarding tricks,
 using Modal window can be nice.
 Integrating Wicket with JS libs (If it's not a topic for a small book by
 itself).
 Cool stuff with Ajax.


 Eyal Golan
 egola...@gmail.com

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really
 necessary


 On Tue, Dec 30, 2008 at 10:32 AM, Jonathan Locke
 jonathan.lo...@gmail.comwrote:


 Well, over the break here I've started something I swore I would never
 do
 again (well, two things, if you include the JavaOne talk I'm working
 on).
 I'm writing a (hopefully relatively short) book. It's called
 Twenty-Six
 Wicket Tricks. Each trick in the book (lettered from A-Z) demonstrates
 something that people 

Re: Twenty Six Wicket Tricks

2009-07-28 Thread Matej Knopp
On Tue, Jul 28, 2009 at 9:58 PM, Vladimir Kkoval...@gmail.com wrote:

 Matej,

 one of the problems is that when ajax submit happens (by pressing ajax
 submit button that resides in a form that resides in a ModalWindow that is
 put into another form) it contains no data for the components of enclosing
 form but the process of handling the submit handles the eclosing form and
 the validation fails or the values become empty. (If I remember all the
 details correctly - it was 3 months ago)
How can this happen? The submit should only process nested form and
leave the outer forms alone. When nested form is submitted there is no
reason for validating any component in the outer form.

 Another problem happens when you don't use ajax submit but regular one
 instead. If I'm not wrong Wicket can't find components of inner form.
Modal Window is an ajax component. Submitting it with regular submit
is not supported and it never was.

 In case if some pieces are missed in sandwitch FormModalWinwodForm the
 mismatch occurs immediately.

 Having no acces to hardcoded form element makes impossible to enhance
 ModalWindow as well as to implement just regular upload submit from within
 ModalWindow without patching .js file. If you could fix that (preventing
 wicket from making it a div) and make the form configurable it would be
 great!
Again, modal window doesn't support regular submits (by design) so if
you want to do file upload you'll have to use a hidden iframe or some
other approach like that.

 Concerning Tree. It is my subjective opinion. It is the API that was
 difficult to figure out how to employ to solve my tasks. I find the
 difference betwen DataTable and TreeTable APIs to be unnecessary difficulty
 to users. At least they are two different things that requires more time to
 learn and work with. And if you have a panel where you switch between table
 and tree you have to write an abstraction layer. Sven's TableTree just fits
 where it should be. I completely added it within 2 hours. TreeTable took 2
 days to learn and employ. Once again, I'm subjective here. It was just my
 experience. My idea is that diversity is a good thing when the original
 component dont meet our needs makes the development more complicated.
TreeTable is slightly problematic because it doesn't use regular table
but it builds the layout by css. There was a good reason back then for
building it like this but it's not relevant anymore. Apart from that -
tree table gets list of IColumns and a TreeModel. How is this
complicated?

 I'm aware of CSS positioning model and I have ideas to investigate. Besides
 there are a jQuery popup window which example is embedded into enclosing div
 and can be freely relocated inside the body.
I just looked at jquery dialog example. The dialog is declared in
markup but it is then reparented as top level DOM element. Same thing
wicket modalwindow does.

 Anyway it is possible to do what the modal.js is doing by Wicket means and
 don't have a component tree mismatch with DOM.
Is it really? Mind sharing with me how?

-Matej


 Matej Knopp-2 wrote:

 On Tue, Jul 28, 2009 at 8:31 PM, Vladimir Kkoval...@gmail.com wrote:

 Jeremy,

 from my perspective ModalWindow is a mix of javascript widget that works
 in
 non-wicket mode and an wicket wrapper that bridges js widget with wicket.
 It
 is always created at the body level. That's why I said it's a cheat. Thus
 are problems with form submitting when nested forms are used.
 There is a good reason why the modal window has to be created on body
 level. That's the only reliable way to have element
 with absolute position. If you create the DOM structure deeper you are
 risking that a container has position:relative somewhere which will
 essentially break it. Welcome to the wonderful world of CSS.

 Community
 introduced a solution (a wrapping form that is threated as the root) to
 work
 around the mismatch of ModalWindow structure. There is an issue
 registered
 about that. But Matej keeps stating that we should put MW into a form.
 What
 says that he is not aware what the problem is. And there are more
 problems
 caused by the fact that the form element is created by javascript.
 Is it, really?

 I've already explained why the DOM structure is created on root level.
 If you have form component inside modal window, chances are that
 wicket will (to support nested forms) render it as div. If this
 happens it is no longer possible to serialize the form when doing an
 ajax submit. That's why the actual modal window markup contains a real
 form.

 And this is why it is necessary to put a modal window inside a form if
 you want to have form in modal window. What we should have done is to
 put a wicket form inside the modal window panel itself (just to force
 all forms in modal window content) to be rendered as nested. But for
 some reason i thought that a simple mention in javadoc about putting
 modal window to form would be sufficient. My bad.


 From the other hand I

Re: Disable LinkTree iconLink

2009-07-28 Thread Matej Knopp
Both links are created in LinkIconPanel. You can subclass it or
replace it by your own class (it's really a tiny class) and disable
the links there.

-Matej

On Tue, Jul 28, 2009 at 7:40 PM, Seven Cornersseven.cor...@gmail.com wrote:
 I have a LinkTree wherein I need to disable the links on certain nodes.  It
 was easy to disable the contentLink but I haven't been able to figure out
 how to disable the iconLink.  My links are BookmarkablePageLinks, but
 iconLink is not a proper link; rather it appears that it's a td element
 with an onclick handler, that contains an img element that has no
 surrounding anchor or onclick handlers.  While nothing happens on my
 disabled icons when you click the mouse, the mouse still transforms into a
 link mouse (a hand instead of a pointer), and I'd like to prevent that.

 Short of cheating and tweaking the style to set the pointer, I don't know
 how to really disable the thing.

 Any ideas?


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



Re: Twenty Six Wicket Tricks

2009-07-28 Thread Matej Knopp
Doesn't really have to be a complete quickstart. Put the pages with
markup in a zip (without any external references to your daos, etc).
That should be enough.

-Matej

On Tue, Jul 28, 2009 at 11:13 PM, Vladimir Kkoval...@gmail.com wrote:

 Ok then. I'm a noob in maven and ... I even don't know how to make a
 quickstart of this problem for you. I have never done Wicket project from
 scratch. But I have just found a free maven by example book and started to
 read. I will be back soon :)


 Matej Knopp-2 wrote:

 This would be then a bug in nested forms support and not in the modal
 window itself. If a form inside modal window is submitted only that
 form should be processed. I still don't understand what problem
 exactly this fixes.

 -Matej

 On Tue, Jul 28, 2009 at 10:04 PM, Vladimir Kkoval...@gmail.com wrote:

 The following class fixes the problem. It is the evidence of mismatch I'm
 saying about.

 public class ModalWindowFormT extends FormT {
        public ModalWindowForm(String id) {
                super(id);
        }

       �...@override
        public Form? getRootForm() {
                Form? form = super.getRootForm();

                if ((findParent(ModalWindow.class) != null) 
 (form.findParent(ModalWindow.class) == null))
                        return this;
                else
                        return form;
        }
 }

 I assume I don't understand something. But anyway I expect following the
 least surprise rule.



 Matej Knopp-2 wrote:

 On Tue, Jul 28, 2009 at 8:31 PM, Vladimir Kkoval...@gmail.com wrote:

 Jeremy,

 from my perspective ModalWindow is a mix of javascript widget that
 works
 in
 non-wicket mode and an wicket wrapper that bridges js widget with
 wicket.
 It
 is always created at the body level. That's why I said it's a cheat.
 Thus
 are problems with form submitting when nested forms are used.
 There is a good reason why the modal window has to be created on body
 level. That's the only reliable way to have element
 with absolute position. If you create the DOM structure deeper you are
 risking that a container has position:relative somewhere which will
 essentially break it. Welcome to the wonderful world of CSS.

 Community
 introduced a solution (a wrapping form that is threated as the root) to
 work
 around the mismatch of ModalWindow structure. There is an issue
 registered
 about that. But Matej keeps stating that we should put MW into a form.
 What
 says that he is not aware what the problem is. And there are more
 problems
 caused by the fact that the form element is created by javascript.
 Is it, really?

 I've already explained why the DOM structure is created on root level.
 If you have form component inside modal window, chances are that
 wicket will (to support nested forms) render it as div. If this
 happens it is no longer possible to serialize the form when doing an
 ajax submit. That's why the actual modal window markup contains a real
 form.

 And this is why it is necessary to put a modal window inside a form if
 you want to have form in modal window. What we should have done is to
 put a wicket form inside the modal window panel itself (just to force
 all forms in modal window content) to be rendered as nested. But for
 some reason i thought that a simple mention in javadoc about putting
 modal window to form would be sufficient. My bad.


 From the other hand I believe it is possible to write pure Wicket
 component
 that would be as trice as simpler and won't suffer with problems with
 request lifecycle. Probably I'm wrong and it is not worth turning the
 old
 ModalWindow into pure Wicket component due to expensiveness of the
 effort
 that would be spent to remain it compatible.
 Would you mind specifying the actual problems with request
 lifecycle? And how exactly would a pure wicket modal window look
 like? No javascript?

 The same about tree components. The API is very difficult to
 comprehend.
 Component does not work as I expect in dynamic context. But thankfully
 Sven
 implemented different implementation that does what is expect and
 usable
 as
 well as DataTable component. I believe forking and fixing the original
 component would be much more expensive. After that so many people
 should
 start complaining about that to convince core team that there is not
 just
 one person who is experiencing problems. It is always difficult to
 accomplish.
 I would like to have some clarification on this. What is so difficult
 about the Wicket Tree API? (apart from the fact that it uses swing
 TreeModel which seem to be too confusing for some people). What does
 dynamic context mean? Assuming you have properly implemented
 TreeModel that fires the proper notifications, wicket tree is capable
 for updating itself on ajax request by only transmitting the changed
 part to the clients. How much more dynamic can you get?

 For next version we will probably ditch swing TreeModel for something
 simpler but we will still need some kind of modal change

Re: Twenty Six Wicket Tricks

2009-07-28 Thread Matej Knopp
On Tue, Jul 28, 2009 at 11:55 PM, Vladimir Kkoval...@gmail.com wrote:


 Matej Knopp-2 wrote:

 Modal Window is an ajax component. Submitting it with regular submit
 is not supported and it never was.


 But I would like to have AjaxFallbackModalWindow that survives page refresh.
 Why not author my own if the aims are different? Probably requirements we
 have are far from being accepted as common.
Of course you can. There's nothing wrong with that.



 Again, modal window doesn't support regular submits (by design) so if
 you want to do file upload you'll have to use a hidden iframe or some
 other approach like that.


 IMO, Iframe is not an approach it is a work around the limitation (made by
 design) :)
Yes. But from the beginning Modal Window was designed as Ajax Component.



 I just looked at jquery dialog example. The dialog is declared in
 markup but it is then reparented as top level DOM element. Same thing
 wicket modalwindow does.


 What is especial in my case is that the page height is limited by the window
 height and contains a srollable div within. Taking into account that the
 browsers we support works well with fixed positioning and assuming that the
 following excerpt works:



 Fixed positioning is a special case of absolute positioning. For fixed
 elements, the containing block is always taken to be the viewport of the
 browser window.
This is true. Unfortunately it doesn't apply to IE6 which doesn't
support position:fixed. Modal Window was written couple of years ago
when IE6 position was quite strong, however even now we can't afford
to ignore it. Unfortunately.


 It seems to be pretty doable. But it needs investigation. I haven't tried
 yet.
Position:fixed will work in your case if you can afford to ignore IE6.
But it's not something we can do in wicket extensions.



Anyway it is possible to do what the modal.js is doing by Wicket means and
don't have a component tree mismatch with DOM.

 Is it really? Mind sharing with me how?


 In case if the position:fixed does not help I would subclass a Form and make
 it a container of ModalWindows. Then by placing the
 modal-window-container-form at the body level I would acquire a new
 ModalWindow from the container. Does it make sense?

So the ModalWindow would have to be added to the container (which I
assume would have to be added to the page itself)? That's rather
limiting.

-Matej
 --
 View this message in context: 
 http://www.nabble.com/Twenty-Six-Wicket-Tricks-tp21214357p24708596.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: [ANN] wicket-tree project

2009-07-26 Thread Matej Knopp
Does TableTree support partial (ajax) updates?

-Matej

On Sun, Jul 26, 2009 at 3:00 PM, Vladimir Kkoval...@gmail.com wrote:


 svenmeier wrote:

 ITreeProvider and IDataProvider are not exactly compatible, I don't
 think we gain anything by extending the former from the latter.


 I don't insist. But you do have IDataProvider wrapper over ITreeProvider in
 TableTree.java :)



 Selection is not part of the tree components. There are just to many
 different notions of selection:
 - single/multiple selection
 - subtree selection
 - continuous/discontinuous selection
 - several selections on a single tree (see example with checkable *and*
 selectable content)
 - no selection at all
 - ...

 IMHO it's better to leave these requirements out of a tree
 implementation.
 If you need a selected class attribute on a TableTree, override
 #newRowItem() and do it yourself. Ever noticed that DataTable has no
 notion of selection too?
  tag. Whatever.

 I din't find API to control expanded state of node. Say I would like to add
 a button to collapse all nodes, or I would like to save expanded state and
 restore when the user returns back to this page again.

 Please explain how I should operate with the state of tree (what nodes are
 expanded and what nodes are selected). Once I realize I will be able to
 override newRowItem properly.

 Also you have 2 Branch classes. I find it confusing a bit.

 I'm going to play with TreeTable tomorrow.

 --
 View this message in context: 
 http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24666766.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: AjaxSubmitLink does not work in 1.4-rc7

2009-07-26 Thread Matej Knopp
you can always submit a patch you know.

-Matej

On Sun, Jul 26, 2009 at 8:53 PM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:
 the link works just fine, wicket tester doesnt work right.

 Sorry for the inconcise title, yes, the link works, the test doesn't.
 I am doing test-first approach so I sometimes exaggerate, but yes, the
 test does not work.

 **
 Martin


 On Sun, Jul 26, 2009 at 9:15 AM, Martin
 Makundimartin.maku...@koodaripalvelut.com wrote:
 Hi!

 AjaxSubmitLink does not work in 1.4-rc7

 Anybody know a workaround: https://issues.apache.org/jira/browse/WICKET-2400

 ?

 **
 Martin

 -
 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: memory leak on FeedbackMessages??

2009-07-21 Thread Matej Knopp
Should be fixed in svn. Can you give it a try?

-Matej

On Tue, Jul 21, 2009 at 8:58 AM, Tsutomu YANO t_y...@me.com wrote:

 I created a JIRA:

 https://issues.apache.org/jira/browse/WICKET-2384

 We finally found out the reason of this problem. This was a bug of Wicket
 (on FeedbackPanel class).
 I wrote a fixed code on the JIRA.

 I hope that the solution will be included in next release. This is big bug
 for me.

 Thank you for your advice.

 -
 Tsutomu YANO
 t_y...@me.com
 benbr...@mac.com


 09/07/20 (MON) 10:02AM、 Jeremy Thomerson jer...@wickettraining.com
 said:
 I have not run your quickstart, but this sounds peculiar to me.
 Please create a JIRA (with the quickstart attached) and reply-all here
 with the issue URL.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 
 On Sun, Jul 19, 2009 at 9:10 AM, Tsutomu Yanot_y...@me.com wrote:
  Hi.
 
  When I uses component.info() method to display a message, my program
 stopped by OutOfMemoryError or StackOverflowError.
  I found the work around, but I could not found reason of this error. Can
 anyone teach me the reason?
 
 
  I create a sample application to show this problem. Open attached tar.gz
 file(including a maven project) and run.
  check 'submit continuously' checkbox and click 'register' button.
 
  The program will display current session size continuously. the size
 will be increased, and finally program will be
  stopped with OutOfMemoryError or StackOverflowError.
 
 
  But if you changes only one line, this program will not be stopped.
 
  ---original code---
 private SubmitLink insertLink = new SubmitLink(insertLink) {
 public void onSubmit() {
 info(message);
 setResponsePage(new Test(testFormBean));
 Session session = Session.get();
 long size = session.getSizeInBytes();
 LOGGER.info(SESSION SIZE: {}, size);
 }
 };
  -
 
  ---changed--
 private SubmitLink insertLink = new SubmitLink(insertLink) {
 public void onSubmit() {
 Session.get().info(message);  //CHANGED!!!
 setResponsePage(new Test(testFormBean));
 Session session = Session.get();
 long size = session.getSizeInBytes();
 LOGGER.info(SESSION SIZE: {}, size);
 }
 };
  
 
 
   Component's 'info()' method will attache the component, to which
 'info()' method is called, as 'reporter' object of
  FeedbackMessage object. It could become a reason of this problem. But
 the FeedbackMessage will be destroyed when the message
  will be displayed with FeedbackPanel. So I think, memory leak will never
 occur.
 
   If I use 'Session.get().info()' method, instead of component.info(),
 FeedbackMessage's 'reporter' object become null.
  In this case, My sample program never stopped with OutOfMemoryError or
 StackOverflowError.
 
   I could not find out the reason. Is this a bug of Wicket? or failure of
 my program.
 
 
 
 
 
  ---
  Tsutomu YANO
  t_y...@me.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
 
 
 


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




Re: Javascript Header Contribution via Ajax

2009-07-14 Thread Matej Knopp
If the javascript is evaluated that means it's added to page. What
exactly is the difference here? And why can't you give it id? (id is
used to filter out duplicate javascripts).

What does the javascript look like?

-Matej

On Mon, Jul 13, 2009 at 9:28 PM, Joel Hillhil...@michigan.gov wrote:
 I have a custom behavior that contributes Javascript to the header.  In order 
 to prevent collisions with other components that may also be using that 
 behavior, I include it using TextTemplateHeaderContributor.  Like so:

 public class CustomBehavior extends AbstractBehavior {

  private Component component;

  . . .

 �...@override
  public void bind(Component component) {
    this.component = component
    component.setOutputMarkupId(true);

    . . .

    component.add(TextTemplateHeaderContributor.forJavaScript(getClass(), 
 javascriptSource.js, variables));
  }

 }


 This works great, unless I add this behavior to a component that gets added 
 to the page as part of an Ajax request.  In that case, the Javascript does 
 not get added to the page, so when the component looks up the Javascript it 
 needs to function, it's not there.

 I'm not sure if this is related to 
 https://issues.apache.org/jira/browse/WICKET-618 or not, but that bug was 
 resolved 'Won't Fix'.

 I tried tracing through the Ajax code, and if I understand it properly, the 
 issue seems to come down to line 1445 of wicket-ajax.js:

 1441    var text = Wicket.DOM.serializeNodeChildren(node);
 1442
 1443    var id = node.getAttribute(id);
 1444
 1445    if (typeof(id) == string  id.length  0) {
 1446      // add javascript to document head
 1447      Wicket.Head.addJavascript(text, id);
 1448    } else {
 1449      try {
 1450        eval(text);
 1451      } catch (e) {
 1452        Wicket.Log.error(e);
 1453      }
 1454    }


 It would appear that because the script tag generated by 
 TextTemplateHeaderContributor does not contain an 'id' attribute, the 
 javascript is not rendered on the page.  (However it is still evaluated, via 
 line 1450, which explains why when I added an alert() call to my javascript 
 file, it got executed.  Imagine my initial confusion.)

 Is this expected behavior?  A bug?  Is there a workaround?  Am I even 
 interpreting the issue correctly?  If I were using a static Javascript file, 
 I think there are calls I can use to include an 'id' attribute, and I may 
 have to rewrite my javascript so I can make it static (if possible).

 Picking up on suggestions I read on the mailing list archives, I also tried:

  public void renderHead(IHeaderResponse response) {
    
 response.renderOnDomReadyJavascript(TextTemplateHeaderContributor.forJavaScript(getClass(),
  popupBehavior.js, variables).toString());
  }

 and:

  public void onRendered(Component component) {
    if(RequestCycle.get().getRequestTarget() instanceof AjaxRequestTarget) {
      AjaxRequestTarget target = (AjaxRequestTarget) 
 RequestCycle.get().getRequestTarget();
      
 target.appendJavascript(TextTemplateHeaderContributor.forJavaScript(getClass(),
  popupBehavior.js, variables).toString());
    }
  }

 Neither alternative worked.  At this point I'm not even sure they make sense, 
 but I tried them before I had dug in and (hopefully) traced down the problem.

 Thank you for any help that anyone can provide on this issue.

 Joel


 -
 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: congrats to inmethod

2009-07-11 Thread Matej Knopp
Wicket Stuff SVN

-Matej

On Sat, Jul 11, 2009 at 5:04 AM, mms770medhat.sa...@verizon.net wrote:

 Where can we download from?

  Thanks,

  Medhat


 Cristi Manole wrote:

 I was trying to see if the inmethod site still links the (best) wicket
 data/tree table (although i knew it's been moved to wicket-stuff) and I
 stumbled on the new site.

 The site looks great and so does the service. Congrats to Matej... Igor
 (brix in action) ?... and best of luck with it.

 Why didn't you guys promote it here?

 http://www.inmethod.com

 --
 Cristi Manole

 Nova Creator Software
 www.novacreator.com



 --
 View this message in context: 
 http://www.nabble.com/congrats-to-inmethod-tp23788532p24436853.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: Updating an inmethod grid, looking for hints

2009-07-11 Thread Matej Knopp
You need to call the update() method during an ajax request after you
have marked the items dirty.

-Matej

On Sat, Jul 11, 2009 at 11:01 AM, Erik van Oostene.vanoos...@grons.nl wrote:
 Hi,

 How can I trigger an inmethod grid to do a /complete/ update of itself?

 The only thing that I see is markAllDirty(). That will update the items
 currently in the list, but it will /not/ get new items from the data
 provider.

 I researched the code for quite some time but I must have been looking at
 the wrong parts as I found no hook to get this done. The most I could do was
 call detach() on Body, one of the inner classes of a grid. But on screen,
 that would only update the number of items in the lower toolbar, not the
 items in the grid themselves.

 More ideas?

 Ideally, imho, the grid should respond to modelChanged(). But I have still
 no clue what should be in that method.

 Regards,
   Erik.


 --
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.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: Updating an inmethod grid, looking for hints

2009-07-11 Thread Matej Knopp
are you using treegrid or datagrid?

-Matej

On Sat, Jul 11, 2009 at 1:43 PM, Erik van Oostene.vanoos...@grons.nl wrote:
 If I remember correctly that only updates the existing items and ignore new
 items. I am looking for a way to get the new items too.

 Regards,
   Erik.


 Matej Knopp wrote:

 You need to call the update() method during an ajax request after you
 have marked the items dirty.

 -Matej

 On Sat, Jul 11, 2009 at 11:01 AM, Erik van Oostene.vanoos...@grons.nl
 wrote:


 Hi,

 How can I trigger an inmethod grid to do a /complete/ update of itself?

 The only thing that I see is markAllDirty(). That will update the items
 currently in the list, but it will /not/ get new items from the data
 provider.

 I researched the code for quite some time but I must have been looking at
 the wrong parts as I found no hook to get this done. The most I could do
 was
 call detach() on Body, one of the inner classes of a grid. But on screen,
 that would only update the number of items in the lower toolbar, not the
 items in the grid themselves.

 More ideas?

 Ideally, imho, the grid should respond to modelChanged(). But I have
 still
 no clue what should be in that method.

 Regards,
  Erik.


 --
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.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




 --
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.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: How to turn ModalWindow form into multipart form?

2009-06-26 Thread Matej Knopp
If you use modal window with form you have to submit the form using
AjaxButton - which rules out multipart form. Also when you have form
in ModalWindow the window itself should be placed in Wicket Form.
(forms can be nested) - which is stated in javascript.

-Matej

On Fri, Jun 26, 2009 at 10:49 AM, Vladimir Kkoval...@gmail.com wrote:

 yes it do has.

 near line 1095 of modal.js:

 Wicket.Window.getMarkup = function(idWindow, idClassElement, idCaption,
 idContent, idTop, idTopLeft, idTopRight, idLeft, idRight, idBottomLeft,
 idBottomRight, idBottom, idCaptionText, isFrame) {
        var s =
                        div class=\wicket-modal\ id=\+idWindow+\ 
 style=\top: 10px; left:
 10px; width: 100px;\form
 style='background-color:transparent;padding:0px;margin:0px;border-width:0px;position:static'+
                        div id=\+idClassElement+\+

 And it seems hacky and buggy.

 In our case we would use regular submit for FileUploadField instead of ajax
 if it wasn't hardcoded. Now we need to hack ModalWindow some way. I don't
 like iframe approach 'cause it forces user to submit twice at the time when
 regular submit should have worked.

 If you don't know this very hardcoded form leads to problem reflecting
 request parameters to form components models because in java we have a stack
 of forms and submit request contains just data of this particular form. As
 the result form components of enclosing forms receive empty data and then
 ... at least unexpected validation problems.
 There has been a jira issue already that contains workaround description. I
 have to go right now. I'll find it later.


 igor.vaynberg wrote:

 modalwindow has a hardcoded form?


 On Thu, Jun 25, 2009 at 8:00 AM, Vladimir Kovalyukkoval...@gmail.com
 wrote:
 How to turn ModalWindow form into multipart form?
 The problem is that the markup code for that particular form is
 hard-coded
 into modal.js script (surprise!, surprise!).

 ModalWindow form submission problems han't been fixed yet, I mean rc5


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




 --
 View this message in context: 
 http://www.nabble.com/How-to-turn-ModalWindow-form-into-multipart-form--tp24204896p24216939.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: ModalWindow and IE8 question

2009-06-23 Thread Matej Knopp
couldn't it be old javascript file in your browser cache?

-Matej

On Tue, Jun 23, 2009 at 8:25 PM, Per Lundholmper.lundh...@gmail.com wrote:
 I don't know if it helps, but it works with IE8 on XP so there is
 something nasty about Vista

 /Per

 On Tue, Jun 23, 2009 at 8:17 PM, Flaviusflav...@silverlion.com wrote:

 I'm starting to get users running Vista with IE8 (8.0.6001.18783)
 report that they can't open modal dialog boxes.

 I searched through nabble and jira.  I found issue 2207 which I
 understood to correct this:

 https://issues.apache.org/jira/browse/WICKET-2207

 However, I'm testing with Wicket 1.3.6 (and extensions and datetime
 1.3.6 as well) and the modal dialog is not opening.

 I also tested this with 1.4-rc4 and it's not working there either.

 I put the examples up here:

 http://68.15.93.72/wicket-examples-1.3.6/ajax/modal-window
 http://68.15.93.72/wicket-examples-1.4-rc4/ajax/modal-window

 If I go here and try to open these with IE8 on Vista, they don't
 open.  It works with other browsers I've tested with (ff, safari 3/4,
 IE6/7).

 Can anybody give me any insight to this?
 Thanks very much.


 -
 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: Usage DiskPageStore causes Session Swapping

2009-06-17 Thread Matej Knopp
What wicket version are you using? DiskPageStore has separate folder
for each session so I don't really see why this would happen.

-Matej

On Wed, Jun 17, 2009 at 8:28 PM, rajendar
medishettyrajendar.medishe...@gmail.com wrote:
 Hi,

 In one of our application, we are facing session swapping problem when we
 use DiskPageStore and this problem doesn't occur if we use HttpSessionStore.

 Let me explain you in more detail.

 This is policy Enrollment Application, we use Spring, Hibernate and Wicket
 Frameworks.
 We are using JDK serialization and the std SecondLevelCache/*DiskPageStore*
 *session* store.

 *Scenario:*
 Application works fine, when we are using only one in one Browser window.
  It seems that when two users are using the system, second user is able to
 see the first users data when he clicks back button.

 *Analysis*:
 Session id is different for both users, but while reading the page from the
 disk it somehow reads the wrong page.

 If I change the PageStore to HttpSessionStore, the same scenario works fine.


 Any inputs on this issue will be helpful.

 --
 Thanks,
 Rajendar


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



Re: Usage DiskPageStore causes Session Swapping

2009-06-17 Thread Matej Knopp
Latest  release in 1.3 branch is 1.3.6.

-Matej

On Wed, Jun 17, 2009 at 8:48 PM,
rajendar.medishettyrajendar.medishe...@gmail.com wrote:


 Initially we were using Wicket 1.3.3 and sometime back I upgraded to Wicket
 1.3.5. I'm able to produce the scenario with both wicket versions.



 Matej Knopp-2 wrote:

 What wicket version are you using? DiskPageStore has separate folder
 for each session so I don't really see why this would happen.

 -Matej

 On Wed, Jun 17, 2009 at 8:28 PM, rajendar
 medishettyrajendar.medishe...@gmail.com wrote:
 Hi,

 In one of our application, we are facing session swapping problem when we
 use DiskPageStore and this problem doesn't occur if we use
 HttpSessionStore.

 Let me explain you in more detail.

 This is policy Enrollment Application, we use Spring, Hibernate and
 Wicket
 Frameworks.
 We are using JDK serialization and the std
 SecondLevelCache/*DiskPageStore*
 *session* store.

 *Scenario:*
 Application works fine, when we are using only one in one Browser window.
  It seems that when two users are using the system, second user is able
 to
 see the first users data when he clicks back button.

 *Analysis*:
 Session id is different for both users, but while reading the page from
 the
 disk it somehow reads the wrong page.

 If I change the PageStore to HttpSessionStore, the same scenario works
 fine.


 Any inputs on this issue will be helpful.

 --
 Thanks,
 Rajendar


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




 --
 View this message in context: 
 http://www.nabble.com/Usage-DiskPageStore-causes-Session-Swapping-tp24079378p24079732.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: session expires after closing modalwindow?

2009-06-11 Thread Matej Knopp
Any exception in your log? What wicket version do you use?

-Matej

On Thu, Jun 11, 2009 at 1:08 PM, Bas Vrolingbvrol...@cmbi.ru.nl wrote:
 When I open a modalwindow on a page and then close it, the page from which
 the modal window was opened does not come back but instead wicket shows a
 session expired error message. How can this be? The modalwindow does nothing
 fancy, it just displays some text.

 -
 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: session expires after closing modalwindow?

2009-06-11 Thread Matej Knopp
Does it help when you clean cookies?

-Matej

On Thu, Jun 11, 2009 at 1:15 PM, Bas Vrolingbvrol...@cmbi.ru.nl wrote:
 I'm using 1.4-SNAPSHOT, but I also got this behavior with 1.4-RC4

 This is what the requestlogger says:

 INFO  - RequestLogger              -
 time=0,event=Interface[target:Help$Sequence(), page:
 nl.ru.cmbi.mcsis.web.help.Help$Sequence(13), interface:
 IRedirectListener.onRedirect],response=Interface[target:Help$Sequence(),
 page: nl.ru.cmbi.mcsis.web.help.Help$Sequence(13), interface:
 IRedirectListener.onRedirect],sessionid=246ot0sbiier,sessionsize=4982,sessionstart=Thu
 Jun 11 13:03:43 CEST
 2009,requests=45,totaltime=3536,activerequests=0,maxmem=2130M,total=2130M,used=341M

 INFO  - RequestLogger              -
 time=1,event=BookmarkablePage[nl.ru.cmbi.mcsis.web.pages.align.AlignPage(random
 =
 [0.8314619874531822])],response=BookmarkablePage[nl.ru.cmbi.mcsis.web.error.MyPageExpiredErrorPage()],sessionid=246ot0sbiier,sessionsize=3094,sessionstart=Thu
 Jun 11 13:03:43 CEST
 2009,requests=46,totaltime=3537,activerequests=0,maxmem=2130M,total=2130M,used=341M

 INFO  - RequestLogger              -
 time=4,event=BookmarkablePage[nl.ru.cmbi.mcsis.web.error.MyPageExpiredErrorPage()],response=BookmarkablePage[nl.ru.cmbi.mcsis.web.error.MyPageExpiredErrorPage()],sessionid=246ot0sbiier,sessionsize=3094,sessionstart=Thu
 Jun 11 13:03:43 CEST
 2009,requests=47,totaltime=3541,activerequests=0,maxmem=2130M,total=2130M,used=341M


 On 11 Jun, at 13:12, Matej Knopp wrote:

 Any exception in your log? What wicket version do you use?

 -Matej

 On Thu, Jun 11, 2009 at 1:08 PM, Bas Vrolingbvrol...@cmbi.ru.nl wrote:

 When I open a modalwindow on a page and then close it, the page from
 which
 the modal window was opened does not come back but instead wicket shows a
 session expired error message. How can this be? The modalwindow does
 nothing
 fancy, it just displays some text.

 -
 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: Tree collapse very slow on firefox 3 for nodes with large # of children - Quickstart attached

2009-06-09 Thread Matej Knopp
There is good reason why the markup is flat and not nested. Otherwise
treetable/grid wouldn't be possible.

-Matej

On Wed, Jun 10, 2009 at 5:39 AM, Matt Shannonmshannon.wic...@gmail.com wrote:
 Just looking at the firebug profiler, the removeNodes method from tree.js is
 the function that is taking way too long to complete.  Checking the DOM, it
 looks like all nodes in tree regardless of position have their parent node
 set as the wicket panel surrounding the tree.

 I would have thought ideally that the various branches of the tree have
 their parents referring to the true tree node parent rather than a single
 common parent. This would allow collapse functions to simply remove all
 nodes of the particular element concerned.

 I guess it may be worthwhile experimenting with the following function to
 see if it can be optimized with limited interference.

 Wicket.Tree.removeNodes = function(prefix, nodeList) {
    var problem = false;
    for (var i = 0; i  nodeList.length; i++) {
        var e = document.getElementById(prefix + nodeList[i]);
        if (e != null) {
            e.parentNode.removeChild(e);
        } else {
            // while developing alert a warning
            problem = true;
            Wicket.Log.error(Can't find node with id  + prefix +
 nodeList[i] + . This shouldn't happen - possible bug in tree?);
        }
    }
    if (problem == true) {
        Wicket.Tree.askForReload();
    }
 }

 thanks

 Matt.


 On Wed, Jun 10, 2009 at 10:39 AM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:

 On Tue, Jun 9, 2009 at 3:41 PM, Matt Shannonmshannon.wic...@gmail.com
 wrote:
  Hi Igor,
 
  One thing I've learned reading these newsgroups is to not irritate you,
 or
  you don't get a favourable response :)

 isnt that how most things in life work? :)

  I've attached a new quickstart that does have the Start class (which I
  appreciate makes debugging from an IDE much simpler).

 i played around with quickstart. it runs fast in IE8, Safari, and
 Chrome. Only Firefox, like you mentioned, is afflicted. I am not sure
 why the dom node removal is so slow in firefox, we may have to roll
 special javascript just for firefox to handle this...i am not,
 however, sure what will work fast because already we are not doing
 anything special to remove the dom node.

 -igor

 
  The maven jetty plugin is also configured with contextpath /
  e.g.
 
  mvn jetty:run
  http://localhost:8080
 
  thanks,
 
  Matt.
 
 
 
  On Wed, Jun 10, 2009 at 12:45 AM, Igor Vaynberg igor.vaynb...@gmail.com
 
  wrote:
 
  seems your quickstart is not a quickstart - eg its missing the Start
  launcher usually found in src/test/java of the quickstart
  archetype/project.
 
  -igor
 
  On Tue, Jun 9, 2009 at 2:09 AM, Matt Shannonmshannon.wic...@gmail.com
  wrote:
   Hi,
  
   First time poster, but have been lurking for a few crazy months trying
   to
   learn and develop with this technology.  I'm prototyping a wicket app
   for
   work, and have been extremely impressed with this framework and also
 the
   support and information that can be found on these mailing lists.
  
   The one component in wicket I have found that seems most difficult to
   leverage in an AJAX / dynamic on demand nature seems to be the tree
   component. I've hobbled together a dynamic tree leveraging bits and
   pieces
   of other peoples work (mostly from this mailing list).  The tree seems
   to
   work ok, but I have run in to a strange performance issue on firefox
   when
   attempting to collapse a node.
  
   Firefox has serious performance issues when collapsing nodes with a
   semi-large number of children (e.g. 100+ children).
  
   I've attached a quickstart that demonstrates the issue (Firefox
 3.0.10).
  
   The collapse performance issue does not appear to affect IE6.
  
   I would be interested to see if anyone can conform this issue (based
 on
   the
   attached quickstart), and suggest a mechanism that may combat this.
  
   In my 'real' application, my nodes have real detachable models
   associated
   with each tree node.
  
   cheers
  
   Matt.
  
  
  
  
   -
   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 

Re: congrats to inmethod

2009-05-30 Thread Matej Knopp
On Sat, May 30, 2009 at 1:36 AM, Cristi Manole cristiman...@gmail.com wrote:
 I was trying to see if the inmethod site still links the (best) wicket
 data/tree table (although i knew it's been moved to wicket-stuff) and I
 stumbled on the new site.

 The site looks great and so does the service. Congrats to Matej... Igor
 (brix in action) ?... and best of luck with it.

 Why didn't you guys promote it here?

 http://www.inmethod.com

lack of time? :)

-Matej


 --
 Cristi Manole

 Nova Creator Software
 www.novacreator.com


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



Re: HTTP pseudo streaming for Wicket

2009-05-25 Thread Matej Knopp
I'm not sure why there should be any logic regarding mp4 on the
server. I don't know how exactly flash mp4 players work but the player
should be able to request the exact byte offset and length from the
server. Content-Range header basically provides random access to
remote files which should be enough for streaming playback with
seeking.

-Matej

On Mon, May 25, 2009 at 10:00 PM, Kaspar Fischer h...@rapsak.com wrote:
 Sorry: the link I gave is already outdated; a new version is available:

  http://h264.code-shop.com/trac/wiki

 P.S. Unfortunately I need a solution for Tomcat as I am hosting at a Tomcat
 provider.

 On 25.05.2009, at 22:57, Kaspar Fischer wrote:

 Thanks, Matej, for the pointer. I have not read a lot about MP4 Pseudo
 Streaming but as far as I currently understand it, the server needs to
 analyse the MP4 file (its meta data, actually) in order to know which part
 of the file to return -- the latter task can then be done using you
 Streamer.java. For instance,


  http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Introduction-Version1

 analyses the MP4 file in order to get from a time-input (start playing at
 00:01:23) to a file offset. Does anymore have or know of Java code/port for
 the MP4/h264 pseudo-streaming and is willing to share it?

 Kaspar

 On 13.04.2009, at 21:10, Matej Knopp wrote:

 If you want to support http streaming you need to implements
 servlet/filter that supports Content-Range and Accept-Range headers.
 You can take a look at

 http://code.google.com/p/brix-cms/source/browse/trunk/brix-core/src/main/java/brix/plugin/site/resource/Streamer.java
 to get the idea.

 -Matej

 On Mon, Apr 13, 2009 at 6:16 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:

 I think lighttpd does this - although I've never personally used it.  I
 just
 remember it form some research I was doing on a similar subject.
 http://blog.lighttpd.net/articles/2006/03/09/flv-streaming-with-lighttpd

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Sat, Apr 11, 2009 at 5:10 AM, Kaspar Fischer h...@rapsak.com wrote:

 I need to stream H264 .mp4 movies to a Flash video player (JW Player)
 and
 want to support HTTP pseudo streaming, i.e., the user should be able to
 seek
 within the movie. Does anybody know of a Wicket implementation for
 this,
 something like xmoov-php [1] for Java with a corresponding Wicket
 component?

 The video itself lies in a JackRabbit repository, not directly on the
 file
 system.

 Red5 [2] offers streaming and a lot more. However, I need a solution
 that
 also works in low memory situations and from the Red5 specs [2] it
 seems
 that this might be difficult.

 Regards,
 Kaspar
 --

 [1] http://xmoov.com/xmoov-php/
 [2] http://code.google.com/p/red5/
 [3]

 http://jira.red5.org/confluence/display/docs/Chapter+11.+System+Requirements+For+Red5

 -
 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: IRequestTarget not serializable

2009-05-22 Thread Matej Knopp
Instead of storing requests targets you should store your own
serialized callbacks that create request targets when executed.

-Matej

On Fri, May 22, 2009 at 3:34 PM, Juan G. Arias juangar...@gmail.com wrote:
 I have this link, that I create in different ways. It performs some logic,
 and then redirects to somewhere, depending on how was created.
 Here is the code:

 class SignOutLink extends Link {
  private IRequestTarget target;

  public SignOutLink(String id, Class redirectPage) {
  this(id, new BookmarkablePageRequestTarget(redirectPage));
  }

  public SignOutLink(String id, String url) {
  this(id, new RedirectRequestTarget(url));
    }

  public SignOutLink(String id, IRequestTarget target) {
  super(id);
  this.target = target;
  }

  public void onClick() {
  this.signOutSession();
 this.redirectSignInPage();
  }

  public abstract void signOutSession();

  public void redirectSignInPage() {
  this.getRequestCycle().setRequestTarget(this.target);
  }
 }


 On Thu, May 21, 2009 at 8:08 PM, Matej Knopp matej.kn...@gmail.com wrote:

 IRequestTarget is valid only for one request. Why do you want to keep
 as instance variable?

 -Matej

 On Thu, May 21, 2009 at 11:48 PM, Juan G. Arias juangar...@gmail.com
 wrote:
  Hi all,
  I want to mantain an IRequestTarget in my component, as an instance
  attribute. But wicket cries about it's not serializable.
  Of course, it's right. IRequestTarget is not serializable.
 
  Why? Is something wrong with mantain a request target inside my
 component?
 
  Thanks!
  Juan
 

 -
 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: IRequestTarget not serializable

2009-05-21 Thread Matej Knopp
IRequestTarget is valid only for one request. Why do you want to keep
as instance variable?

-Matej

On Thu, May 21, 2009 at 11:48 PM, Juan G. Arias juangar...@gmail.com wrote:
 Hi all,
 I want to mantain an IRequestTarget in my component, as an instance
 attribute. But wicket cries about it's not serializable.
 Of course, it's right. IRequestTarget is not serializable.

 Why? Is something wrong with mantain a request target inside my component?

 Thanks!
 Juan


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



Re: Example of ModalWindow misleading

2009-05-20 Thread Matej Knopp
I think modal window example could be fixed by using
getPageReference() to pass page reference between pages instead of
page instance.

-Matej

On Wed, May 20, 2009 at 10:29 PM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
 http://www.wicket-library.com/wicket-examples/ajax/modal-window.1 is
 pretty misleading : passing components between components/page is
 quite broken as can be seen in the past discussion on the mailing list
 (serialization issue can arise and makes both sides using different
 references of the same object logically speaking).

 True.

 I have found that the only safe way to pass references is via
 getSession().xxx so now all my (not all, but generally relevant ones)
 models are in session instead of being page-scoped. Not heavy models
 but selection models such that indicate what the user is operating on.

 However. Instead of changing the documentation, I would rather change
 the implementation such that the serialization would not break.

 The same offect, however, occurs if you have some other kind of pop-up
 window it would be nice to be able to continue using the
 underlying page in sync with the pop-up.



 **
 Martin


 However, as it is in the example, I first used it considering that it
 should be ok to do so.

 Could it be changed in some way ?

 On the bigger picture, I guess it raises again the issue of the
 recommended way of communicating between the page and the modal
 window, which currently doesn't exist (session, database...??).
 However, this example is currently completely misleading, so even so
 comments to explicit the issue would be welcomed.

 thanks again
 nono

 -
 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: Tree Table - Update Model

2009-05-14 Thread Matej Knopp
In order for tree to update items your model must fire treeNodesChanged event.

-Matej

On Thu, May 14, 2009 at 2:55 PM, Peter Diefenthaeler pdief...@csc.com wrote:

 Hi every one,
 I tried the tree table example and get stuck with two problems.
 How can I avoid links in the tree leavlets?
 How can I update the tree on a new model. I've generated the tree
 information on a database query with a search field. When I press the
 search button, I expected the tree to be updated with the new model, but it
 doesn't work.

 suchform.add(new AjaxButton(search)
        {
                  private static final long serialVersionUID = 1L;

                 �...@override
                  protected void onSubmit(AjaxRequestTarget target, Form
 form) {
                        suchliste = new SucheDao().search(suchfeld);
                        log.debug(#Treffer:  + suchliste.size());;
                        tm = createTreeModel(suchliste);
                        tree.updateTree();
                        target.addComponent(tree);
                  }
        });


 tm = createTreeModel(suchliste);
 tree = new Tree(tree, tm);
 tree.setRootLess(true);
 tree.getTreeState().collapseAll(););
 add(tree.setOutputMarkupId(true)););


 Wicket Version 1.3.6

 Thanx.

 PETER DIEFENTHÄLER
 CSC

 Sandstr. 7, 80335 München, Germany
 CIS Payments  Integration | office: +49 89 5908 6441 | mobile: +49 172 886
 5632 | fax: +49 89 5908 6499 | pdief...@csc.com | www.csc.com


 CSC • This is a PRIVATE message. If you are not the intended recipient,
 please delete without copying and kindly advise us by e-mail of the mistake
 in delivery.  NOTE: Regardless of content, this e-mail shall not operate to
 bind CSC to any order or other contract unless pursuant to explicit written
 agreement or government initiative expressly permitting the use of e-mail
 for such purpose
  •
 CSC Deutschland Solutions GmbH • Registered Office: Abraham-Lincoln-Park 1,
 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman),
 Thomas Nebe, Peter Schmidt • Chairman of the Supervisory Board: Guy Hains •
 Registered in Germany: HRB 22374

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



Re: inmethod grid generics patch

2009-05-08 Thread Matej Knopp
Hi,

it's not abandoned. There's a project created for it in wicketstuff
jira that can be used to submit patches.

-Matej

On Fri, May 8, 2009 at 11:49 PM, Brill Pappin br...@pappin.ca wrote:
 according to this post;

 http://tinyurl.com/qlghyf

 the inmethod grid it he wicketstuff modules was to get generics.

 I'm finding the missing generics a real pain in the behind but I also have a
 recent checkout of the 1.4-SNAPSHOT of wicketstuff, and it does not yet have
 generics.

 Does anyone know if this component has been abandoned or not?
 If I have to I'll go an add the generics myself, but if there is a copy out
 there that already has them I'd rather use that version.

 - Brill Pappin

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



Re: inmethod grid generics patch

2009-05-08 Thread Matej Knopp
Found the patch, will assign it to jira issue. And possibly apply after review.

-Matej

On Fri, May 8, 2009 at 11:54 PM, Matej Knopp matej.kn...@gmail.com wrote:
 Hi,

 it's not abandoned. There's a project created for it in wicketstuff
 jira that can be used to submit patches.

 -Matej

 On Fri, May 8, 2009 at 11:49 PM, Brill Pappin br...@pappin.ca wrote:
 according to this post;

 http://tinyurl.com/qlghyf

 the inmethod grid it he wicketstuff modules was to get generics.

 I'm finding the missing generics a real pain in the behind but I also have a
 recent checkout of the 1.4-SNAPSHOT of wicketstuff, and it does not yet have
 generics.

 Does anyone know if this component has been abandoned or not?
 If I have to I'll go an add the generics myself, but if there is a copy out
 there that already has them I'd rather use that version.

 - Brill Pappin


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



Re: [Improvement] getPageParameters()

2009-05-03 Thread Matej Knopp
PagePameters is mutable object. I don't think one shared empty
instance is a good idea.

-Matej

On Sun, May 3, 2009 at 11:44 AM, Johan Compagner jcompag...@gmail.com wrote:
 make a jira issue for this.

 On Sun, May 3, 2009 at 11:38, Objelean Alex alex.objel...@gmail.com wrote:

 When using getPageParameters(), I used to have some troubles because
 forgetting to call page super(params). As a result, getPageParameters()
 returns null. This problem also occur when working with non bookmarkable
 page. My suggestion is to take advantage of Null Object Pattern
 http://en.wikipedia.org/wiki/Null_Object_pattern and
 if the pageParameters object is null to return PageParameters.NULL (empty)
 instance. This way, the client of the code wouldn't have to worry about NPE
 check. Any thoughts?
 Thank you!
 Alex



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



Re: custom expired page

2009-04-27 Thread Matej Knopp
can you paste here a link that redirects to login page?

-Matej

On Mon, Apr 27, 2009 at 9:39 PM, alec a...@distancesoftware.com wrote:
 sorry if that sounded confusing, but it's not the expiredpage that requires
 authorization, it's the destination of the link that was clicked.

 e.g. the user clicks the link to home (which requires authorization) and
 instead of getting the expired page they get the login page.

 Igor Vaynberg wrote:

 make your ExpiredPage not require authorization/authentication

 -igor

 On Mon, Apr 27, 2009 at 12:32 PM, alec a...@distancesoftware.com wrote:


 We have a wicket 1.3.5 application and are having trouble redirecting to
 an
 expired page if the user clicks on a link after the session expired.  in
 our
 application's init method we have the call
 getApplicationSettings().setPageExpiredErrorPage(ExpiredPage.class);
 and this works if they click on a normal link after the session has been
 expired, but we're also using the AuthorizeInstantiation annotations
 (from
 wicket-auth-roles) on several pages that forces a logged in user to have
 a
 certain role to access the page or be redirected to the login page.  Our
 problem is that if the session expired then the user gets redirected to
 the
 login page because of an unauthorized instantiation instead of being
 redirected to the expired page.
 Is there some way to work around this, or is there a way to determine if
 the
 session had expired on the login page so we could display a message
 there?

 -
 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: custom expired page

2009-04-27 Thread Matej Knopp
If you use bookmarkable link then it's proper behavior.

Bookmarkable link creates new page instance. It will never give you
expired error.

-Matej

On Mon, Apr 27, 2009 at 9:50 PM, alec a...@distancesoftware.com wrote:
 are you referring to the java code i write for the link?

 it'd be something like:
 add(new BookmarkablePageLink(home, Application.get().getHomePage());

 it's not something special about the link which causes it to redirect to the
 login page, it's that the homepage class (and several others) requires the
 user to have a certain role to instantiate it.


 Matej Knopp wrote:

 can you paste here a link that redirects to login page?

 -Matej

 On Mon, Apr 27, 2009 at 9:39 PM, alec a...@distancesoftware.com wrote:


 sorry if that sounded confusing, but it's not the expiredpage that
 requires
 authorization, it's the destination of the link that was clicked.

 e.g. the user clicks the link to home (which requires authorization) and
 instead of getting the expired page they get the login page.

 Igor Vaynberg wrote:


 make your ExpiredPage not require authorization/authentication

 -igor

 On Mon, Apr 27, 2009 at 12:32 PM, alec a...@distancesoftware.com
 wrote:



 We have a wicket 1.3.5 application and are having trouble redirecting
 to
 an
 expired page if the user clicks on a link after the session expired.
  in
 our
 application's init method we have the call
 getApplicationSettings().setPageExpiredErrorPage(ExpiredPage.class);
 and this works if they click on a normal link after the session has
 been
 expired, but we're also using the AuthorizeInstantiation annotations
 (from
 wicket-auth-roles) on several pages that forces a logged in user to
 have
 a
 certain role to access the page or be redirected to the login page.
  Our
 problem is that if the session expired then the user gets redirected to
 the
 login page because of an unauthorized instantiation instead of being
 redirected to the expired page.
 Is there some way to work around this, or is there a way to determine
 if
 the
 session had expired on the login page so we could display a message
 there?

 -
 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-ajax and IE performance problems for pages with many links

2009-04-17 Thread Matej Knopp
Well, it kinda does. You can submit the links and buttons with
keyboard  - and when you do it does make sense to preserve focus when
you replace the submitting button or link.

-Matej

On Fri, Apr 17, 2009 at 9:48 AM, Johan Compagner jcompag...@gmail.com wrote:
 Buttons and links dont make much sense yes.
 Dont remember why we should do this.
 Will check the code

 On 16/04/2009, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 this code is there so we can track focus and properly restore it after
 ajax modifies the dom. i am not sure why we need to track and restore
 focus on anchors, it is only important when you are typing so that the
 cursor doesnt move elsewhere - so only for textfields and textareas.

 johan, matej says you wanted to track focus for anchors, whats the deal?

 -igor

 2009/4/16 Peter Gardfjäll peter.gardfj...@gmail.com:
 Hi James,

 I'm pretty sure that links are part of the problem.
 To verify this, try replacing all a tags with e.g. span and see if
 you can spot any difference in response time.
 Alternatively, try replacing/commenting out ajax components/behaviors
 on your page to prevent wicket-ajax.js from being pulled into the
 page.

 cheers, Peter

 On Thu, Apr 16, 2009 at 3:52 PM, James Carman
 jcar...@carmanconsulting.com wrote:
 Peter,
 I have experienced similar problems just recently.  I didn't narrow it
 down
 to the fact that the links were the problem, as you have, though!  I have
 been racking my brains trying to figure this thing out.  My page is
 similar,
 a table with lots of cells in them that are links.  I've turned off CSS
 and
 other stuff trying to find the bottleneck.  I didn't think for a moment
 that
 it might be the links.

 James

 2009/4/16 Peter Gardfjäll peter.gardfj...@gmail.com

 Hi all,

 I am working on a wicket application intended to be executed both on
 FF3 and IE7.
 While working on this application I have discovered that the rendering
 of some pages are a lot slower in IE.
 The pages that were significantly slower on IE have a couple of things
 in common: they are ajax-enabled and have lots of links.
 These pages all appear to freeze for a while after all data has been
 transferred, but before the page becomes responsive.

 The reason (or at least one of the reasons) is that wicket-ajax.js,
 which gets pulled in whenever an Ajax component/behavior is added to a
 page, registers a function
 (addDomReadyEvent(Wicket.Focus.attachFocusEvent)) that traverses all
 {input,select,a,textarea,button} tags in the DOM tree when the page
 has been loaded.

 I timed this function for one of my pages (containing a single big
 table with around 300 rows, with each row having about six links).
 When the function is registered, the fireDomReadyHandlers in
 wicket-event.js takes 2400 ms to execute, compared to 700 ms when not
 registered. In firefox, the corresponding numbers are about 470 ms and
 400 ms.

 Hence, there seems to be quite a performance penalty involved in
 loading ajax pages with lots of links in IE7.
 I'm a bit worried about this overhead, particularly since I have a
 rather fast machine (a lot better than most of the end users anyway).
 I would not be surprised if clients see double page load times.

 Have anyone on this list experienced similar problems?
 Is this a known issue? (I have not been able to find anything similar
 on the mailing list)
 Any suggestions or pointers are welcome.

 best regards, Peter

 /PS By the way, I am using wicket 1.3.5.

 -
 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: HTTP pseudo streaming for Wicket

2009-04-13 Thread Matej Knopp
If you want to support http streaming you need to implements
servlet/filter that supports Content-Range and Accept-Range headers.
You can take a look at
http://code.google.com/p/brix-cms/source/browse/trunk/brix-core/src/main/java/brix/plugin/site/resource/Streamer.java
 to get the idea.

-Matej

On Mon, Apr 13, 2009 at 6:16 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 I think lighttpd does this - although I've never personally used it.  I just
 remember it form some research I was doing on a similar subject.
 http://blog.lighttpd.net/articles/2006/03/09/flv-streaming-with-lighttpd

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Sat, Apr 11, 2009 at 5:10 AM, Kaspar Fischer h...@rapsak.com wrote:

 I need to stream H264 .mp4 movies to a Flash video player (JW Player) and
 want to support HTTP pseudo streaming, i.e., the user should be able to seek
 within the movie. Does anybody know of a Wicket implementation for this,
 something like xmoov-php [1] for Java with a corresponding Wicket component?

 The video itself lies in a JackRabbit repository, not directly on the file
 system.

 Red5 [2] offers streaming and a lot more. However, I need a solution that
 also works in low memory situations and from the Red5 specs [2] it seems
 that this might be difficult.

 Regards,
 Kaspar
 --

 [1] http://xmoov.com/xmoov-php/
 [2] http://code.google.com/p/red5/
 [3]
 http://jira.red5.org/confluence/display/docs/Chapter+11.+System+Requirements+For+Red5

 -
 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: EmptyAjaxRequestTarget invokes failurescript when link is pressed on page

2009-04-07 Thread Matej Knopp
Please open jira issue - or assign the code you posted to existing
one. I'll apply it.

-Matej

On Tue, Apr 7, 2009 at 3:30 PM, Mikko Pukki mikko.pu...@syncrontech.com wrote:
 Hi,

 We just noticed that if user is on a page and ajax request is
 executing, pressing a link can cause AbstractDefaultAjaxBehavior's
 failurescript to be executed on the browser.

 We noticed that this happens at least in cases where pressing a link
 forwards user to other page by setting a different response page.

 Content of ajax debug is same as in the jira issue I have posted before
 (JIRA 1971):

    INFO: Initiating Ajax POST request on ? 
 wicket:interface=:1:inputForm:back::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=truerandom=0.6741350924814413
    INFO: Invoking pre-call handler(s)...
    INFO: Received ajax response (31 characters)
    INFO:
    ajax-response/ajax-response
    ERROR: Error while parsing response: Could not find root ajax-response 
 element
    INFO: Invoking post-call handler(s)...

 Content of the ajax response is problem at least on ie6,ie7,ff2 and ff3. It 
 seems
 to fail, because xml reply does not contain doctype.

 This is annoying, because the invoker of the ajax request is in our case 
 inherited from the
 AbstractAjaxTimerBehavior and we would like to do a page reload in the 
 failurescript in case
 that request fails so that page would still be updated even if there are some 
 network problems.
 Now pressing any link that forwards to other pages can force a reload to the
 page, if some request is already executing. In this particular application 
 this is wery common,
 partly because of bad network connection from the client's site (request can 
 take some time)
 and partly because of very frequent ajax requests.

 We tried to modify 
 org.apache.wicket.request.target.basic.EmptyAjaxRequestTarget's
 respond method so that it puts doctype to the respond as does the normal ajax 
 target

 we replaced this:
        public void respond(RequestCycle requestCycle)
        {
                
 requestCycle.getResponse().write(ajax-response/ajax-response);
        }

 with this:
        public void respond(RequestCycle requestCycle)
        {
                final WebResponse response = 
 (WebResponse)requestCycle.getResponse();
                final Application app = Application.get();
                final String encoding = 
 app.getRequestCycleSettings().getResponseRequestEncoding();

                // Set content type based on markup type for page
                response.setCharacterEncoding(encoding);
                response.setContentType(text/xml; charset= + encoding);

                // Make sure it is not cached by a client
                response.setHeader(Expires, Mon, 26 Jul 1997 05:00:00 GMT);
                response.setHeader(Cache-Control, no-cache, 
 must-revalidate);
                response.setHeader(Pragma, no-cache);

                response.write(?xml version=\1.0\ encoding=\);
                response.write(encoding);
                response.write(\?);
                response.write(ajax-response/ajax-response);
        }

 And it works now. Should I open a jira issue for this?

 Regards,
 Mikko

 --
 Mikko Pukki
 Syncron Tech Oy
 Laserkatu 6
 53850 Lappeenranta
 +358 400 757 178


 -
 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: Constructor not being called when Back button clicked

2009-04-01 Thread Matej Knopp
You need to add Cache-control: no-store header to prevent firefox from
caching the page on back button. Look at

WebPage#setHeaders(WebResponse response)

-Matej

On Wed, Apr 1, 2009 at 5:15 PM, Timm Helbig timm.hel...@th-hosting.net wrote:
 Is there some way to force the page to be reconstructed?
 Don't use Ajax, use the default Button insteand

 Regards,
 Timm

 Am Mittwoch, 1. April 2009 16:11:07 schrieb Steve Swinsburg:
 Hi all,

 I have a Page and on that page a Form which submits via Ajax.

 In this page's constructor I added a debug statement that prints a
 message when the constructor is called (for testing). I then submit
 the form, click away, then click Back and in Safari 4 for Mac, the
 page is reconstructed and I see my message again (good). Everything
 works ok (also good).

 However, in Firefox for Mac (and for PC and all IE flavours), clicking
 Back has the original search text in the box, and the page is NOT
 reconstructed. Clicking search again throws NPE's because certain
 elements are not initialised properly.

 Is there some way to force the page to be reconstructed? Is this some
 caching issue that is causing it to be not reconstructed and hence
 just reused?


 thanks,
 Steve



 -
 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: How to switch Panels with a Tree?

2009-04-01 Thread Matej Knopp
Hi,

  selectedPanel.replaceWith(currentPanel);

 java.lang.IllegalStateException: This method can only be called on a 
 component that has already been added to its parent.
at org.apache.wicket.Component.replaceWith(Component.java:2717)

Obviously your selected panel is not added to page and you try to call
replaceWith on it.

-Matej

On Wed, Apr 1, 2009 at 2:58 PM, Christian Helmbold
christian.helmb...@yahoo.de wrote:

 Hello,

 I want to switch panels with a tree (like switching panels within a 
 TabbedPanel), but get an error when clicking more than once on a node.

 It should look like this:

 +-+
 |               (TreePanel)                   |
 | +-+                             |
 | |    (Tree)   |                             |
  | * root      |   +---+ |
 | | ** Folder A |   |    (ContentPanel)     | |
 | | *** [File1] |   | File1                 | |
 | | *** File2   |   |                       | |
 | +-+   +---+ |
 +-+

 The Panel according to the selected node (File1) is displayed.

 The top-level TreePanel contains the Tree and the and the ContentPanel.

 Java code of TreePanel:
 
 public class TreePanel extends Panel{

    private Tree tree;
    private NodePanel selectedPanel;


    public TreePanel(String id, NodePanel rootNode)
    {
        super(id);
        DefaultTreeModel treeModel = new 
 DefaultTreeModel(rootNode.getAsTreeNode());
        selectedPanel = rootNode;

        add(selectedPanel);
        tree = new Tree(tree, treeModel)
        {
           �...@override
            protected String renderNode(TreeNode node)
            {
                DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)node;
                Object userObject = treeNode.getUserObject();
                if (userObject instanceof List)
                    return subtree;
                else
                {
                    NodePanel panel = (NodePanel)userObject;
                    return panel.getTitle();
                }
            }

           �...@override
            protected void onNodeLinkClicked(AjaxRequestTarget target,
                                 javax.swing.tree.TreeNode node)
            {
                DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)node;
                NodePanel currentPanel = (NodePanel)treeNode.getUserObject();
                selectedPanel.replaceWith(currentPanel);
            }
        };

        add(tree);
    }

    /**
     * Get a reference to the tree to configure or query it.
     * @return
     */
    public Tree getTree()
    {
        return tree;
    }

 }
 

 In the Page class that uses my TreePanel I add some NodePanls to the tree. 
 When I open the Page in the browser, the root panel is displayed as expected. 
 When I click on a node the first time everything is fine and the panel gets 
 replaced, but when I click on another link I get:

 WicketMessage: Method onLinkClicked of interface 
 org.apache.wicket.markup.html.link.ILinkListener targeted at component 
 [MarkupContainer [Component id = nodeLink]] threw an exception

 Root cause:

 java.lang.IllegalStateException: This method can only be called on a 
 component that has already been added to its parent.
 at org.apache.wicket.Component.replaceWith(Component.java:2717)
 at 
 com.helmbold.wicket.components.tree.TreePanel$1.onNodeLinkClicked(TreePanel.java:53)
 ...

 What's wrong with my code?

 Regards
 Christian



 PS:

 For completeness the code of NodePanel (ContentPanel in the example extends 
 NodePanel):
 
 public abstract class NodePanel extends Panel{

    private DefaultMutableTreeNode treeNode = new DefaultMutableTreeNode(this);


    /**
     * Constructs a NodePanel with the given id.
     * @param id wicket:id
     */
    public NodePanel(String id)
    {
        super(id);
    }


    /**
     * Wraps this object in a DefaultMutableTreeNode.
     * @return A DefaultMutableTreeNode object which returns this object when
     * DefaultMutableTreeNode#getUserObject() is invoked.
     */
    public DefaultMutableTreeNode getAsTreeNode()
    {
        return treeNode;
    }


    /**
     * Add a child in the tree hierarchy - not a nested panel this a panel!
     * @param child
     */
    public void addChild(NodePanel child)
    {
        treeNode.add(child.getAsTreeNode());
    }


    /**
     * @return Title of the Panel that will be displayed as node link in the 
 tree.
     */
    public abstract String getTitle();

 }
 






 

Re: Serious performance degradation

2009-03-29 Thread Matej Knopp
Hi,

On Mon, Mar 30, 2009 at 2:08 AM, dtoffe dto...@yahoo.com.ar wrote:

 Hi all,

    I'm testing a small app about to enter in production, and I've found
 that performance degrades seriously in a rather small amount of time, even
 with one single session.
    The first problem I guess is the lack of LDMs, I underestimated its
 importance mainly because the application is expected to have only a very
 small amount of simultaneous sessions (it's an intranet only app), but I
 will fix that tomorrow adding LDMs.

LDMs are key point to optimize when you have heavy model.

    The app also has a refreshing behavior set to refresh every 120 seconds.
 The main page has two small tables, one of them is loaded by editing one
 bean in another panel, saving it to DB and refreshing the table (up to some
 60-80 rows).
    Doing a quick profiling using the app for some 30 minutes or so, I've
 found that most of the memory is used by PropertyResolver.ObjectAndGetSetter
 (80Mb), followed by char[] (26 Mb) and byte[] (23 Mb). Perhaps this hints to
 some known issue or mistake in my code ?
80Mb of ObjectAndGetSetter seems bit weird to me. Unless you have
really right model and PropertyResolver needs to cache lot of
accessors.

char[] might be buffers from redirect-to-buffer response, although
26Mb seems quite a lot. It's hard to guess without knowing more about
the data.

23mb of byte[] might be serialized pages cache in DiskPageStore. Those
are soft references (so they get freed if there is not enough memory)
and also there is limited number of them so the memory usage doesn't
grow with load.

-Matej

    I will review all my code for memory leaks. Besides changing my models
 to LDMs, is there any other common bad practice that I should be aware of,
 any usual coding error that causes memory leaks by wrong usage of Wicket ??

 Thanks in advance,

 Daniel

 --
 View this message in context: 
 http://www.nabble.com/Serious-performance-degradation-tp22774430p22774430.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: Caching of rendered panels

2009-03-27 Thread Matej Knopp
You have to be really brave to use IComponentSource :-)

It's almost never a good idea anyway. It makes sense if you have
container with big amount of small component and you can restore the
whole hierarchy from e.g. an entity Id.

but it was last time used with Wicket 1.3. There's not guarantee it will work...

-Matej

On Fri, Mar 27, 2009 at 8:13 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 ive never had to do this, but maybe something like this will work :)

 class myheavypanel implements icomponentsource {
  private String cache;

  public Component restoreComponent(String id) {
     if (cache==null) {
       return this;
     } else  {
        return new label(id, cache).setescapemarkup(false);
    }
  }

  public myheavypanel() {
     .
     add(new abstracttransformbehavor() {
         public abstract CharSequence transform(final Component
 component, final CharSequence output) {
            myheavypanel.this.cache=output;
            return output;
         }});
   }

 }


 its kinda hacky but might work :)

 -igor

 On Fri, Mar 27, 2009 at 11:50 AM, Daniel Frisk dan...@jalbum.net wrote:
 In our case it's not really that the rendering itself is taking to long, it
 is getting the data from the model (database) so your advice is in some
 sense correct. Restructuring the code so that we can efficently cache the
 model is a lot of work and I would prefer to somehow cache the rendered
 html.

 So if we presume that I actually know what I am doing, any ideas how it can
 be done?

 // Daniel


 On 2009-03-27, at 19:23, Jeremy Thomerson wrote:

 Don't share component instances across requests / especially sessions.
 Don't prematurely optimize.

 Cache your model and test the rendering.  If it really is taking too long,
 figure out why and worry about it then.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Fri, Mar 27, 2009 at 1:12 PM, Martin Grotzke 
 martin.grot...@javakaffee.de wrote:

 Hi,

 I also thought about s.th. like this because we'll have very complex
 component graphs that have to be composed dynamically based on the
 language of the user and ~3 other things. I thought about caching
 complete component instances, but didn't come so far that I thought
 about how this could be integrated into wicket - perhaps dead simple via
 some
 _cacheService.getReallyComplexComponentCached( complexComponent,
 userInfo )

 I don't know how cheap exactly rendering of our complex component
 structure will be, but if this would take more than say 10 millis we
 would also try to cache already rendered markup.

 Cheers,
 Martin


 On Fri, 2009-03-27 at 16:49 +0100, Daniel Frisk wrote:

 I have a situation where I have some panels which I want to render say
 at most once a minute and during that period they should be static.
 I tried a few approches which hasn't really worked out for me so I
 wanted to know if somebody has created such a thing or how this could
 be done. Ideas are also welcome...

 // Daniel Frisk
 jalbum.net

 -
 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: Client-side models for zero-state scalability

2009-03-24 Thread Matej Knopp
Well, there possibly will be extended support for stateless
application - something like we implemented in brix. So in a way the
statement is true. But there is no timeline for it.

-Matej

On Tue, Mar 24, 2009 at 11:47 AM, Alex Objelean alex_objel...@yahoo.com wrote:

 After reviewing the Wicket feature list, I accidentally noticed the following
 statement:
 The next version of Wicket will support client-side models for zero-state
 scalability. I am wondering if this feature will be indeed implemented in
 (which?) next version or this is just some feature which sounds great for
 marketability and will never by implemented?

 Thank you!

 Alex
 --
 View this message in context: 
 http://www.nabble.com/Client-side-models-for-zero-state-scalability-tp22677847p22677847.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: Client-side models for zero-state scalability

2009-03-24 Thread Matej Knopp
http://code.google.com/p/brix-cms/source/browse/trunk/brix-demo/src/main/java/brix/demo/web/tile/stockquote/stateless/StatelessStockQuotePanel.java

-Matej

On Tue, Mar 24, 2009 at 12:01 PM, Alex Objelean alex_objel...@yahoo.com wrote:

 Matej, thank you for your reply!
 Could you provide some examples (links) where I can see how it works?

 Thank you!

 Alex


 Matej Knopp-2 wrote:

 Well, there possibly will be extended support for stateless
 application - something like we implemented in brix. So in a way the
 statement is true. But there is no timeline for it.

 -Matej

 On Tue, Mar 24, 2009 at 11:47 AM, Alex Objelean alex_objel...@yahoo.com
 wrote:

 After reviewing the Wicket feature list, I accidentally noticed the
 following
 statement:
 The next version of Wicket will support client-side models for
 zero-state
 scalability. I am wondering if this feature will be indeed implemented
 in
 (which?) next version or this is just some feature which sounds great for
 marketability and will never by implemented?

 Thank you!

 Alex
 --
 View this message in context:
 http://www.nabble.com/Client-side-models-for-zero-state-scalability-tp22677847p22677847.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




 --
 View this message in context: 
 http://www.nabble.com/Client-side-models-for-zero-state-scalability-tp22677847p22678056.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



  1   2   3   4   5   6   7   8   >