RE: header resources order in 1.5.x

2013-08-09 Thread Michal Wegrzyn
Hi Martin,

Yes, I want to upgrade ASAP, but in current development phase it's not possible.

Problem was that wicket-select2 contributions were added at the very beginning 
of head and it could not find jQuery. Also select2 behavior could not find 
select2 js.

Groet,
Michał

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Friday, August 09, 2013 9:10
 To: users@wicket.apache.org
 Subject: Re: header resources order in 1.5.x
 
 Hi,
 
 On Thu, Aug 8, 2013 at 11:47 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Hi Per,
 
  Thanks, but in fact I had in mind wicket-select2, not select2.
  Anyway I've missed this thread:
  http://apache-wicket.1842946.n4.nabble.com/renderHead-wicket-head-
 page
  -component-order-td4650413.html
 
  I've used ParentFirstHeaderRenderStrategy. It is not the cleanest
 way,
  but I should not get any problems with other libs and making it
  cleaner is very easier (and different) with Wicket 6.
 
 
 Yes. Unfortunately there is no easy way to control the contributions in
 1.5.x.
 I recommend you to upgrade to 6.x as soon as you can.
 
 But you didn't explain what exactly is the problem with (wicket-
 )select2 ?
 
 
 
  Best regards,
  Michał
 
   -Original Message-
   From: Per Newgro [mailto:per.new...@gmx.ch]
   Sent: Thursday, August 08, 2013 20:23
   To: users@wicket.apache.org
   Subject: Re: header resources order in 1.5.x
  
   Hi Michal,
  
   do you know this?
   https://github.com/ivaynberg/wicket-select2
  
   There are examples.
   Maybe it can help
  
   Cheers
   Per
  
   Am 08.08.2013 17:27, schrieb Michal Wegrzyn:
Dear,
   
I am trying to integrate select2, but ordering in head doesn't
seem
   to be good.
   
What is the easiest way to order resource references in Wicket
 1.5.x?
Header decorator? If so, how do I obtain collection with
 references?
   
Best regards,
Michal Wegrzyn
   
   
  
  
   ---
 -
   - 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
 
 


header resources order in 1.5.x

2013-08-08 Thread Michal Wegrzyn
Dear,

I am trying to integrate select2, but ordering in head doesn't seem to be good.

What is the easiest way to order resource references in Wicket 1.5.x?
Header decorator? If so, how do I obtain collection with references?

Best regards,
Michal Wegrzyn



RE: header resources order in 1.5.x

2013-08-08 Thread Michal Wegrzyn
Hi Per,

Thanks, but in fact I had in mind wicket-select2, not select2.
Anyway I've missed this thread: 
http://apache-wicket.1842946.n4.nabble.com/renderHead-wicket-head-page-component-order-td4650413.html

I've used ParentFirstHeaderRenderStrategy. It is not the cleanest way, but I 
should not get any problems with other libs and making it cleaner is very 
easier (and different) with Wicket 6.

Best regards,
Michał

 -Original Message-
 From: Per Newgro [mailto:per.new...@gmx.ch]
 Sent: Thursday, August 08, 2013 20:23
 To: users@wicket.apache.org
 Subject: Re: header resources order in 1.5.x
 
 Hi Michal,
 
 do you know this?
 https://github.com/ivaynberg/wicket-select2
 
 There are examples.
 Maybe it can help
 
 Cheers
 Per
 
 Am 08.08.2013 17:27, schrieb Michal Wegrzyn:
  Dear,
 
  I am trying to integrate select2, but ordering in head doesn't seem
 to be good.
 
  What is the easiest way to order resource references in Wicket 1.5.x?
  Header decorator? If so, how do I obtain collection with references?
 
  Best regards,
  Michal Wegrzyn
 
 
 
 
 -
 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 Form problems

2013-05-22 Thread Michal Wegrzyn
Anybody?

Best regards,
Michał Węgrzyn

 -Original Message-
 From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
 Sent: Wednesday, May 08, 2013 11:22
 To: users@wicket.apache.org
 Subject: ModalWindow and Form problems
 
 Hi,
 
 We are using modal window with two forms at the moment: FilterForm and
 Form (Wicket 1.5.9) (inside bean edit panel with ajax).
 FilterForm is not used at the moment (hidden filter fields).
 
 Everything works fine in IE and Firefox but in Chrome form tag is not
 rendered (only body of the form element is rendered) which causes:
 
 ERROR: Wicket.Ajax.Call.submitFormById: Trying to submit form with id
 'form27a' that is not in document.
 
 Wrapping modals in forms doesn't help. If I override isRootForm with
 false then submit succeeds, but after that forms doesn't work
 anymore.
 I think that it can be connected with nested forms and Wicket's
 ModalWindow structure. I saw several issues on Jira:
 
 https://issues.apache.org/jira/browse/WICKET-1826
 https://issues.apache.org/jira/browse/WICKET-2214
 https://issues.apache.org/jira/browse/WICKET-3404
 
 Are there any improvements in Wicket 6.x.x regarding modal forms? If
 not, are there any plans or other up-to-date issue?
 Regardless priority of old issues, it seems that it's a serious
 problem.
 
 Best regards,
 Michał Węgrzyn


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



ModalWindow and Form problems

2013-05-08 Thread Michal Wegrzyn
Hi,

We are using modal window with two forms at the moment: FilterForm and Form 
(Wicket 1.5.9) (inside bean edit panel with ajax).
FilterForm is not used at the moment (hidden filter fields).

Everything works fine in IE and Firefox but in Chrome form tag is not 
rendered (only body of the form element is rendered) which causes:

ERROR: Wicket.Ajax.Call.submitFormById: Trying to submit form with id 'form27a' 
that is not in document.

Wrapping modals in forms doesn't help. If I override isRootForm with false 
then submit succeeds, but after that forms doesn't work anymore.
I think that it can be connected with nested forms and Wicket's ModalWindow 
structure. I saw several issues on Jira:

https://issues.apache.org/jira/browse/WICKET-1826
https://issues.apache.org/jira/browse/WICKET-2214
https://issues.apache.org/jira/browse/WICKET-3404

Are there any improvements in Wicket 6.x.x regarding modal forms? If not, are 
there any plans or other up-to-date issue?
Regardless priority of old issues, it seems that it's a serious problem.

Best regards,
Michał Węgrzyn



RE: jqwicket questions

2013-01-23 Thread Michal Wegrzyn
Point 2 is connected with this issue 
http://code.google.com/p/jqwicket/issues/detail?id=38
I've downloaded sources and applied patch (it seems that project is no more 
developed) and it helped, but framework did not work correctly due to conflicts 
with my custom jQuery.
Switching back to non-conflict mode helped.

Best regards,
Michał

 -Original Message-
 From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
 Sent: Friday, January 18, 2013 9:49
 To: users@wicket.apache.org
 Subject: jqwicket questions
 
 Hi,
 
 Jqwicket has several components that I would like to use (CKEditor,
 MaskedInput, maybe later other), but I see some issues:
 
 
 1.  Is there an option to use jqwicket components (maybe other
 project?) without incorporating/integrating jqwicket jquery?
 
 If not, then:
 
 2.  When I want to use jqwicket with custom jQuery (local copy)
 using constructor with JS resource reference I get url cannot be empty
 or null exception.
 
 See http://code.google.com/p/jqwicket/issues/detail?id=29 In fact when
 you use JS resource reference constructor core jquery url var is left
 null. Is is possible to use jqwicket with custom jquery without
 problems? I saw on the home page that newest 0.8 version supports
 Wicket 1.5.3. Maybe it is connected, as I use newer Wicket version
 (1.5.9).
 
 3.  I cannot use custom jquery so I configure non-conflicting alias
 with JQContributionConfig().enableNonConflictMode( jq
 ).withDefaultJQueryUi();
 
 It seems that components are working, but I see in wicket debug window
 JS error saying that jq is not defined. For Jqwicket behavior I see
 no error.
 
 Best regards,
 Michal Wegrzyn


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



jqwicket questions

2013-01-18 Thread Michal Wegrzyn
Hi,

Jqwicket has several components that I would like to use (CKEditor, 
MaskedInput, maybe later other), but I see some issues:


1.  Is there an option to use jqwicket components (maybe other project?) 
without incorporating/integrating jqwicket jquery?

If not, then:

2.  When I want to use jqwicket with custom jQuery (local copy) using 
constructor with JS resource reference I get url cannot be empty or null 
exception.

See http://code.google.com/p/jqwicket/issues/detail?id=29 In fact when you use 
JS resource reference constructor core jquery url var is left null. Is is 
possible to use jqwicket with custom jquery without problems? I saw on the home 
page that newest 0.8 version supports Wicket 1.5.3. Maybe it is connected, as I 
use newer Wicket version (1.5.9).

3.  I cannot use custom jquery so I configure non-conflicting alias with 
JQContributionConfig().enableNonConflictMode( jq ).withDefaultJQueryUi();

It seems that components are working, but I see in wicket debug window JS error 
saying that jq is not defined. For Jqwicket behavior I see no error.

Best regards,
Michal Wegrzyn



RE: problem hiding td element

2012-12-17 Thread Michal Wegrzyn
Hi Marek,

Why are you not using #setVisible(boolean)?
BTW. Instead of creating new AttributeModifier you can use its static methods.

Best regards,
Michał

 -Original Message-
 From: Marek Miglinski [mailto:marekmoff...@gmail.com]
 Sent: Monday, December 17, 2012 15:06
 To: users@wicket.apache.org
 Subject: problem hiding td element
 
 I have two elements in table:
 
 1. th id=statusHeader style=display:block;Status/th
 
 2. td id=statusContainer style=display:block;span
 wicket:id=status enabled/span/td
 
 
 And I want to hide them by default, so what I do is:
 
 new WebMarkupContainer(statusContainer).add(new
 AttributeModifier(style, true, new ModelString(display:none;)));
 
 new WebMarkupContainer(statusHeader).add(new
 AttributeModifier(style, true, new ModelString(display:none;)));
 
 
 But I still see those elements, what am I doing wrong?
 
 
 Thanks.

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



RE: events between pages

2012-12-12 Thread Michal Wegrzyn
Hi Martin,

For your workaround event is propagated and it works fine, but there are 
problems with AjaxRequestTarget, precisely with target.add( componentToRefresh 
).
Components that are outside of an iframe are not refreshed (target works on 
iframe context and they are not found).

What would be in this situation best solution?

Best regards,
Michał


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:01
 To: users@wicket.apache.org
 Subject: Re: events between pages
 
 On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Hi,
 
  I would like to send event from iframe to parent page which has
  multiple iframes.
 
  Event framework makes it possible to use application or session as
  sinks, but event affects only page from which event was sent.
 
  Why events which have session/application as sinks are not propagated
  to all pages?
 
 
 Define all pages.
 For application that could mean all pages for all users ever used so
 far.
 For session this means all pages in the history of this user (the data
 store).
 
 
 
  Is it possible to workaround it?
 
 
 You can get any page by its id:
 session.getPageManager().getPage(pageId)
 and use it as a sink.
 
 
 
  Best regards,
  Michal Wegrzyn
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: events between pages

2012-12-12 Thread Michal Wegrzyn
Thanks for a reply. Exactly. For my custom js I do simply:

target.appendJavaScript( if(window.parent != null) { window.parent. + script 
+ }else{ +script +}  );

because iframes are inside parent page.

Maybe there is a way to add above modification to ART with some kind of 
contributor interface?

Best regards,
Michał


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Wednesday, December 12, 2012 14:03
 To: users@wicket.apache.org
 Subject: Re: events between pages
 
 They are not part of the iframe's document and the JavaScript code
 cannot find them to replace them.
 It is easy to use the 'parent' in the JS code but I see no way to know
 that at the server side. I.e. when using ART#add() to say that the
 component is in the parent document...
 
 
 On Wed, Dec 12, 2012 at 12:16 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Hi Martin,
 
  For your workaround event is propagated and it works fine, but there
  are problems with AjaxRequestTarget, precisely with target.add(
  componentToRefresh ).
  Components that are outside of an iframe are not refreshed (target
  works on iframe context and they are not found).
 
  What would be in this situation best solution?
 
  Best regards,
  Michał
 
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 29, 2012 15:01
   To: users@wicket.apache.org
   Subject: Re: events between pages
  
   On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Hi,
   
I would like to send event from iframe to parent page which has
multiple iframes.
   
Event framework makes it possible to use application or session
 as
sinks, but event affects only page from which event was sent.
   
Why events which have session/application as sinks are not
propagated to all pages?
   
  
   Define all pages.
   For application that could mean all pages for all users ever used
 so
   far.
   For session this means all pages in the history of this user (the
   data store).
  
  
   
Is it possible to workaround it?
   
  
   You can get any page by its id:
   session.getPageManager().getPage(pageId)
   and use it as a sink.
  
  
   
Best regards,
Michal Wegrzyn
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: multiple requests and StalePageException

2012-11-29 Thread Michal Wegrzyn
Problem comes from 3rd party library that does some extra actions along 
applet's 3 requests.
Library actions trigger extra GET requests for a whole page ( for example 
http://server/app/?2 ),
Which are the reason of StalePageException during calling javascript from 
applet.

I must still debug to see what really triggers these GETs. 

Thanks for the help Martin.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 26, 2012 14:03
 To: users@wicket.apache.org
 Subject: Re: multiple requests and StalePageException
 
 The renderCount increases only when you use non-Ajax requests, i.e.
 when you re-render the whole page.
 Make sure that executes Wicket behavior via js uses Wicket.Ajax.**
 
 
 On Mon, Nov 26, 2012 at 1:56 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Hi group,
 
  In my Wicket application I have an applet. In the background it
  requests servlet and finally executes Wicket behavior via js.
  If one request is performed, then everything works without problems.
 
  Lately I have changed applet and now it can do one or three requests.
  If it performs three requests then StalePageException is thrown,
 which
  causes page refreshed and that is not a desired behavior.
  When I debug difference between render counter and page counter is
  exactly 2, so I think that issue is connected with two extra applet
 requests.
 
  Do I miss something on the Wicket side? If not, what is the best way
  to avoid StalePageException in this case?
 
  Best regards,
  Michal Wegrzyn
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


events between pages

2012-11-29 Thread Michal Wegrzyn
Hi,

I would like to send event from iframe to parent page which has multiple 
iframes.

Event framework makes it possible to use application or session as sinks, but 
event affects only page from which event was sent.

Why events which have session/application as sinks are not propagated to all 
pages?

Is it possible to workaround it?

Best regards,
Michal Wegrzyn


RE: events between pages

2012-11-29 Thread Michal Wegrzyn
Thanks Martin.

What is the pageId parameter in getPageManager().getPage(pageId)?
Component id or page version id (present in url)?


For session I would expect all most recent versions of visited pages for a 
current user.
For application the same but for all users.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:01
 To: users@wicket.apache.org
 Subject: Re: events between pages
 
 On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Hi,
 
  I would like to send event from iframe to parent page which has
  multiple iframes.
 
  Event framework makes it possible to use application or session as
  sinks, but event affects only page from which event was sent.
 
  Why events which have session/application as sinks are not propagated
  to all pages?
 
 
 Define all pages.
 For application that could mean all pages for all users ever used so
 far.
 For session this means all pages in the history of this user (the data
 store).
 
 
 
  Is it possible to workaround it?
 
 
 You can get any page by its id:
 session.getPageManager().getPage(pageId)
 and use it as a sink.
 
 
 
  Best regards,
  Michal Wegrzyn
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: events between pages

2012-11-29 Thread Michal Wegrzyn
Recent = one.
It would be security issue only if event API has some holes :)
Anyway it would be quite handy to send for example some info events to all 
logged users.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:16
 To: users@wicket.apache.org
 Subject: Re: events between pages
 
 On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Thanks Martin.
 
  What is the pageId parameter in getPageManager().getPage(pageId)?
  Component id or page version id (present in url)?
 
 
 The id from the url.
 See Page#getPageReference()
 
 
 
 
  For session I would expect all most recent versions of visited pages
  for a current user.
 
 
 Define recent :-)
 One, two, ... more ?
 
 
  For application the same but for all users.
 
 
 If a random user can manipulate the pages of the other users would be a
 security issue, and rude :-)
 
 
 
 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 29, 2012 15:01
   To: users@wicket.apache.org
   Subject: Re: events between pages
  
   On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Hi,
   
I would like to send event from iframe to parent page which has
multiple iframes.
   
Event framework makes it possible to use application or session
 as
sinks, but event affects only page from which event was sent.
   
Why events which have session/application as sinks are not
propagated to all pages?
   
  
   Define all pages.
   For application that could mean all pages for all users ever used
 so
   far.
   For session this means all pages in the history of this user (the
   data store).
  
  
   
Is it possible to workaround it?
   
  
   You can get any page by its id:
   session.getPageManager().getPage(pageId)
   and use it as a sink.
  
  
   
Best regards,
Michal Wegrzyn
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: events between pages

2012-11-29 Thread Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:43
 To: users@wicket.apache.org
 Subject: Re: events between pages
 
 You can do this.
 You can use either wicket-atmosphere or wicket-native-websocket to push
 data to the clients.
 

But only with Wicket =6.0.0.

Is it hard to affect also all recent (at least for current user) pages for 
events in Wicket?
That would be a nice feature.

 
 On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Recent = one.
  It would be security issue only if event API has some holes :) Anyway
  it would be quite handy to send for example some info events to all
  logged users.
 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 29, 2012 15:16
   To: users@wicket.apache.org
   Subject: Re: events between pages
  
   On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Thanks Martin.
   
What is the pageId parameter in getPageManager().getPage(pageId)?
Component id or page version id (present in url)?
   
  
   The id from the url.
   See Page#getPageReference()
  
  
   
   
For session I would expect all most recent versions of visited
pages for a current user.
   
  
   Define recent :-)
   One, two, ... more ?
  
  
For application the same but for all users.
   
  
   If a random user can manipulate the pages of the other users would
   be a security issue, and rude :-)
  
  
  
   
Best regards,
Michal Wegrzyn
   
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:01
 To: users@wicket.apache.org
 Subject: Re: events between pages

 On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:

  Hi,
 
  I would like to send event from iframe to parent page which
  has multiple iframes.
 
  Event framework makes it possible to use application or
  session
   as
  sinks, but event affects only page from which event was sent.
 
  Why events which have session/application as sinks are not
  propagated to all pages?
 

 Define all pages.
 For application that could mean all pages for all users ever
 used
   so
 far.
 For session this means all pages in the history of this user
 (the data store).


 
  Is it possible to workaround it?
 

 You can get any page by its id:
 session.getPageManager().getPage(pageId)
 and use it as a sink.


 
  Best regards,
  Michal Wegrzyn
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development http://jWeekend.com
 http://jweekend.com/
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: events between pages

2012-11-29 Thread Michal Wegrzyn


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 16:33
 To: users@wicket.apache.org
 Subject: Re: events between pages
 
 On Thu, Nov 29, 2012 at 4:28 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 29, 2012 15:43
   To: users@wicket.apache.org
   Subject: Re: events between pages
  
   You can do this.
   You can use either wicket-atmosphere or wicket-native-websocket to
   push data to the clients.
  
 
  But only with Wicket =6.0.0.
 
  Is it hard to affect also all recent (at least for current user)
  pages for events in Wicket?
  That would be a nice feature.
 
 
 New features go only in 6.x anyway.
 
 You can keep a list of created WebSession objects, all last used pages
 are kept as attribute in the Session object.
 

Shall I add then new feature request for 6.x? :)

 
 
  
   On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Recent = one.
It would be security issue only if event API has some holes :)
Anyway it would be quite handy to send for example some info
events to all logged users.
   
Best regards,
Michal Wegrzyn
   
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:16
 To: users@wicket.apache.org
 Subject: Re: events between pages

 On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:

  Thanks Martin.
 
  What is the pageId parameter in
 getPageManager().getPage(pageId)?
  Component id or page version id (present in url)?
 

 The id from the url.
 See Page#getPageReference()


 
 
  For session I would expect all most recent versions of
 visited
  pages for a current user.
 

 Define recent :-)
 One, two, ... more ?


  For application the same but for all users.
 

 If a random user can manipulate the pages of the other users
 would be a security issue, and rude :-)



 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 29, 2012 15:01
   To: users@wicket.apache.org
   Subject: Re: events between pages
  
   On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Hi,
   
I would like to send event from iframe to parent page
which has multiple iframes.
   
Event framework makes it possible to use application or
session
 as
sinks, but event affects only page from which event was
 sent.
   
Why events which have session/application as sinks are
 not
propagated to all pages?
   
  
   Define all pages.
   For application that could mean all pages for all users
 ever
   used
 so
   far.
   For session this means all pages in the history of this
 user
   (the data store).
  
  
   
Is it possible to workaround it?
   
  
   You can get any page by its id:
   session.getPageManager().getPage(pageId)
   and use it as a sink.
  
  
   
Best regards,
Michal Wegrzyn
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development http://jWeekend.com
   http://jweekend.com/
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development http://jWeekend.com
 http://jweekend.com/
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: events between pages

2012-11-29 Thread Michal Wegrzyn


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 16:57
 To: users@wicket.apache.org
 Subject: Re: events between pages
 
 On Thu, Nov 29, 2012 at 4:50 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
 
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 29, 2012 16:33
   To: users@wicket.apache.org
   Subject: Re: events between pages
  
   On Thu, Nov 29, 2012 at 4:28 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
   
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:43
 To: users@wicket.apache.org
 Subject: Re: events between pages

 You can do this.
 You can use either wicket-atmosphere or wicket-native-websocket
 to push data to the clients.

   
But only with Wicket =6.0.0.
   
Is it hard to affect also all recent (at least for current
user) pages for events in Wicket?
That would be a nice feature.
   
  
   New features go only in 6.x anyway.
  
   You can keep a list of created WebSession objects, all last used
   pages are kept as attribute in the Session object.
  
 
  Shall I add then new feature request for 6.x? :)
 
 
 I lost you.
 Wicket 6.x provides these features - Atmosphere/WebSocket. What feature
 request exactly ?
 
 You cannot initiate push from the server to the browsers with normal
 HTTP.
 You need either WebSocket/SSE/Long-Polling/Streaming/Flash
 

Sorry, I was not clear enough.
Feature would be to trigger wicket events on all user pages and not only on the 
current page.

 
  
   

 On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:

  Recent = one.
  It would be security issue only if event API has some holes
 :)
  Anyway it would be quite handy to send for example some info
  events to all logged users.
 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 29, 2012 15:16
   To: users@wicket.apache.org
   Subject: Re: events between pages
  
   On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Thanks Martin.
   
What is the pageId parameter in
   getPageManager().getPage(pageId)?
Component id or page version id (present in url)?
   
  
   The id from the url.
   See Page#getPageReference()
  
  
   
   
For session I would expect all most recent versions of
   visited
pages for a current user.
   
  
   Define recent :-)
   One, two, ... more ?
  
  
For application the same but for all users.
   
  
   If a random user can manipulate the pages of the other
 users
   would be a security issue, and rude :-)
  
  
  
   
Best regards,
Michal Wegrzyn
   
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 29, 2012 15:01
 To: users@wicket.apache.org
 Subject: Re: events between pages

 On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:

  Hi,
 
  I would like to send event from iframe to parent
  page which has multiple iframes.
 
  Event framework makes it possible to use application
  or session
   as
  sinks, but event affects only page from which event
  was
   sent.
 
  Why events which have session/application as sinks
 are
   not
  propagated to all pages?
 

 Define all pages.
 For application that could mean all pages for all users
   ever
 used
   so
 far.
 For session this means all pages in the history of this
   user
 (the data store).


 
  Is it possible to workaround it?
 

 You can get any page by its id:
 session.getPageManager().getPage(pageId)
 and use it as a sink.


 
  Best regards,
  Michal Wegrzyn
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development http://jWeekend.com
 http://jweekend.com/
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development http://jWeekend.com
   http://jweekend.com/
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development http://jWeekend.com
 http://jweekend.com/
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting

RE: View and edit panel

2012-11-28 Thread Michal Wegrzyn
Hi Thomas,

Bean edit panel is useful in this sort of scenarios.

http://londonwicket.googlecode.com/files/LondonWicket-BeanEditor.pdf

It is quite old, maybe there is a newer/better option.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Thomas Götz [mailto:t...@decoded.de]
 Sent: Wednesday, November 28, 2012 10:07
 To: users@wicket.apache.org
 Subject: View and edit panel
 
 Hi there,
 
 I'm currently implementing a panel that is used for viewing and editing
 of some entity. I wonder if there is an elegant solution for this.
 
 The situation:
 all my view/edit panels have a common abstract parent class (Panel),
 providing some general markup, i.e. I'm using wicket:extend in my
 concrete Panel implementation. Not every component is editable, only
 some. Currently I have a solution where I'm using a flag (isEditMode)
 and some if/else constructs to create either a label or e.g. a
 TextField. I keep the markup for the FormComponents as Fragments or
 separate Panels. Any more sophisticated ideas on how to implement this?
 ;-)
 
 Cheers,
-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: multiple requests and StalePageException

2012-11-27 Thread Michal Wegrzyn
Errata: this is not the code which is used to make request, but to call js.

Request are simple GETs or POSTs sometimes with attached files, they talk with 
servlet.
When requests are done, js is called from applet with success, but for some 
reason I get StalePageException in the request listener if in the final stage 
of applet thread three requests are done. When applet makes only one request in 
the final stage, everything is fine.

Simplest example of request which is used:

URL url = new URL(getDocumentBase(), spec);

HttpGet get = new HttpGet(url.toURI());
get.addHeader(Cookie, getCookie());

HttpResponse response = client.execute(get);

String responseText = EntityUtils.toString( 
response.getEntity() );

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 26, 2012 16:57
 To: users@wicket.apache.org
 Subject: Re: multiple requests and StalePageException
 
 The problem is clear.
 
 
 On Mon, Nov 26, 2012 at 4:54 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  private JSObject window;
 
  public void documentUpdated( String newDocumentId ) {
 
  window.call( documentUpdated, new String[] {
 param1,
  param2 } );
  }
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Monday, November 26, 2012 16:51
   To: users@wicket.apache.org
   Subject: Re: multiple requests and StalePageException
  
   Can you show the code that the applet uses to make requests to the
   page ?
  
  
   On Mon, Nov 26, 2012 at 4:47 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Hi Martin,
   
Thanks for a tip. What do you mean by uses Wicket.Ajax.**?
   
Applet till now generated fake event to trigger Wicket ajax
 behavior.
   
I have just tried calling behavior directly with wicketAjaxGet (
https://cwiki.apache.org/WICKET/calling-wicket-from-
 javascript.htm
l)
but I get the same result.
   
Best regards,
Michal Wegrzyn
   
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 26, 2012 14:03
 To: users@wicket.apache.org
 Subject: Re: multiple requests and StalePageException

 The renderCount increases only when you use non-Ajax requests,
 i.e.
 when you re-render the whole page.
 Make sure that executes Wicket behavior via js uses
   Wicket.Ajax.**


 On Mon, Nov 26, 2012 at 1:56 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:

  Hi group,
 
  In my Wicket application I have an applet. In the background
  it requests servlet and finally executes Wicket behavior via
 js.
  If one request is performed, then everything works without
   problems.
 
  Lately I have changed applet and now it can do one or three
   requests.
  If it performs three requests then StalePageException is
  thrown,
 which
  causes page refreshed and that is not a desired behavior.
  When I debug difference between render counter and page
  counter
   is
  exactly 2, so I think that issue is connected with two
 extra
  applet
 requests.
 
  Do I miss something on the Wicket side? If not, what is the
  best way to avoid StalePageException in this case?
 
  Best regards,
  Michal Wegrzyn
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development http://jWeekend.com
 http://jweekend.com/
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: multiple requests and StalePageException

2012-11-27 Thread Michal Wegrzyn
I have just debugged to make it sure. 
Decision to refresh page is done in 
org.apache.wicket.request.handler.PageProvider.getStoredPage(int pageId):

IRequestablePage storedPageInstance = 
getPageSource().getPageInstance(pageId);
if (storedPageInstance != null)
{
if (pageClass == null || 
pageClass.equals(storedPageInstance.getClass()))
{
pageInstance = storedPageInstance;
pageInstanceIsFresh = false;
if (renderCount != null  
pageInstance.getRenderCount() != renderCount)
{
throw new 
StalePageException(pageInstance);
}
}
else
{
// the found page class doesn't match the 
requested one
storedPageInstance = null;
}
}
return storedPageInstance;

If applet makes in the final stage one request, then render count from both 
PageAndComponentProvider and pageInstance are equal (for example 1).

If applet makes in the final stage three requests, then render count from 
PageAndComponentProvider is 1 but render count from pageInstance is 3.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
 Sent: Tuesday, November 27, 2012 9:50
 To: users@wicket.apache.org
 Subject: RE: multiple requests and StalePageException
 
 Errata: this is not the code which is used to make request, but to call
 js.
 
 Request are simple GETs or POSTs sometimes with attached files, they
 talk with servlet.
 When requests are done, js is called from applet with success, but for
 some reason I get StalePageException in the request listener if in the
 final stage of applet thread three requests are done. When applet makes
 only one request in the final stage, everything is fine.
 
 Simplest example of request which is used:
 
   URL url = new URL(getDocumentBase(), spec);
 
   HttpGet get = new HttpGet(url.toURI());
   get.addHeader(Cookie, getCookie());
 
   HttpResponse response = client.execute(get);
 
   String responseText = EntityUtils.toString(
 response.getEntity() );
 
 Best regards,
 Michal Wegrzyn
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Monday, November 26, 2012 16:57
  To: users@wicket.apache.org
  Subject: Re: multiple requests and StalePageException
 
  The problem is clear.
 
 
  On Mon, Nov 26, 2012 at 4:54 PM, Michal Wegrzyn
  michal.wegr...@onior.comwrote:
 
   private JSObject window;
  
   public void documentUpdated( String newDocumentId ) {
  
   window.call( documentUpdated, new String[] {
  param1,
   param2 } );
   }
  
-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Monday, November 26, 2012 16:51
To: users@wicket.apache.org
Subject: Re: multiple requests and StalePageException
   
Can you show the code that the applet uses to make requests to
 the
page ?
   
   
On Mon, Nov 26, 2012 at 4:47 PM, Michal Wegrzyn
michal.wegr...@onior.comwrote:
   
 Hi Martin,

 Thanks for a tip. What do you mean by uses Wicket.Ajax.**?

 Applet till now generated fake event to trigger Wicket ajax
  behavior.

 I have just tried calling behavior directly with wicketAjaxGet
 (
 https://cwiki.apache.org/WICKET/calling-wicket-from-
  javascript.htm
 l)
 but I get the same result.

 Best regards,
 Michal Wegrzyn

  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Monday, November 26, 2012 14:03
  To: users@wicket.apache.org
  Subject: Re: multiple requests and StalePageException
 
  The renderCount increases only when you use non-Ajax
 requests,
  i.e.
  when you re-render the whole page.
  Make sure that executes Wicket behavior via js uses
Wicket.Ajax.**
 
 
  On Mon, Nov 26, 2012 at 1:56 PM, Michal Wegrzyn
  michal.wegr...@onior.comwrote:
 
   Hi group,
  
   In my Wicket application I have an applet. In the
 background
   it requests servlet and finally executes Wicket behavior
 via
  js.
   If one request is performed, then everything works without
problems.
  
   Lately I have changed applet and now it can do one or three
requests.
   If it performs three requests then StalePageException is
   thrown,
  which
   causes page refreshed and that is not a desired behavior.
   When I debug difference between render counter and page
   counter
is
   exactly 2

multiple requests and StalePageException

2012-11-26 Thread Michal Wegrzyn
Hi group,

In my Wicket application I have an applet. In the background it requests 
servlet and finally executes Wicket behavior via js.
If one request is performed, then everything works without problems.

Lately I have changed applet and now it can do one or three requests.
If it performs three requests then StalePageException is thrown, which causes 
page refreshed and that is not a desired behavior.
When I debug difference between render counter and page counter is exactly 2, 
so I think that issue is connected with two extra applet requests.

Do I miss something on the Wicket side? If not, what is the best way to avoid 
StalePageException in this case?

Best regards,
Michal Wegrzyn


RE: multiple requests and StalePageException

2012-11-26 Thread Michal Wegrzyn
Hi Martin,

Thanks for a tip. What do you mean by uses Wicket.Ajax.**? 

Applet till now generated fake event to trigger Wicket ajax behavior.

I have just tried calling behavior directly with wicketAjaxGet 
(https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html) but I get 
the same result.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 26, 2012 14:03
 To: users@wicket.apache.org
 Subject: Re: multiple requests and StalePageException
 
 The renderCount increases only when you use non-Ajax requests, i.e.
 when you re-render the whole page.
 Make sure that executes Wicket behavior via js uses Wicket.Ajax.**
 
 
 On Mon, Nov 26, 2012 at 1:56 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Hi group,
 
  In my Wicket application I have an applet. In the background it
  requests servlet and finally executes Wicket behavior via js.
  If one request is performed, then everything works without problems.
 
  Lately I have changed applet and now it can do one or three requests.
  If it performs three requests then StalePageException is thrown,
 which
  causes page refreshed and that is not a desired behavior.
  When I debug difference between render counter and page counter is
  exactly 2, so I think that issue is connected with two extra applet
 requests.
 
  Do I miss something on the Wicket side? If not, what is the best way
  to avoid StalePageException in this case?
 
  Best regards,
  Michal Wegrzyn
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: multiple requests and StalePageException

2012-11-26 Thread Michal Wegrzyn
private JSObject window;

public void documentUpdated( String newDocumentId ) {

window.call( documentUpdated, new String[] { param1, param2 } 
);  
}

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 26, 2012 16:51
 To: users@wicket.apache.org
 Subject: Re: multiple requests and StalePageException
 
 Can you show the code that the applet uses to make requests to the page
 ?
 
 
 On Mon, Nov 26, 2012 at 4:47 PM, Michal Wegrzyn
 michal.wegr...@onior.comwrote:
 
  Hi Martin,
 
  Thanks for a tip. What do you mean by uses Wicket.Ajax.**?
 
  Applet till now generated fake event to trigger Wicket ajax behavior.
 
  I have just tried calling behavior directly with wicketAjaxGet (
  https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html)
  but I get the same result.
 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Monday, November 26, 2012 14:03
   To: users@wicket.apache.org
   Subject: Re: multiple requests and StalePageException
  
   The renderCount increases only when you use non-Ajax requests, i.e.
   when you re-render the whole page.
   Make sure that executes Wicket behavior via js uses
 Wicket.Ajax.**
  
  
   On Mon, Nov 26, 2012 at 1:56 PM, Michal Wegrzyn
   michal.wegr...@onior.comwrote:
  
Hi group,
   
In my Wicket application I have an applet. In the background it
requests servlet and finally executes Wicket behavior via js.
If one request is performed, then everything works without
 problems.
   
Lately I have changed applet and now it can do one or three
 requests.
If it performs three requests then StalePageException is thrown,
   which
causes page refreshed and that is not a desired behavior.
When I debug difference between render counter and page counter
 is
exactly 2, so I think that issue is connected with two extra
applet
   requests.
   
Do I miss something on the Wicket side? If not, what is the best
way to avoid StalePageException in this case?
   
Best regards,
Michal Wegrzyn
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


RE: Wicket plugin architecture

2012-10-18 Thread Michal Wegrzyn
Thank you all for suggestions. 

Finally I have used Wicket's org.apache.wicket.IInitializer (as pointed Martin) 
together with org.apache.wicket.Application.setMetaData(MetaDataKeyT key, 
Object object) for configuration.

Implementing more complex solution is not necessary unless you need advanced 
runtime plugin mechanism.
For custom plugin CSS/JS I use metadata and render all extra resource 
references on pages.
 
Images are mounted as shared resources. It works, but for large amount of 
images it will not be efficient.


Question: do you know a better Wicket-way to handle custom images?

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, September 25, 2012 10:48
 To: users@wicket.apache.org
 Subject: Re: Wicket plugin architecture
 
 Hi,
 
 The simplest way is to use Wicket's org.apache.wicket.IInitializer
 class.
 Just create a Jar (the plugin) that contains the plugin classes and
 wicket.properties in the root package and a line inside:
 initializer=com.example.MyInitializer
 
 MyInitializer#init(Application) will be called just before
 MyApp#init(). In this method you can add whatever your plugin provides
 to the global configuration
 
 On Tue, Sep 25, 2012 at 11:35 AM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  Dear developers,
 
  I need to prepare plugin architecture for a Wicket based project.
  I've found that open source Hippo CMS (
  http://svn.onehippo.org/repos/hippo/ ) does it, but I am curious if
 there are any other projects that do such a thing?
 
  Do you maybe know this kind of projects or frameworks?
 
  Are there any important in-depth aspects of Wicket of which should I
 be aware of for creating plugin architecture?
 
  Best regards,
  Michal Wegrzyn
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



RE: Wicket plugin architecture

2012-10-18 Thread Michal Wegrzyn
In Initializer implementation I do something like:

PackageResourceReference logoReference = new 
PackageResourceReference( MyInitializer.class, img/custom_header_logo.png );
WebApplication.get().getSharedResources().add( 
img/custom_header_logo.png, logoReference.getResource() );
WebApplication.get().mountResource( 
img/custom_header_logo.png, logoReference );

It makes for every mounted image new request mapper. 
Won't it be a problem for a lot of custom images?

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, October 18, 2012 16:24
 To: users@wicket.apache.org
 Subject: Re: Wicket plugin architecture
 
 On Thu, Oct 18, 2012 at 4:21 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  Thank you all for suggestions.
 
  Finally I have used Wicket's org.apache.wicket.IInitializer (as
 pointed Martin) together with
 org.apache.wicket.Application.setMetaData(MetaDataKeyT key, Object
 object) for configuration.
 
  Implementing more complex solution is not necessary unless you need
 advanced runtime plugin mechanism.
  For custom plugin CSS/JS I use metadata and render all extra resource
 references on pages.
 
  Images are mounted as shared resources. It works, but for large
 amount of images it will not be efficient.
 
 
  Question: do you know a better Wicket-way to handle custom images?
 
 Please explain how you use the shared resources and what will be not
 optimal with them. Then we can try to find a better solution.
 
 
  Best regards,
  Michal Wegrzyn
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Tuesday, September 25, 2012 10:48
  To: users@wicket.apache.org
  Subject: Re: Wicket plugin architecture
 
  Hi,
 
  The simplest way is to use Wicket's org.apache.wicket.IInitializer
  class.
  Just create a Jar (the plugin) that contains the plugin classes and
  wicket.properties in the root package and a line inside:
  initializer=com.example.MyInitializer
 
  MyInitializer#init(Application) will be called just before
  MyApp#init(). In this method you can add whatever your plugin
  provides to the global configuration
 
  On Tue, Sep 25, 2012 at 11:35 AM, Michal Wegrzyn
  michal.wegr...@onior.com wrote:
   Dear developers,
  
   I need to prepare plugin architecture for a Wicket based project.
   I've found that open source Hippo CMS (
   http://svn.onehippo.org/repos/hippo/ ) does it, but I am curious
 if
  there are any other projects that do such a thing?
  
   Do you maybe know this kind of projects or frameworks?
  
   Are there any important in-depth aspects of Wicket of which should
   I
  be aware of for creating plugin architecture?
  
   Best regards,
   Michal Wegrzyn
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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



Wicket plugin architecture

2012-09-25 Thread Michal Wegrzyn
Dear developers,

I need to prepare plugin architecture for a Wicket based project.
I've found that open source Hippo CMS ( http://svn.onehippo.org/repos/hippo/ ) 
does it, but I am
curious if there are any other projects that do such a thing?

Do you maybe know this kind of projects or frameworks?

Are there any important in-depth aspects of Wicket of which should I be aware 
of for creating plugin architecture?

Best regards,
Michal Wegrzyn


RE: IDataProvider#size()

2012-04-12 Thread Michal Wegrzyn
That's the solution which I have used for the case, where count is not possible.
It has only one slight disadvantage - if count == n*pageSize then the last page 
will be blank.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Thursday, April 12, 2012 6:06
 To: users@wicket.apache.org
 Subject: Re: IDataProvider#size()
 
 why not just fake the size to current page+1? that way you always have
 a next link and once you receive the current page you should know if
 you have more or not so  you dont have to add the one on the last
 page
 
 -igor
 
 On Wed, Apr 11, 2012 at 6:59 PM, Dan Retzlaff dretzl...@gmail.com
 wrote:
  Hi all. Time to start a thread of my own. :)
 
  Many of Wicket's powerful repeaters depend on IDataProvider. This
  interface has a size() method which returns a non-null integer. This
  makes it easy to determine the total number of pages in a pageable
  view, but IMO the required computation and application complexity are
 not always called for.
  In many cases, a pageable but open-ended data view is adequate. Have
  you experienced this impedance mismatch yourselves? What was your
 solution?
 
  To elaborate on my experience:
 
  For SQL-based views, the application complexity comes from the need
 to
  construct a count(*) query with exactly the same criteria as the
  subsequent result query. In my experience, this pollutes DAO
  interfaces and IDataProvider implementation non-trivially. We
  initially had separate methods for counting and querying (same args),
  but eventually moved to a single method that returns a
  List,Integer-tuple with both the results and total size which our
  IDataProvider caches. This lets us do some Hibernate trickery to
  introduce a MySQL SQL_CALC_FOUND_ROWS query hint, avoiding separate
  count/results queries in most cases. It's still not simple, and for
 large counts is still expensive.
 
  The situation is worse for non-SQL data stores which don't have a
  fully-functional count(*) capability. We use Cassandra whose native
  where clause support is limited, requiring significant client-side
 filtering.
  Paging through an entire column (or CF) in this way is prohibitively
  expensive, especially considering our users rarely even go to page 2.
  To solve this, we've created a parallel set of view/paging classes
  that define windows using previously discovered result keys instead
 of
  start indices (tokens and column names in Cassandra). But having a
  full suite of IUnsizedDataProvider-based classes smells. I love that
  Wicket devs have solved some tough/tedious problems with DataViewBase
  and friends, and I want to make use of them!
 
  Comments or suggestions?
 
  Cheers,
  Dan
 
 -
 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: DropDownChoice - filtering and pagination

2012-04-10 Thread Michal Wegrzyn
Hi Martin,

Sounds and looks great! 
Will it be added to wicket-core? 6.x?

Best regards,
Michal Wegrzyn


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, April 10, 2012 8:53
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice - filtering and pagination
 
 On Thu, Apr 5, 2012 at 4:32 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  Hi,
 
  What is the best way to create option components with Wicket for
 large datasets?
  DropDownChoice renders all contained items. Do you maybe know any
 wicket implementation of drop down choice which allows pagination?
 
  Other thing is filtering. I look for something similar to Dojo's
  FilteringSelect:
  http://livedocs.dojotoolkit.org/dijit/form/FilteringSelect
 
 Igor is working on http://ivaynberg.github.com/select2. He said that
 soon he will create a Wicket component for it. I guess he wont mind
 github Pull requests.
 
 
  Best regards,
  Michal Wegrzyn
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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



DropDownChoice - filtering and pagination

2012-04-05 Thread Michal Wegrzyn
Hi,

What is the best way to create option components with Wicket for large datasets?
DropDownChoice renders all contained items. Do you maybe know any wicket 
implementation of drop down choice which allows pagination?

Other thing is filtering. I look for something similar to Dojo's 
FilteringSelect:  http://livedocs.dojotoolkit.org/dijit/form/FilteringSelect

Best regards,
Michal Wegrzyn



RE: Debugging error

2012-04-04 Thread Michal Wegrzyn
Look at VoteEditForm constructor.

Form form = new Form(form,new CompoundPropertyModel(aVote)) {...}

Object aVote is null.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: SudeepShakya [mailto:shakyasud...@live.com]
 Sent: Wednesday, April 04, 2012 8:20
 To: users@wicket.apache.org
 Subject: Re: Debugging error
 
 I have attached the files.
 http://apache-wicket.1842946.n4.nabble.com/file/n4531058/Votes.java
 Votes.java
 http://apache-
 wicket.1842946.n4.nabble.com/file/n4531058/VoteEditForm.java
 VoteEditForm.java
 http://apache-
 wicket.1842946.n4.nabble.com/file/n4531058/VoteCollection.java
 VoteCollection.java
 http://apache-
 wicket.1842946.n4.nabble.com/file/n4531058/VoteCollectionJDBC.java
 VoteCollectionJDBC.java/nabblelt;nabble_a
 href=quot;VoteDisplayPage.javaquot;VoteDisplayPage.java _a
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531058.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: Debugging error

2012-04-04 Thread Michal Wegrzyn
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Wednesday, April 04, 2012 9:41
 To: users@wicket.apache.org
 Subject: Re: Debugging error
 
 On Wed, Apr 4, 2012 at 9:37 AM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  Look at VoteEditForm constructor.
 
  Form form = new Form(form,new CompoundPropertyModel(aVote)) {...}
 
  Object aVote is null.
 
 It is not null. It is misleading because there is a member field and
 constructor parameter with the same name.

I think that you are saying... about commented code ;-)

 CompoundPropertyModel also throws an exception when null is passed so
 it is immediately clear.

Is it? It seems like CompoundPropertyModel sets only its object field.

 But the pasted code is hard to read with all these comments and
 indents...
 
 
  Best regards,
  Michal Wegrzyn
 
  -Original Message-
  From: SudeepShakya [mailto:shakyasud...@live.com]
  Sent: Wednesday, April 04, 2012 8:20
  To: users@wicket.apache.org
  Subject: Re: Debugging error
 
  I have attached the files.
  http://apache-wicket.1842946.n4.nabble.com/file/n4531058/Votes.java
  Votes.java
  http://apache-
  wicket.1842946.n4.nabble.com/file/n4531058/VoteEditForm.java
  VoteEditForm.java
  http://apache-
  wicket.1842946.n4.nabble.com/file/n4531058/VoteCollection.java
  VoteCollection.java
  http://apache-
  wicket.1842946.n4.nabble.com/file/n4531058/VoteCollectionJDBC.java
  VoteCollectionJDBC.java/nabblelt;nabble_a
  href=quot;VoteDisplayPage.javaquot;VoteDisplayPage.java _a
 
  --
  View this message in context: http://apache-
  wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531058.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
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



RE: Debugging error

2012-04-04 Thread Michal Wegrzyn
We did not fight each other... We fought with your code!

Best regards,
Michal Wegrzyn

 -Original Message-
 From: SudeepShakya [mailto:shakyasud...@live.com]
 Sent: Wednesday, April 04, 2012 10:35
 To: users@wicket.apache.org
 Subject: Re: Debugging error
 
 Hello guys don't fight each other.
 What's the conclusion ??
 
 I am using wicket 1.5.3
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/Debugging-error-tp4530892p4531245.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: abort loading lazy components

2012-03-26 Thread Michal Wegrzyn
Hi,

It seems that probably WICKET-4227 is not fixed. I am still getting problems in 
1.5.5.

If I override ajax channel like:

@Override
protected AjaxChannel getChannel() {
return new AjaxChannel( 0, AjaxChannel.Type.DROP );
}

Only last item is loaded and other items are in continuous loading state - see 
WICKET-4397.

With unique channel name:

@Override
protected AjaxChannel getChannel() {
return new AjaxChannel( String.valueOf( System.currentTimeMillis() ), 
AjaxChannel.Type.DROP );
}

lazy items are loaded asynchronously, however if I try to do action which 
results in drop, I am getting the same exception as in Wicket-4227.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Michal Wegrzyn
 Sent: Tuesday, November 15, 2011 10:59
 To: 'users@wicket.apache.org'
 Subject: RE: abort loading lazy components

 Done https://issues.apache.org/jira/browse/WICKET-4227

 Best regards,
 Michal Wegrzyn

  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Monday, November 14, 2011 13:43
  To: users@wicket.apache.org
  Subject: Re: abort loading lazy components
 
  Ticket + quickstart
 
  On Mon, Nov 14, 2011 at 2:39 PM, Michal Wegrzyn
  michal.wegr...@onior.com wrote:
   Just tried with 1.5.3 - unfortunately I still get an exception.
  
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 10, 2011 14:50
   To: users@wicket.apache.org
   Subject: Re: abort loading lazy components
  
   This is fixed in 1.5.3 (currently in voting)
  
   On Thu, Nov 10, 2011 at 3:37 PM, Michal Wegrzyn
   michal.wegr...@onior.com wrote:
-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Thursday, November 10, 2011 9:48
To: users@wicket.apache.org
Subject: Re: abort loading lazy components
   
Hi,
   
I see no solution for your case.
Using BookmarkablePageLink works as you confirmed but I'm not
  aware
   of
clean way to cancel running Ajax requests and replace them with
completely new one.
   
XMLHttpRequest has #abort() method which cancels the request
 but
   this
will lead co socket close exceptions in the server side.
   
   
Right, I've already looked at XMLHttpRequest#abort(). It
 wouldn't
  be
   a clean solution anyway.
   
The best approach I see is to use the same AjaxChannel name for
  all
LazyLoadPanels and the AjaxLinks. The LazyLoadPanels should use
  type
QUEUE and the AjaxLinks - type DROP. This way all
 LazyLoadPanels
   will
load sequencially and if you click an AjaxLink it will cancel
all pending LazyLoadPanels and will schedule the execution of
the
   AjaxLink
after the end of the currently loading LazyLoadPanel
   
HTH
   
That's what I've already done - Wicket schedules and executes
   AjaxLink action (it does not wait for other lazy panels - so far,
   so good ), but then (already during handling new ajax request)
   Wicket throws exception. Isn't it a Wicket bug?
   
15:31:11.847 user [http--2] WARN
o.a.w.r.h.render.WebPageRenderer - The Buffered response should
 be
   handled by BufferedResponseRequestHandler
15:32:24.028 user [http--5] ERROR
   o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
org.apache.wicket.request.handler.ComponentNotFoundException:
  Could
   not find component
   'folders:listContainer:itemList:29:itemPanel:folder:children' on
  page
   'class package.MyPage
   at
  
 
 org.apache.wicket.request.handler.PageAndComponentProvider.getComponen
  t
   (PageAndComponentProvider.java:167)
   at
  
 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getC
  o
   mponent(ListenerInterfaceRequestHandler.java:92)
   at
  
 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.resp
  o
   nd(ListenerInterfaceRequestHandler.java:169)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(R
  e
   questCycle.java:750)
   at
  
 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSt
  a
   ck.java:64)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:
   252)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCyc
  l
   e.java:209)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R
  e
   questCycle.java:280)
   at
  
 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt
  e
   r.java:162)
   at
  
 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav
  a
   :218)
   at
  
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
  c
   ationFilterChain.java:235)
   at
  
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
  l
   terChain.java:206

RE: abort loading lazy components

2012-03-26 Thread Michal Wegrzyn
Hi Martin,

Thanks for the response. I thought that simple change in existing quickstart is 
better than completely new quickstart, but if it is more comfortable then no 
problem :)

Created https://issues.apache.org/jira/browse/WICKET-4470

Maybe WICKET-4397 can be already closed then, as WICKET-4470 describes 
everything.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, March 26, 2012 12:00
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 Hi Michal,

 Last time I tried your quickstart it was working OK with 1.5-SNAPSHOT.
 The problem is that you test with a different quickstart than the
 attached one in the ticket.
 First I made it working at 24 Nov, then you verified at 25 Nov, then I
 re-verified at 25 Jan and then you said yeah, but I changed few things
 in the app locally and it breaks again.

 Please create a new ticket with a failing quickstart. I want to run the
 app and see the problem without any interventions from my side.

 On Mon, Mar 26, 2012 at 11:41 AM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  Hi,
 
  It seems that probably WICKET-4227 is not fixed. I am still getting
 problems in 1.5.5.
 
  If I override ajax channel like:
 
  @Override
  protected AjaxChannel getChannel() {
 return new AjaxChannel( 0, AjaxChannel.Type.DROP ); }
 
  Only last item is loaded and other items are in continuous loading
 state - see WICKET-4397.
 
  With unique channel name:
 
  @Override
  protected AjaxChannel getChannel() {
 return new AjaxChannel( String.valueOf(
  System.currentTimeMillis() ), AjaxChannel.Type.DROP ); }
 
  lazy items are loaded asynchronously, however if I try to do action
 which results in drop, I am getting the same exception as in Wicket-
 4227.
 
  Best regards,
  Michal Wegrzyn
 
  -Original Message-
  From: Michal Wegrzyn
  Sent: Tuesday, November 15, 2011 10:59
  To: 'users@wicket.apache.org'
  Subject: RE: abort loading lazy components
 
  Done https://issues.apache.org/jira/browse/WICKET-4227
 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Monday, November 14, 2011 13:43
   To: users@wicket.apache.org
   Subject: Re: abort loading lazy components
  
   Ticket + quickstart
  
   On Mon, Nov 14, 2011 at 2:39 PM, Michal Wegrzyn
   michal.wegr...@onior.com wrote:
Just tried with 1.5.3 - unfortunately I still get an exception.
   
-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Thursday, November 10, 2011 14:50
To: users@wicket.apache.org
Subject: Re: abort loading lazy components
   
This is fixed in 1.5.3 (currently in voting)
   
On Thu, Nov 10, 2011 at 3:37 PM, Michal Wegrzyn
michal.wegr...@onior.com wrote:
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 10, 2011 9:48
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 Hi,

 I see no solution for your case.
 Using BookmarkablePageLink works as you confirmed but I'm
 not
   aware
of
 clean way to cancel running Ajax requests and replace them
 with completely new one.

 XMLHttpRequest has #abort() method which cancels the request
  but
this
 will lead co socket close exceptions in the server side.


 Right, I've already looked at XMLHttpRequest#abort(). It
  wouldn't
   be
a clean solution anyway.

 The best approach I see is to use the same AjaxChannel name
 for
   all
 LazyLoadPanels and the AjaxLinks. The LazyLoadPanels should
 use
   type
 QUEUE and the AjaxLinks - type DROP. This way all
  LazyLoadPanels
will
 load sequencially and if you click an AjaxLink it will
 cancel
 all pending LazyLoadPanels and will schedule the execution
 of
 the
AjaxLink
 after the end of the currently loading LazyLoadPanel

 HTH

 That's what I've already done - Wicket schedules and executes
AjaxLink action (it does not wait for other lazy panels - so
far, so good ), but then (already during handling new ajax
request) Wicket throws exception. Isn't it a Wicket bug?

 15:31:11.847 user [http--2] WARN
 o.a.w.r.h.render.WebPageRenderer - The Buffered response
 should
  be
handled by BufferedResponseRequestHandler
 15:32:24.028 user [http--5] ERROR
o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
 org.apache.wicket.request.handler.ComponentNotFoundException:
   Could
not find component
'folders:listContainer:itemList:29:itemPanel:folder:children'
 on
   page
'class package.MyPage
at
   
  
 
 org.apache.wicket.request.handler.PageAndComponentProvider.getCompone
  n
   t
(PageAndComponentProvider.java:167

RE: attributeappender not rendered / processed

2012-03-23 Thread Michal Wegrzyn
Hi Nino,

Check void org.apache.wicket.AttributeModifier.replaceAttributeValue(Component 
component, ComponentTag tag).

Probably component is not enabled or value is null. Debug if there is a need.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
 Sent: Friday, March 23, 2012 15:48
 To: users@wicket.apache.org
 Subject: attributeappender not rendered / processed
 
 Hi
 
 Im wondering what could cause a attributeappender not to be rendered?
 One thing I guess would be if the component are not enabled..
 
 heres my code:
 
 AttributeAppender attributeAppender = AttributeModifier.append(
 class, new ModelString(getCssClass()));
 triggerSchedulePanel.getFormContainer().add(attributeAppender);
 
 However the string in getCssClass() are never appended, first I tried
 in the fieldset in the form, then the form and now lastly the container
 however theres no difference, nothing are appended..
 
 --
 Best regards / Med venlig hilsen
 Nino Martinez

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



RE: attributeappender not rendered / processed

2012-03-23 Thread Michal Wegrzyn
Are you using ajax? Maybe you are adding appender but form container is not 
added to the ajax target?

Best regards,
Michal Wegrzyn

 -Original Message-
 From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
 Sent: Friday, March 23, 2012 16:20
 To: users@wicket.apache.org
 Subject: RE: attributeappender not rendered / processed
 
 Seems it never hits that for that appender...
 On Mar 23, 2012 4:11 PM, Michal Wegrzyn michal.wegr...@onior.com
 wrote:
 
  Hi Nino,
 
  Check void
  org.apache.wicket.AttributeModifier.replaceAttributeValue(Component
  component, ComponentTag tag).
 
  Probably component is not enabled or value is null. Debug if there is
  a need.
 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
   Sent: Friday, March 23, 2012 15:48
   To: users@wicket.apache.org
   Subject: attributeappender not rendered / processed
  
   Hi
  
   Im wondering what could cause a attributeappender not to be
 rendered?
   One thing I guess would be if the component are not enabled..
  
   heres my code:
  
   AttributeAppender attributeAppender = AttributeModifier.append(
   class, new ModelString(getCssClass()));
   triggerSchedulePanel.getFormContainer().add(attributeAppender);
  
   However the string in getCssClass() are never appended, first I
   tried in the fieldset in the form, then the form and now lastly the
   container however theres no difference, nothing are appended..
  
   --
   Best regards / Med venlig hilsen
   Nino Martinez
 
  -
  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: Error in dynamic form with any number of drop down ,enu

2012-03-21 Thread Michal Wegrzyn
Hi,

You should add organizationList to the registerForm object.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: kshitiz [mailto:k.agarw...@gmail.com]
 Sent: Wednesday, March 21, 2012 15:57
 To: users@wicket.apache.org
 Subject: Error in dynamic form with any number of drop down ,enu
 
 Hi,
 
 I want to create a form where user can have any number of drop down
 menus.
 Here is my code:
 
 *private ListViewDropDownChoicelt;String organizationList;* public
 Register() throws InvalidEmailException, Exception
   {
   add(new FeedbackPanel(feedbackPanel));
   final DropDownChoiceString organizationDropDown = new
 DropDownChoiceString(
   organizations, new
 PropertyModelString(this, selected), SEARCH_ENGINES);
   StatelessForm Register registerForm = new StatelessForm
 Register(registerForm, new
 CompoundPropertyModelRegister(userDomain));
   add(registerForm);
   Label nameLabel = new Label(nameLabel, Name);
 registerForm.add(nameLabel);
 RequiredTextFieldString nameField = new
 RequiredTextFieldString(name, new PropertyModelString(this,
 name));
 
 nameField.add(LengthBetweenValidator.lengthBetween(MIN_LOCATION_NAME_LE
 NGTH,
 MAX_LOCATION_NAME_LENGTH));
 registerForm.add(nameField);
 
 *this.add(organizationList = new ListView(organizationList) {
 
 /**
*
*/
   private static final long
 serialVersionUID = 1L;
 
   @Override
 protected void populateItem(final ListItem item) {
 item.add(organizationDropDown);
 
 }
 }); *
 
 
 
 
 
 Button submitButton = new Button(submitButton) {
 @Override
 public void onSubmit() {
   info(Selected search engine :  + selected);
   System.out.println(selected);
   organizationList.add(organizationDropDown);
 }
 };
 
 registerForm.add(submitButton);
 
 
   }
 
 
 
 And my html files is:
 
 form wicket:id=registerForm
   div
  label for=name wicket:id=nameLabelName/label
 input type=text id=name wicket:id=name/
 * tr wicket:id=organizationList
  tdselect wicket:id=organizations/select/td
  /tr*
 
  input type=submit value=Register
 class=formbutton
 name=Register wicket:id=submitButton/
   /div
 /form
 
 
 But I am getting the error:
 *Unable to find component with id 'organizationList' in
 [MarkupContainer [Component id = registerForm]]. *
 
 I have followed the same procedure as given in various examples in
 google.
 So what is the cause of error?
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/Error-in-dynamic-form-with-any-number-of-
 drop-down-enu-tp4492543p4492543.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: AjaxFormComponentUpdatingBehavior after validation problem

2012-03-19 Thread Michal Wegrzyn
Hi Gytis,

If you add AjaxFormSubmitBehaviour to your checkbox it should work exactly as 
Submit button.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Gytis [mailto:lietuvis...@mail.ru]
 Sent: Sunday, March 18, 2012 8:02
 To: users@wicket.apache.org
 Subject: RE: AjaxFormComponentUpdatingBehavior after validation problem
 
 Hello, Michal,
 Well, I`ve tried to make an AjaxFormSubmitBehaviour, but this doesn`t
 help, in fact it is updating component, when you click Submit button,
 and I need it updated, when clicking checkBox.
 I`ve tried to add both Ajax behaviours, still doesn`t work. Wanted to
 add some details on my code, for form submitting I use AjaxButton...
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-after-
 validation-problem-tp4477705p4481742.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: AjaxFormComponentUpdatingBehavior after validation problem

2012-03-16 Thread Michal Wegrzyn
Hi,

Did you try using AjaxCheckBox instead of CheckBox with ajax behavior?

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Gytis [mailto:lietuvis...@mail.ru]
 Sent: Friday, March 16, 2012 10:32
 To: users@wicket.apache.org
 Subject: AjaxFormComponentUpdatingBehavior after validation problem
 
 Hello, I have such a problem with AjaxFormComponentUpdatingBehavior.
 I have some DropDownChoice and a CheckBox on a Form. I need to make a
 change to DropDown, when I click on CheckBox. But as I try to submit a
 Form, got some error, and then click CheckBox DropDown doesn`t change.
 The code looks like this:
 
DropDownChoiceSomeEnum dropDownz = new
 DropDownChoiceSomeEnum(dropDownId,
   Arrays.asList(SomeEnum.values()), new
 EnumChoiceRendererSomeEnum(this));
getGenericModelObject().setValues(SomeEnum.FIRSTVALUE);
CheckBox boxz = new CheckBox(BoxId);
boxz.add(new AjaxFormComponentUpdatingBehavior(onchange)
   {
   @Override
   protected void onUpdate(AjaxRequestTarget target) {
   if (boxz.getModelObject())
   {
 
   getGenericModelObject().setValues(SomeEnum.SECONDVALUE);
   get(dropDownId).setEnabled(false);
   target.addComponent(get(dropDownId));
   }
   else
   {
   get(dropDownId).setEnabled(true);
   target.addComponent(get(dropDownId));
   }
   }
   @Override
   protected void onError(AjaxRequestTarget target,
 RuntimeException e) {
   if (boxz.getModelObject())
   {
 
   getGenericModelObject().setValues(SomeEnum.SECONDVALUE);
   get(dropDownId).setEnabled(false);
   target.addComponent(get(dropDownId));
   }
   else
   {
   get(dropDownId).setEnabled(true);
   target.addComponent(get(dropDownId));
   }
   super.onError(target, e);
   }
   });
  Form form = new Form(formId, getGenericModel());
  form.add(dropDownz);
  form.add(boxz);
 
 So as I said, after form validation, if errors occur, it won`t change
 dropdown to SECONDVALUE, but sets it as setEnabled(false), why this
 happens?
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-after-
 validation-problem-tp4477705p4477705.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: AjaxFormComponentUpdatingBehavior after validation problem

2012-03-16 Thread Michal Wegrzyn
You can try using AjaxFormSubmitBehavior instead of 
AjaxFormComponentUpdatingBehavior.

Compare 

org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior.onEvent(AjaxRequestTarget
 target)

and

org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxRequestTarget 
target)

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Gytis [mailto:lietuvis...@mail.ru]
 Sent: Friday, March 16, 2012 13:13
 To: users@wicket.apache.org
 Subject: RE: AjaxFormComponentUpdatingBehavior after validation problem
 
 Hi, Michal, I`ve tried AjaxCheckBox component, but problem is the same.
 I even made Sytem.out.println() of what object is set in DropDown, it
 shows that Object is SECONDVALUE, but still shows me FIRSTVALUE. Both
 dropDownz and CheckBox OutputMarkupId set to true.
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-after-
 validation-problem-tp4477705p4478018.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: Help required on Spring integration

2012-03-15 Thread Michal Wegrzyn
Hi Maaz,

Check wiki:

http://cwiki.apache.org/WICKET/spring.html

Recently sample quickstart integration project has been posted on the list, 
maybe you will find it useful:

http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Boilerplate-td4433541.html

Best regards,
Michal Wegrzyn


 -Original Message-
 From: Maaz Muqri [mailto:maazbinmu...@gmail.com]
 Sent: Thursday, March 15, 2012 16:39
 To: users@wicket.apache.org
 Subject: Help required on Spring integration
 
 Hi everyone,
 
 I am new to Wicket. I am currently working towards kick starting a
 project (Enterprise Application) which will use wicket-spring-
 hibernate. Could someone please share any experiences you have on
 integrating the Wicket framework with Spring. Any other resources and
 links are most welcome.
 Thanks in advance.
 
 Cheers!
 
 Maaz

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



RE: Show pdf

2012-02-20 Thread Michal Wegrzyn
Hi Javier,

Check 

org.apache.wicket.util.resource.AbstractResourceStream
org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler 

Best regards,
Michal Wegrzyn


 -Original Message-
 From: Javier Leyba [mailto:xle...@gmail.com]
 Sent: Monday, February 20, 2012 12:59
 To: users@wicket.apache.org
 Subject: Show pdf
 
 Hi
 
 I did a page that will upload a file to a folder.
 
 Another application will convert the file to pdf and left it in a
 different folder where my web app will pick it up and show it.
 
 How can I show that pdf?
 
 I have checked many tutorials, even in wicket how-to, but all of them
 are using DynamicWebResource or some other classes that seems were
 deprecated on Wicket 1.5.
 
 Thanks in advance!
 
 
 Regards
 
 --
 Javier Leyba
 Barcelona - Spain
 http://blog.leyba.com.ar
 http://www.leybafendrik.com.ar
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



RE: 1.5 Behaviors

2012-02-08 Thread Michal Wegrzyn
You can try to check whether your behavior works without other behaviors. Even 
without behaviors on children - maybe there are conflicting behaviors attached 
to the same event?

You can also try to use a Panel for your fieldset element and place container 
higher in hierarchy.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Michal Wegrzyn
 Sent: Thursday, February 02, 2012 15:05
 To: 'users@wicket.apache.org'
 Subject: RE: 1.5 Behaviors
 
 Are they any other behaviors attached?
 
 Best regards,
 Michal Wegrzyn
 
  -Original Message-
  From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
  Sent: Thursday, February 02, 2012 14:00
  To: users@wicket.apache.org
  Subject: Re: 1.5 Behaviors
 
  Any clue on what it could be?
 
  2012/2/2 nino martinez wael nino.martinez.w...@gmail.com
 
   it's never called on the behavior and neither are isEnabled... It
  must be
   something higher up the hierarchy that are stopping the behavior
   processing..
  
  
  
   2012/2/2 Martin Grigorov mgrigo...@apache.org
  
   See org.apache.wicket.Component#canCallListenerInterface
  
   On Thu, Feb 2, 2012 at 12:25 PM, nino martinez wael
   nino.martinez.w...@gmail.com wrote:
Hi
   
What can cause a behavior not to be processed?
   
I have a structure like this:
   
Form
--FieldSet
---inputs...
   
I have an appender on the fieldset which is a
 webmarkupcontainer.
   However
it never gets processed.. In this case the Form are disabled.
 Ive
  also
tried overriding the enabled property of the webmarkupcontainer
 it
   makes no
difference.
   
   
regards Nino
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.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 Behaviors

2012-02-02 Thread Michal Wegrzyn
Are they any other behaviors attached?

Best regards,
Michal Wegrzyn

 -Original Message-
 From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
 Sent: Thursday, February 02, 2012 14:00
 To: users@wicket.apache.org
 Subject: Re: 1.5 Behaviors
 
 Any clue on what it could be?
 
 2012/2/2 nino martinez wael nino.martinez.w...@gmail.com
 
  it's never called on the behavior and neither are isEnabled... It
 must be
  something higher up the hierarchy that are stopping the behavior
  processing..
 
 
 
  2012/2/2 Martin Grigorov mgrigo...@apache.org
 
  See org.apache.wicket.Component#canCallListenerInterface
 
  On Thu, Feb 2, 2012 at 12:25 PM, nino martinez wael
  nino.martinez.w...@gmail.com wrote:
   Hi
  
   What can cause a behavior not to be processed?
  
   I have a structure like this:
  
   Form
   --FieldSet
   ---inputs...
  
   I have an appender on the fieldset which is a webmarkupcontainer.
  However
   it never gets processed.. In this case the Form are disabled. Ive
 also
   tried overriding the enabled property of the webmarkupcontainer it
  makes no
   difference.
  
  
   regards Nino
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.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: help with form submit

2012-01-31 Thread Michal Wegrzyn
Maybe you will find this useful:

http://println.posterous.com/wicket-automatic-ajax-form-validation-marking

Best regards,
Michal Wegrzyn

 -Original Message-
 From: srinash [mailto:avisrid...@gmail.com]
 Sent: Tuesday, January 31, 2012 10:07
 To: users@wicket.apache.org
 Subject: Re: help with form submit
 
 Thanks for the reply. I will need to use Ajax as i would not want to
 refresh
 the page. CAn you let me know how I can do this by using a
 fallbackbutton,
 an example would be good.
 
 thank you
 
 --
 View this message in context: http://apache-
 wicket.1842946.n4.nabble.com/help-with-form-submit-
 tp4343850p4343890.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: Doing an action on press of key in a form

2012-01-19 Thread Michal Wegrzyn
AjaxFormComponentUpdatingBehavior must be used on a FormComponent (sub)class.

Best Regards,
Michal Wegrzyn

 -Original Message-
 From: Krishna Mohan [mailto:k.krishnamoha...@gmail.com]
 Sent: Thursday, January 19, 2012 9:32
 To: users@wicket.apache.org
 Subject: Re: Doing an action on press of key in a form
 
 i get below error on using AjaxFormComponentUpdatingBehavior
 
 WicketMessage: Behavior
 nl.planon.hera.filters.quicksearch.PnWebAdvancedSearchPanel$3 can only
 be added
 to an instance of a FormComponentRoot
 cause:org.apache.wicket.WicketRuntimeException: Behavior
 nl.planon.hera.filters.quicksearch.PnWebAdvancedSearchPanel$3 can only
 be added
 to an instance of a FormComponent
 
 
 -
 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



AjaxLazyLoadPanel not loading in IE

2012-01-13 Thread Michal Wegrzyn
Hi,

I have seen that AjaxLazyLoadPanel does not load in IE 9.0 with Wicket 1.5.3.

What is insteresting, it does not load for me only at the first time after 
login.
Scenario: lazy panels are placed on ListItems and after login they are 
constantly in loading state. When ListItems are replaced (so lazy panels are 
also created over again), lazy panels are loaded successfully.

Wicket example at http://wicketstuff.org/wicket/ajax/lazy-loading?0 does not 
work either.
I have found https://issues.apache.org/jira/browse/WICKET-4157 , could that be 
a regression?


Another question: what are your (Wicket team) plans for Wicket 1.5.x and 6.0? 
Is 6.0 an experimental or do you plan in the future to focus on 6.0 as a base?

Best regards
Michal Wegrzyn


RE: AjaxFormComponentUpdatingBehavior, required fields and validation

2012-01-05 Thread Michal Wegrzyn
Right, using AjaxFormSubmitBehavior (extending AjaxFormValidatingBehavior 
precisely) and removing all AjaxFormComponentUpdatingBehaviors  did the trick 
in this case.

After checking JavaDoc I thought that AjaxFormSubmitBehavior can be used only 
at exact submit phase, but after checking code everything was clear.

Thanks for your help.

Michal

 -Original Message-
 From: Sven Meier [mailto:s...@meiers.net]
 Sent: Tuesday, January 03, 2012 11:45
 To: users@wicket.apache.org
 Subject: Re: AjaxFormComponentUpdatingBehavior, required fields and
 validation
 
 AjaxFormComponentUpdatingBehavior processes a single component only
 (change input, validate, convert), so it doesn't make sense to validate
 all components.
 In that case you should use AjaxFormSubmitBehavior, which processes the
 whole form.
 
 Sven
 
 
 Am 03.01.2012 10:26, schrieb Michal Wegrzyn:
  Hi Sven,
 
  When event is triggered I check all components with #isValid().
  I am not sure if validation is performed after every ajax update or
 only after submit?
 
  I am aware of AjaxFormSubmitBehavior, but I want to check fields
 after every user action, so user can know error immediately and not
 only after submit.
 
  Best regards,
  Michal
 
  -Original Message-
  From: Sven Meier [mailto:s...@meiers.net]
  Sent: Tuesday, January 03, 2012 10:13
  To: users@wicket.apache.org
  Subject: Re: AjaxFormComponentUpdatingBehavior, required fields and
  validation
 
  Hi,
 
  are you validating all form components or just the one which
 triggered
  the ajax request?
 
  You know AjaxFormSubmitBehavior?
 
  Sven
 
  Am 03.01.2012 09:32, schrieb Michal Wegrzyn:
  Any ideas here? Should I provide a quickstart?
 
  Best regards,
  Michal Wegrzyn
 
  -Original Message-
  From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
  Sent: Monday, December 19, 2011 23:07
  To: users@wicket.apache.org
  Subject: AjaxFormComponentUpdatingBehavior, required fields and
  validation
 
  Hi,
 
  I have form with few TextField and DropDownChoice components. All
 of
  them have added AjaxFormComponentUpdatingBehavior( onkeyup ) and
  are
  set as required. Some of them are wrapped in my custom objects,
 but
  it
  does not matter (validation and processing logic is in behavior).
 
  With this setup after every ajax update triggered with behaviour's
  onUpdate( AjaxRequestTarget ) or onError( AjaxRequestTarget ) I
 try
  to
  check if form components are valid and give instant feedback to
  user.
  Unfortunately results obtained from component's isValid() are
 wrong.
  Empty TextFields are almost always valid.
  Only after clearing TextField error is added to component, but
 after
  changing for example other TextField to whatever value (and thus
  triggering next validation check) isValid() on blank, required
  TextField returns true.
 
  Is this approach incorrect or am I missing something?
 
  Best regards,
  Michal Wegrzyn
 
  ---
 --
  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: AjaxFormComponentUpdatingBehavior, required fields and validation

2012-01-04 Thread Michal Wegrzyn
select elements have onchange of course.
Forgot over them at that point (ontired occurred).

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, January 03, 2012 10:20
 To: users@wicket.apache.org
 Subject: Re: AjaxFormComponentUpdatingBehavior, required fields and
 validation
 
 Additionally keyup for select is not the best event.
 People prefer using the mouse to change the value.
 
 On Tue, Jan 3, 2012 at 11:13 AM, Sven Meier s...@meiers.net wrote:
  Hi,
 
  are you validating all form components or just the one which
 triggered the
  ajax request?
 
  You know AjaxFormSubmitBehavior?
 
  Sven
 
  Am 03.01.2012 09:32, schrieb Michal Wegrzyn:
 
  Any ideas here? Should I provide a quickstart?
 
  Best regards,
  Michal Wegrzyn
 
  -Original Message-
  From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
  Sent: Monday, December 19, 2011 23:07
  To: users@wicket.apache.org
  Subject: AjaxFormComponentUpdatingBehavior, required fields and
  validation
 
  Hi,
 
  I have form with few TextField and DropDownChoice components. All
 of
  them have added AjaxFormComponentUpdatingBehavior( onkeyup ) and
 are
  set as required. Some of them are wrapped in my custom objects, but
 it
  does not matter (validation and processing logic is in behavior).
 
  With this setup after every ajax update triggered with behaviour's
  onUpdate( AjaxRequestTarget ) or onError( AjaxRequestTarget ) I try
 to
  check if form components are valid and give instant feedback to
 user.
 
  Unfortunately results obtained from component's isValid() are
 wrong.
  Empty TextFields are almost always valid.
  Only after clearing TextField error is added to component, but
 after
  changing for example other TextField to whatever value (and thus
  triggering next validation check) isValid() on blank, required
  TextField returns true.
 
  Is this approach incorrect or am I missing something?
 
  Best regards,
  Michal Wegrzyn
 
 
  
 -
  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
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



RE: AjaxFormComponentUpdatingBehavior, required fields and validation

2012-01-03 Thread Michal Wegrzyn
Any ideas here? Should I provide a quickstart?

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
 Sent: Monday, December 19, 2011 23:07
 To: users@wicket.apache.org
 Subject: AjaxFormComponentUpdatingBehavior, required fields and
 validation
 
 Hi,
 
 I have form with few TextField and DropDownChoice components. All of
 them have added AjaxFormComponentUpdatingBehavior( onkeyup ) and are
 set as required. Some of them are wrapped in my custom objects, but it
 does not matter (validation and processing logic is in behavior).
 
 With this setup after every ajax update triggered with behaviour's
 onUpdate( AjaxRequestTarget ) or onError( AjaxRequestTarget ) I try to
 check if form components are valid and give instant feedback to user.
 
 Unfortunately results obtained from component's isValid() are wrong.
 Empty TextFields are almost always valid.
 Only after clearing TextField error is added to component, but after
 changing for example other TextField to whatever value (and thus
 triggering next validation check) isValid() on blank, required
 TextField returns true.
 
 Is this approach incorrect or am I missing something?
 
 Best regards,
 Michal Wegrzyn
 


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



RE: AjaxFormComponentUpdatingBehavior, required fields and validation

2012-01-03 Thread Michal Wegrzyn
Hi Sven,

When event is triggered I check all components with #isValid().
I am not sure if validation is performed after every ajax update or only after 
submit?

I am aware of AjaxFormSubmitBehavior, but I want to check fields after every 
user action, so user can know error immediately and not only after submit.

Best regards,
Michal

 -Original Message-
 From: Sven Meier [mailto:s...@meiers.net]
 Sent: Tuesday, January 03, 2012 10:13
 To: users@wicket.apache.org
 Subject: Re: AjaxFormComponentUpdatingBehavior, required fields and
 validation
 
 Hi,
 
 are you validating all form components or just the one which triggered
 the ajax request?
 
 You know AjaxFormSubmitBehavior?
 
 Sven
 
 Am 03.01.2012 09:32, schrieb Michal Wegrzyn:
  Any ideas here? Should I provide a quickstart?
 
  Best regards,
  Michal Wegrzyn
 
  -Original Message-
  From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
  Sent: Monday, December 19, 2011 23:07
  To: users@wicket.apache.org
  Subject: AjaxFormComponentUpdatingBehavior, required fields and
  validation
 
  Hi,
 
  I have form with few TextField and DropDownChoice components. All of
  them have added AjaxFormComponentUpdatingBehavior( onkeyup ) and
 are
  set as required. Some of them are wrapped in my custom objects, but
 it
  does not matter (validation and processing logic is in behavior).
 
  With this setup after every ajax update triggered with behaviour's
  onUpdate( AjaxRequestTarget ) or onError( AjaxRequestTarget ) I try
 to
  check if form components are valid and give instant feedback to
 user.
 
  Unfortunately results obtained from component's isValid() are wrong.
  Empty TextFields are almost always valid.
  Only after clearing TextField error is added to component, but after
  changing for example other TextField to whatever value (and thus
  triggering next validation check) isValid() on blank, required
  TextField returns true.
 
  Is this approach incorrect or am I missing something?
 
  Best regards,
  Michal Wegrzyn
 
 
  -
  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



AjaxFormComponentUpdatingBehavior, required fields and validation

2011-12-19 Thread Michal Wegrzyn
Hi,

I have form with few TextField and DropDownChoice components. All of them have 
added AjaxFormComponentUpdatingBehavior( onkeyup ) and are set as required. 
Some of them are wrapped in my custom objects, but it does not matter 
(validation and processing logic is in behavior).

With this setup after every ajax update triggered with behaviour's onUpdate( 
AjaxRequestTarget ) or onError( AjaxRequestTarget ) I try to check if form 
components are valid and give instant feedback to user.

Unfortunately results obtained from component's isValid() are wrong. Empty 
TextFields are almost always valid.
Only after clearing TextField error is added to component, but after changing 
for example other TextField to whatever value (and thus triggering next 
validation check) isValid() on blank, required TextField returns true.

Is this approach incorrect or am I missing something?

Best regards,
Michal Wegrzyn




RE: abort loading lazy components

2011-11-15 Thread Michal Wegrzyn
Done https://issues.apache.org/jira/browse/WICKET-4227

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 14, 2011 13:43
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 Ticket + quickstart

 On Mon, Nov 14, 2011 at 2:39 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  Just tried with 1.5.3 - unfortunately I still get an exception.
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Thursday, November 10, 2011 14:50
  To: users@wicket.apache.org
  Subject: Re: abort loading lazy components
 
  This is fixed in 1.5.3 (currently in voting)
 
  On Thu, Nov 10, 2011 at 3:37 PM, Michal Wegrzyn
  michal.wegr...@onior.com wrote:
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 10, 2011 9:48
   To: users@wicket.apache.org
   Subject: Re: abort loading lazy components
  
   Hi,
  
   I see no solution for your case.
   Using BookmarkablePageLink works as you confirmed but I'm not
 aware
  of
   clean way to cancel running Ajax requests and replace them with
   completely new one.
  
   XMLHttpRequest has #abort() method which cancels the request but
  this
   will lead co socket close exceptions in the server side.
  
  
   Right, I've already looked at XMLHttpRequest#abort(). It wouldn't
 be
  a clean solution anyway.
  
   The best approach I see is to use the same AjaxChannel name for
 all
   LazyLoadPanels and the AjaxLinks. The LazyLoadPanels should use
 type
   QUEUE and the AjaxLinks - type DROP. This way all LazyLoadPanels
  will
   load sequencially and if you click an AjaxLink it will cancel all
   pending LazyLoadPanels and will schedule the execution of the
  AjaxLink
   after the end of the currently loading LazyLoadPanel
  
   HTH
  
   That's what I've already done - Wicket schedules and executes
  AjaxLink action (it does not wait for other lazy panels - so far, so
  good ), but then (already during handling new ajax request) Wicket
  throws exception. Isn't it a Wicket bug?
  
   15:31:11.847 user [http--2] WARN
   o.a.w.r.h.render.WebPageRenderer - The Buffered response should be
  handled by BufferedResponseRequestHandler
   15:32:24.028 user [http--5] ERROR
  o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
   org.apache.wicket.request.handler.ComponentNotFoundException:
 Could
  not find component
  'folders:listContainer:itemList:29:itemPanel:folder:children' on
 page
  'class package.MyPage
  at
 
 org.apache.wicket.request.handler.PageAndComponentProvider.getComponent
  (PageAndComponentProvider.java:167)
  at
 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getCo
  mponent(ListenerInterfaceRequestHandler.java:92)
  at
 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respo
  nd(ListenerInterfaceRequestHandler.java:169)
  at
 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Re
  questCycle.java:750)
  at
 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSta
  ck.java:64)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:
  252)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycl
  e.java:209)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Re
  questCycle.java:280)
  at
 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilte
  r.java:162)
  at
 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
  :218)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
  ationFilterChain.java:235)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
  terChain.java:206)
  at
 
 package.MyRequestContextFilter.doFilter(MyRequestContextFilter.java:43)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
  ationFilterChain.java:235)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
  terChain.java:206)
  at
 
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
  Filter(FilterChainProxy.java:368)
  at
 
 org.springframework.security.web.access.intercept.FilterSecurityInterce
  ptor.invoke(FilterSecurityInterceptor.java:109)
  at
 
 org.springframework.security.web.access.intercept.FilterSecurityInterce
  ptor.doFilter(FilterSecurityInterceptor.java:83)
  at
 
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
  Filter(FilterChainProxy.java:380)
  at
 
 org.springframework.security.web.access.ExceptionTranslationFilter.doFi
  lter(ExceptionTranslationFilter.java:97)
  at
 
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do

RE: abort loading lazy components

2011-11-14 Thread Michal Wegrzyn
Just tried with 1.5.3 - unfortunately I still get an exception.

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 10, 2011 14:50
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 This is fixed in 1.5.3 (currently in voting)

 On Thu, Nov 10, 2011 at 3:37 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Thursday, November 10, 2011 9:48
  To: users@wicket.apache.org
  Subject: Re: abort loading lazy components
 
  Hi,
 
  I see no solution for your case.
  Using BookmarkablePageLink works as you confirmed but I'm not aware
 of
  clean way to cancel running Ajax requests and replace them with
  completely new one.
 
  XMLHttpRequest has #abort() method which cancels the request but
 this
  will lead co socket close exceptions in the server side.
 
 
  Right, I've already looked at XMLHttpRequest#abort(). It wouldn't be
 a clean solution anyway.
 
  The best approach I see is to use the same AjaxChannel name for all
  LazyLoadPanels and the AjaxLinks. The LazyLoadPanels should use type
  QUEUE and the AjaxLinks - type DROP. This way all LazyLoadPanels
 will
  load sequencially and if you click an AjaxLink it will cancel all
  pending LazyLoadPanels and will schedule the execution of the
 AjaxLink
  after the end of the currently loading LazyLoadPanel
 
  HTH
 
  That's what I've already done - Wicket schedules and executes
 AjaxLink action (it does not wait for other lazy panels - so far, so
 good ), but then (already during handling new ajax request) Wicket
 throws exception. Isn't it a Wicket bug?
 
  15:31:11.847 user [http--2] WARN
  o.a.w.r.h.render.WebPageRenderer - The Buffered response should be
 handled by BufferedResponseRequestHandler
  15:32:24.028 user [http--5] ERROR
 o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
  org.apache.wicket.request.handler.ComponentNotFoundException: Could
 not find component
 'folders:listContainer:itemList:29:itemPanel:folder:children' on page
 'class package.MyPage
 at
 org.apache.wicket.request.handler.PageAndComponentProvider.getComponent
 (PageAndComponentProvider.java:167)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getCo
 mponent(ListenerInterfaceRequestHandler.java:92)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respo
 nd(ListenerInterfaceRequestHandler.java:169)
 at
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Re
 questCycle.java:750)
 at
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSta
 ck.java:64)
 at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:
 252)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycl
 e.java:209)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Re
 questCycle.java:280)
 at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilte
 r.java:162)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
 :218)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 ationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 terChain.java:206)
 at
 package.MyRequestContextFilter.doFilter(MyRequestContextFilter.java:43)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 ationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 terChain.java:206)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:368)
 at
 org.springframework.security.web.access.intercept.FilterSecurityInterce
 ptor.invoke(FilterSecurityInterceptor.java:109)
 at
 org.springframework.security.web.access.intercept.FilterSecurityInterce
 ptor.doFilter(FilterSecurityInterceptor.java:83)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.access.ExceptionTranslationFilter.doFi
 lter(ExceptionTranslationFilter.java:97)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.session.SessionManagementFilter.doFilt
 er(SessionManagementFilter.java:100)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.authentication.AnonymousAuthentication
 Filter.doFilter(AnonymousAuthenticationFilter.java:78)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380

RE: abort loading lazy components

2011-11-10 Thread Michal Wegrzyn
Hi,

Could you please tell me what is the status of this issue?
Should I create a Jira issue and/or quickstart or is it won't fix/invalid?

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
 Sent: Friday, November 04, 2011 11:56
 To: users@wicket.apache.org
 Subject: RE: abort loading lazy components
 
 Thanks for an update Martin.
 
 Unfortunately using IAjaxCallDecorator#decorateScript() prevents
 handling request (nothing happens).
 If I append the stop script directly to ajax request target (before
 sending event), then request proceeds, but the first lazy component is
 not loaded.
 
 Also, the stop script breaks ajax indicators (both from lazy components
 and indicating links). Exceptions still are present, but page isn't
 crashing.
 
 So far the closest solution was using BookmarkablePageLink, but it is
 not ajax and it is just a workaround.
 
 Isn't there a way to prevent Wicket from handling old ajax requests?
 I assume that's how it should work with DROP channel.
 
 Best regards,
 Michal Wegrzyn
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Thursday, November 03, 2011 17:54
  To: users@wicket.apache.org
  Subject: Re: abort loading lazy components
 
  Here is something that I didn't know so far:
  http://stackoverflow.com/questions/930237/javascript-cancel-stop-
 image-
  requests/1468452#1468452
 
  It seems there is a way to simulate browser's stop button with
  JavaScript.
  Try to use that code from IAjaxCallDecorator#decorateScript() for
 your
  AjaxLink.
 
  On Thu, Nov 3, 2011 at 3:00 PM, Michal Wegrzyn
  michal.wegr...@onior.com wrote:
   I've just debugged and indeed problem is that there is no component
  with id 29.
   So clearly Wicket looks for an lazy children component from
  outdated DataView component.
  
   Michal
  
   -Original Message-
   From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
   Sent: Wednesday, November 02, 2011 16:11
   To: users@wicket.apache.org
   Subject: RE: abort loading lazy components
  
   It is triggered when there is already new itemList (it extends
   DataView), so I suppose that
   PageAndComponentProvider looks for itemList:29, which does not
  exists
   anymore.
  
   Scenario:
  
   - Page is loaded but lazy components
   ('folders:listContainer:itemList:itemPanel:folder:children') are
  still
   loading
   - User triggers folder change (itemList is replaced)
   - Exception occurs
  
   If user triggers folder change when lazy components are completely
   loaded (or during loading the last one) there is no exception at
  all.
  
   Best Regards,
   Michal Wegrzyn
  
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Wednesday, November 02, 2011 15:54
   To: users@wicket.apache.org
   Subject: Re: abort loading lazy components
  
   On Wed, Nov 2, 2011 at 4:49 PM, Michal Wegrzyn
   michal.wegr...@onior.com wrote:
15:32:24.028 user [http--5] ERROR
   o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
org.apache.wicket.request.handler.ComponentNotFoundException:
  Could
   not find component
   'folders:listContainer:itemList:29:itemPanel:folder:children' on
  page
   'class package.MyPage
  
   Do you know how this is triggered ?
  
  
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org



RE: abort loading lazy components

2011-11-10 Thread Michal Wegrzyn
)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
at 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
15:32:24.183 user [http--2] WARN  o.a.w.r.h.render.WebPageRenderer - The 
Buffered response should be handled by BufferedResponseRequestHandler


 On Thu, Nov 10, 2011 at 10:37 AM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  Hi,
 
  Could you please tell me what is the status of this issue?
  Should I create a Jira issue and/or quickstart or is it won't
 fix/invalid?
 
  Best regards,
  Michal Wegrzyn
 
  -Original Message-
  From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
  Sent: Friday, November 04, 2011 11:56
  To: users@wicket.apache.org
  Subject: RE: abort loading lazy components
 
  Thanks for an update Martin.
 
  Unfortunately using IAjaxCallDecorator#decorateScript() prevents
  handling request (nothing happens).
  If I append the stop script directly to ajax request target (before
  sending event), then request proceeds, but the first lazy component
 is
  not loaded.
 
  Also, the stop script breaks ajax indicators (both from lazy
 components
  and indicating links). Exceptions still are present, but page isn't
  crashing.
 
  So far the closest solution was using BookmarkablePageLink, but it
 is
  not ajax and it is just a workaround.
 
  Isn't there a way to prevent Wicket from handling old ajax
 requests?
  I assume that's how it should work with DROP channel.
 
  Best regards,
  Michal Wegrzyn
 
   -Original Message-
   From: Martin Grigorov [mailto:mgrigo...@apache.org]
   Sent: Thursday, November 03, 2011 17:54
   To: users@wicket.apache.org
   Subject: Re: abort loading lazy components
  
   Here is something that I didn't know so far:
   http://stackoverflow.com/questions/930237/javascript-cancel-stop-
  image-
   requests/1468452#1468452
  
   It seems there is a way to simulate browser's stop button with
   JavaScript.
   Try to use that code from IAjaxCallDecorator#decorateScript() for
  your
   AjaxLink.
  
   On Thu, Nov 3

AjaxLazyLoadPanel changes

2011-11-10 Thread Michal Wegrzyn
Hi,

Is it possible to apply two changes for AjaxLazyLoadPanel 
(apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel)?

- Can LAZY_LOAD_COMPONENT_ID be public? Sometimes id is needed beforehand.
- AjaxLazyLoadPanel uses anonymous AbstractDefaultAjaxBehavior, so AjaxChannel 
cannot be easily overridden. Is it possible to introduce 
AjaxLazyLoadPanel#getChannel() ?

Best regards,
Michal Wegrzyn



RE: abort loading lazy components

2011-11-10 Thread Michal Wegrzyn
That's great, thanks. I'll try it ASAP.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 10, 2011 14:50
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 This is fixed in 1.5.3 (currently in voting)

 On Thu, Nov 10, 2011 at 3:37 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Thursday, November 10, 2011 9:48
  To: users@wicket.apache.org
  Subject: Re: abort loading lazy components
 
  Hi,
 
  I see no solution for your case.
  Using BookmarkablePageLink works as you confirmed but I'm not aware
 of
  clean way to cancel running Ajax requests and replace them with
  completely new one.
 
  XMLHttpRequest has #abort() method which cancels the request but
 this
  will lead co socket close exceptions in the server side.
 
 
  Right, I've already looked at XMLHttpRequest#abort(). It wouldn't be
 a clean solution anyway.
 
  The best approach I see is to use the same AjaxChannel name for all
  LazyLoadPanels and the AjaxLinks. The LazyLoadPanels should use type
  QUEUE and the AjaxLinks - type DROP. This way all LazyLoadPanels
 will
  load sequencially and if you click an AjaxLink it will cancel all
  pending LazyLoadPanels and will schedule the execution of the
 AjaxLink
  after the end of the currently loading LazyLoadPanel
 
  HTH
 
  That's what I've already done - Wicket schedules and executes
 AjaxLink action (it does not wait for other lazy panels - so far, so
 good ), but then (already during handling new ajax request) Wicket
 throws exception. Isn't it a Wicket bug?
 
  15:31:11.847 user [http--2] WARN
  o.a.w.r.h.render.WebPageRenderer - The Buffered response should be
 handled by BufferedResponseRequestHandler
  15:32:24.028 user [http--5] ERROR
 o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
  org.apache.wicket.request.handler.ComponentNotFoundException: Could
 not find component
 'folders:listContainer:itemList:29:itemPanel:folder:children' on page
 'class package.MyPage
 at
 org.apache.wicket.request.handler.PageAndComponentProvider.getComponent
 (PageAndComponentProvider.java:167)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getCo
 mponent(ListenerInterfaceRequestHandler.java:92)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respo
 nd(ListenerInterfaceRequestHandler.java:169)
 at
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Re
 questCycle.java:750)
 at
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSta
 ck.java:64)
 at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:
 252)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycl
 e.java:209)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Re
 questCycle.java:280)
 at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilte
 r.java:162)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
 :218)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 ationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 terChain.java:206)
 at
 package.MyRequestContextFilter.doFilter(MyRequestContextFilter.java:43)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 ationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 terChain.java:206)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:368)
 at
 org.springframework.security.web.access.intercept.FilterSecurityInterce
 ptor.invoke(FilterSecurityInterceptor.java:109)
 at
 org.springframework.security.web.access.intercept.FilterSecurityInterce
 ptor.doFilter(FilterSecurityInterceptor.java:83)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.access.ExceptionTranslationFilter.doFi
 lter(ExceptionTranslationFilter.java:97)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.session.SessionManagementFilter.doFilt
 er(SessionManagementFilter.java:100)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.authentication.AnonymousAuthentication
 Filter.doFilter(AnonymousAuthenticationFilter.java:78)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java

RE: abort loading lazy components

2011-11-04 Thread Michal Wegrzyn
Thanks for an update Martin.

Unfortunately using IAjaxCallDecorator#decorateScript() prevents handling 
request (nothing happens).
If I append the stop script directly to ajax request target (before sending 
event), then request proceeds, but the first lazy component is not loaded.

Also, the stop script breaks ajax indicators (both from lazy components and 
indicating links). Exceptions still are present, but page isn't crashing.

So far the closest solution was using BookmarkablePageLink, but it is not ajax 
and it is just a workaround.

Isn't there a way to prevent Wicket from handling old ajax requests? I assume 
that's how it should work with DROP channel.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Thursday, November 03, 2011 17:54
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components
 
 Here is something that I didn't know so far:
 http://stackoverflow.com/questions/930237/javascript-cancel-stop-image-
 requests/1468452#1468452
 
 It seems there is a way to simulate browser's stop button with
 JavaScript.
 Try to use that code from IAjaxCallDecorator#decorateScript() for your
 AjaxLink.
 
 On Thu, Nov 3, 2011 at 3:00 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  I've just debugged and indeed problem is that there is no component
 with id 29.
  So clearly Wicket looks for an lazy children component from
 outdated DataView component.
 
  Michal
 
  -Original Message-
  From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
  Sent: Wednesday, November 02, 2011 16:11
  To: users@wicket.apache.org
  Subject: RE: abort loading lazy components
 
  It is triggered when there is already new itemList (it extends
  DataView), so I suppose that
  PageAndComponentProvider looks for itemList:29, which does not
 exists
  anymore.
 
  Scenario:
 
  - Page is loaded but lazy components
  ('folders:listContainer:itemList:itemPanel:folder:children') are
 still
  loading
  - User triggers folder change (itemList is replaced)
  - Exception occurs
 
  If user triggers folder change when lazy components are completely
  loaded (or during loading the last one) there is no exception at
 all.
 
  Best Regards,
  Michal Wegrzyn
 
  -Original Message-
  From: Martin Grigorov [mailto:mgrigo...@apache.org]
  Sent: Wednesday, November 02, 2011 15:54
  To: users@wicket.apache.org
  Subject: Re: abort loading lazy components
 
  On Wed, Nov 2, 2011 at 4:49 PM, Michal Wegrzyn
  michal.wegr...@onior.com wrote:
   15:32:24.028 user [http--5] ERROR
  o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
   org.apache.wicket.request.handler.ComponentNotFoundException:
 Could
  not find component
  'folders:listContainer:itemList:29:itemPanel:folder:children' on
 page
  'class package.MyPage
 
  Do you know how this is triggered ?
 
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



RE: abort loading lazy components

2011-11-03 Thread Michal Wegrzyn
Disabling request logger didn't help, however if this only a trace issue then 
it does not matter through.

Even if not, then still this is caused by the main issue, which is that 
probably Wicket tries to get lazy component that should be dropped.

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Wednesday, November 02, 2011 15:54
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 On Wed, Nov 2, 2011 at 4:49 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  I've updated to Wicket 1.5.2 and I can see also some warnings
 surrounding exceptions.
  Is it a bug or am I missing something?
 
  Below full log:
 
  15:31:11.847 user [http--2] WARN
  o.a.w.r.h.render.WebPageRenderer - The Buffered response should be
 handled by BufferedResponseRequestHandler

 WICKET-4163
 More or less harmless.

  15:32:24.028 user [http--5] ERROR
 o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
  org.apache.wicket.request.handler.ComponentNotFoundException: Could
 not find component
 'folders:listContainer:itemList:29:itemPanel:folder:children' on page
 'class package.MyPage

 Do you know how this is triggered ?

 at
 org.apache.wicket.request.handler.PageAndComponentProvider.getComponent
 (PageAndComponentProvider.java:167)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getCo
 mponent(ListenerInterfaceRequestHandler.java:92)
 at
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respo
 nd(ListenerInterfaceRequestHandler.java:169)
 at
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Re
 questCycle.java:750)
 at
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSta
 ck.java:64)
 at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:
 252)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycl
 e.java:209)
 at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Re
 questCycle.java:280)
 at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilte
 r.java:162)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
 :218)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 ationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 terChain.java:206)
 at
 package.MyRequestContextFilter.doFilter(MyRequestContextFilter.java:43)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 ationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 terChain.java:206)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:368)
 at
 org.springframework.security.web.access.intercept.FilterSecurityInterce
 ptor.invoke(FilterSecurityInterceptor.java:109)
 at
 org.springframework.security.web.access.intercept.FilterSecurityInterce
 ptor.doFilter(FilterSecurityInterceptor.java:83)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.access.ExceptionTranslationFilter.doFi
 lter(ExceptionTranslationFilter.java:97)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.session.SessionManagementFilter.doFilt
 er(SessionManagementFilter.java:100)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.authentication.AnonymousAuthentication
 Filter.doFilter(AnonymousAuthenticationFilter.java:78)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.servletapi.SecurityContextHolderAwareR
 equestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.savedrequest.RequestCacheAwareFilter.d
 oFilter(RequestCacheAwareFilter.java:35)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.authentication.AbstractAuthenticationP
 rocessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:18
 7)
 at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.do
 Filter(FilterChainProxy.java:380)
 at
 org.springframework.security.web.authentication.logout.LogoutFilter.doF
 ilter

RE: abort loading lazy components

2011-11-03 Thread Michal Wegrzyn
I've just debugged and indeed problem is that there is no component with id 
29.
So clearly Wicket looks for an lazy children component from outdated DataView 
component.

Michal

 -Original Message-
 From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
 Sent: Wednesday, November 02, 2011 16:11
 To: users@wicket.apache.org
 Subject: RE: abort loading lazy components
 
 It is triggered when there is already new itemList (it extends
 DataView), so I suppose that
 PageAndComponentProvider looks for itemList:29, which does not exists
 anymore.
 
 Scenario:
 
 - Page is loaded but lazy components
 ('folders:listContainer:itemList:itemPanel:folder:children') are still
 loading
 - User triggers folder change (itemList is replaced)
 - Exception occurs
 
 If user triggers folder change when lazy components are completely
 loaded (or during loading the last one) there is no exception at all.
 
 Best Regards,
 Michal Wegrzyn
 
 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Wednesday, November 02, 2011 15:54
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components
 
 On Wed, Nov 2, 2011 at 4:49 PM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
  15:32:24.028 user [http--5] ERROR
 o.a.wicket.DefaultExceptionMapper - Unexpected error occurred
  org.apache.wicket.request.handler.ComponentNotFoundException: Could
 not find component
 'folders:listContainer:itemList:29:itemPanel:folder:children' on page
 'class package.MyPage
 
 Do you know how this is triggered ?



RE: abort loading lazy components

2011-11-02 Thread Michal Wegrzyn
)
at 
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
at 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
at 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
15:32:24.183 user [http--2] WARN  o.a.w.r.h.render.WebPageRenderer - The 
Buffered response should be handled by BufferedResponseRequestHandler

Best regards,
Michal Wegrzyn

-Original Message-
From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
Sent: Tuesday, November 01, 2011 13:03
To: users@wicket.apache.org
Subject: RE: abort loading lazy components

It seems that this is what I was looking for.

Unfortunately I get ComponentNotFoundException already
during handling my new ajax request. It seems that
request handler tries to render component which does not
exist anymore (from page's previous state):

org.apache.wicket.request.handler.ComponentNotFoundException: Could not find 
component
'path:to:my:lazy:component' on page 'class package.MyPage'
 at 
org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:167)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:81)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:150)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:712)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:208)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:251)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)

Best regards,
Michal Wegrzyn

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Tuesday, November 01, 2011 12:09
To: users@wicket.apache.org
Subject: Re: abort loading lazy components

See org.apache.wicket.ajax.AjaxChannel.Type.DROP
You'll have to override AjaxLink#getChannel() to return DROP if you
want clicking on this AjaxLink to remove all scheduled ajax calls at
the client side.
But even with this improvement you'll still have to wait for the
currently being executed Ajax call (the first lazy loading component).

On Tue, Nov 1, 2011 at 1:03 PM, Michal Wegrzyn michal.wegr...@onior.com wrote:
 Thanks for reply Martin.

 Using BookmarkablePageLink indeed cancels other lazy ajax requests,
 but then page is created from the scratch (as BookmarkablePageLink
 extends normal Link).

 At the moment only AjaxLinks are used (so they create just another ajax
 requests that are queued after ajax lazy requests) and one page, so
 I would like to do it without reloading whole page.

 Best regards,
 Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, November 01, 2011 11:05
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 On Tue, Nov 1, 2011 at 10:36 AM, Michal Wegrzyn
 michal.wegr...@onior.com wrote

RE: abort loading lazy components

2011-11-02 Thread Michal Wegrzyn
It is triggered when there is already new itemList (it extends DataView), so 
I suppose that 
PageAndComponentProvider looks for itemList:29, which does not exists anymore.

Scenario:

- Page is loaded but lazy components 
('folders:listContainer:itemList:itemPanel:folder:children') are still loading
- User triggers folder change (itemList is replaced)
- Exception occurs

If user triggers folder change when lazy components are completely loaded (or 
during loading the last one) there is no exception at all.

Best Regards,
Michal Wegrzyn

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, November 02, 2011 15:54
To: users@wicket.apache.org
Subject: Re: abort loading lazy components

On Wed, Nov 2, 2011 at 4:49 PM, Michal Wegrzyn michal.wegr...@onior.com wrote:
 15:32:24.028 user [http--5] ERROR o.a.wicket.DefaultExceptionMapper - 
 Unexpected error occurred
 org.apache.wicket.request.handler.ComponentNotFoundException: Could not find 
 component 'folders:listContainer:itemList:29:itemPanel:folder:children' on 
 page 'class package.MyPage

Do you know how this is triggered ?



abort loading lazy components

2011-11-01 Thread Michal Wegrzyn
Hello,

In application which I am developing AjaxLazyLoadPanel is used for several 
components.
Wicket creates queue of synchronous Ajax requests for every lazy component.

I saw several discussions about the way how Wicket loads the components
(and AFAIK Wicket can do it only synchronously), but I could not find anything 
about
canceling these requests.

Now, even if user triggers new request, he still has to wait to load all lazy 
components.
Then Wicket continues with request which was triggered during loading lazy 
components.

Is there any way to cancel loading of the lazy components and handle new 
request immediately?

Yours sincerely,

Michal Wegrzyn


RE: abort loading lazy components

2011-11-01 Thread Michal Wegrzyn
Thanks for reply Martin.

Using BookmarkablePageLink indeed cancels other lazy ajax requests, 
but then page is created from the scratch (as BookmarkablePageLink
extends normal Link).

At the moment only AjaxLinks are used (so they create just another ajax 
requests that are queued after ajax lazy requests) and one page, so 
I would like to do it without reloading whole page.

Best regards,
Michal Wegrzyn

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Tuesday, November 01, 2011 11:05
To: users@wicket.apache.org
Subject: Re: abort loading lazy components

On Tue, Nov 1, 2011 at 10:36 AM, Michal Wegrzyn
michal.wegr...@onior.com wrote:
 Hello,

 In application which I am developing AjaxLazyLoadPanel is used for several 
 components.
 Wicket creates queue of synchronous Ajax requests for every lazy component.

 I saw several discussions about the way how Wicket loads the components
 (and AFAIK Wicket can do it only synchronously), but I could not find 
 anything about
 canceling these requests.

 Now, even if user triggers new request, he still has to wait to load all lazy 
 components.
 Then Wicket continues with request which was triggered during loading lazy 
 components.

Even when the new request is issued by BookmarkablePageLink ?

I can see how requests to the same page instance are queued but
request to new page should be possible.


 Is there any way to cancel loading of the lazy components and handle new 
 request immediately?

 Yours sincerely,

 Michal Wegrzyn




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



RE: abort loading lazy components

2011-11-01 Thread Michal Wegrzyn
It seems that this is what I was looking for.

Unfortunately I get ComponentNotFoundException already 
during handling my new ajax request. It seems that 
request handler tries to render component which does not 
exist anymore (from page's previous state):

org.apache.wicket.request.handler.ComponentNotFoundException: Could not find 
component 
'path:to:my:lazy:component' on page 'class package.MyPage'
 at 
org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:167)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:81)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:150)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:712)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:208)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:251)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) 

Best regards,
Michal Wegrzyn

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Tuesday, November 01, 2011 12:09
To: users@wicket.apache.org
Subject: Re: abort loading lazy components

See org.apache.wicket.ajax.AjaxChannel.Type.DROP
You'll have to override AjaxLink#getChannel() to return DROP if you
want clicking on this AjaxLink to remove all scheduled ajax calls at
the client side.
But even with this improvement you'll still have to wait for the
currently being executed Ajax call (the first lazy loading component).

On Tue, Nov 1, 2011 at 1:03 PM, Michal Wegrzyn michal.wegr...@onior.com wrote:
 Thanks for reply Martin.

 Using BookmarkablePageLink indeed cancels other lazy ajax requests,
 but then page is created from the scratch (as BookmarkablePageLink
 extends normal Link).

 At the moment only AjaxLinks are used (so they create just another ajax
 requests that are queued after ajax lazy requests) and one page, so
 I would like to do it without reloading whole page.

 Best regards,
 Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, November 01, 2011 11:05
 To: users@wicket.apache.org
 Subject: Re: abort loading lazy components

 On Tue, Nov 1, 2011 at 10:36 AM, Michal Wegrzyn
 michal.wegr...@onior.com wrote:
 Hello,

 In application which I am developing AjaxLazyLoadPanel is used for several 
 components.
 Wicket creates queue of synchronous Ajax requests for every lazy component.

 I saw several discussions about the way how Wicket loads the components
 (and AFAIK Wicket can do it only synchronously), but I could not find 
 anything about
 canceling these requests.

 Now, even if user triggers new request, he still has to wait to load all 
 lazy components.
 Then Wicket continues with request which was triggered during loading lazy 
 components.

 Even when the new request is issued by BookmarkablePageLink ?

 I can see how requests to the same page instance are queued but
 request to new page should be possible.


 Is there any way to cancel loading of the lazy components and handle new 
 request immediately?

 Yours sincerely,

 Michal Wegrzyn




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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