Re: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException when provider data for DataTable changes before paging (Wicket 6.x up to and including 6.15.0)

2014-06-11 Thread Oddgeir Bell

It's not our component, but a Wicket component:
org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxNavigationToolbar

We add it like this:
datatable.addBottomToolbar(new AjaxNavigationToolbar(this));

And then I would assume it took care of itself, and updated the table when it 
needed to...

Regards,
Oddgeir


It seems the link is already disabled when you click on it.

Which component do you update via Ajax after deleting the row? It seems
the browser isn't showing the latest state of the table.

Regards
Sven



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



Re: Implementing a SecureForm to avoid CSRF attacks

2014-06-11 Thread shayy
The specific panel *inside* the form is getting updated during each AJAX
request, the form itself stays the same.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Implementing-a-SecureForm-to-avoid-CSRF-attacks-tp4666175p4666187.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



Re: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException when provider data for DataTable changes before paging (Wicket 6.x up to and including 6.15.0)

2014-06-11 Thread Martin Grigorov
Hi,

On Wed, Jun 11, 2014 at 8:55 AM, Oddgeir Bell oddgeir.b...@deltasoft.no
wrote:

 It's not our component, but a Wicket component:
 org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.
 AjaxNavigationToolbar

 We add it like this:
 datatable.addBottomToolbar(new AjaxNavigationToolbar(this));

 And then I would assume it took care of itself, and updated the table when
 it needed to...


No.
You should repaint the table after deleting a row to update the toolbars
automatically.
Otherwise you can repaint just the toolbars, or even just this specific
toolbar, but you have to do it yourself.



 Regards,
 Oddgeir


  It seems the link is already disabled when you click on it.

 Which component do you update via Ajax after deleting the row? It seems
 the browser isn't showing the latest state of the table.

 Regards
 Sven



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




Re: Implementing a SecureForm to avoid CSRF attacks

2014-06-11 Thread Sven Meier

Your form can listen to AjaxRequestTargets, override:

  public void onEvent(IEvent event) {
if (event.getPayload() instanceof AjaxRequestTarget) {
  // update token via JavaScript
((AjaxRequestTarget)event.getPayload()).appendJavaScript(...);
}
  }

Regards
Sven

On 06/11/2014 08:41 AM, shayy wrote:

The specific panel *inside* the form is getting updated during each AJAX
request, the form itself stays the same.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Implementing-a-SecureForm-to-avoid-CSRF-attacks-tp4666175p4666187.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: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException when provider data for DataTable changes before paging (Wicket 6.x up to and including 6.15.0)

2014-06-11 Thread Oddgeir Bell
How can we? The deletion doesn't happen on the same page. Without 
polling (or websocket), I don't see how we can update the table?
Every time we click a navigation button (in the table), the dataprovider 
fetches the data from the database. It just so happens that that data 
has been changed between clicks, and by then it would be too late to 
update the toolbar (not to mention wrong to update the toolbar from the 
dataprovider). Right?


regards
Oddgeir

On 11.06.2014 09:34, Martin Grigorov wrote:

Hi,

On Wed, Jun 11, 2014 at 8:55 AM, Oddgeir Bell oddgeir.b...@deltasoft.no
wrote:


It's not our component, but a Wicket component:
org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.
AjaxNavigationToolbar

We add it like this:
datatable.addBottomToolbar(new AjaxNavigationToolbar(this));

And then I would assume it took care of itself, and updated the table when
it needed to...


No.
You should repaint the table after deleting a row to update the toolbars
automatically.
Otherwise you can repaint just the toolbars, or even just this specific
toolbar, but you have to do it yourself.



Regards,
Oddgeir


  It seems the link is already disabled when you click on it.

Which component do you update via Ajax after deleting the row? It seems
the browser isn't showing the latest state of the table.

Regards
Sven



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






Re: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException when provider data for DataTable changes before paging (Wicket 6.x up to and including 6.15.0)

2014-06-11 Thread Martin Grigorov
I see.

In this case you can use AbstractRequestCycleListener#onException() to
catch ListenerInvocationNotAllowedException and repaint the whole page
instead of logging it and showing an error page.
I.e. you need to do:
return new RenderPageRequestHandler(new
PageProvider(exception.getComponent().getPage()))

Martin Grigorov
Wicket Training and Consulting


On Wed, Jun 11, 2014 at 10:02 AM, Oddgeir Bell oddgeir.b...@deltasoft.no
wrote:

 How can we? The deletion doesn't happen on the same page. Without polling
 (or websocket), I don't see how we can update the table?
 Every time we click a navigation button (in the table), the dataprovider
 fetches the data from the database. It just so happens that that data has
 been changed between clicks, and by then it would be too late to update the
 toolbar (not to mention wrong to update the toolbar from the dataprovider).
 Right?

 regards
 Oddgeir


 On 11.06.2014 09:34, Martin Grigorov wrote:

 Hi,

 On Wed, Jun 11, 2014 at 8:55 AM, Oddgeir Bell oddgeir.b...@deltasoft.no
 wrote:

  It's not our component, but a Wicket component:
 org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.
 AjaxNavigationToolbar

 We add it like this:
 datatable.addBottomToolbar(new AjaxNavigationToolbar(this));

 And then I would assume it took care of itself, and updated the table
 when
 it needed to...

  No.
 You should repaint the table after deleting a row to update the toolbars
 automatically.
 Otherwise you can repaint just the toolbars, or even just this specific
 toolbar, but you have to do it yourself.


  Regards,
 Oddgeir


   It seems the link is already disabled when you click on it.

 Which component do you update via Ajax after deleting the row? It seems
 the browser isn't showing the latest state of the table.

 Regards
 Sven


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






Re: Ajax Form Submit via jquery plugin / javascript

2014-06-11 Thread Martin Grigorov
Hi,



On Tue, Jun 10, 2014 at 11:28 AM, Vishal Popat vishal.po...@cipriati.co.uk
wrote:

 Hi,

 I am using a jquery steps plugin which has the ability to change options.
 One of the options I have is:
 onFinished: function (event, currentIndex) {
 var form = document.forms[selectionForm];
 form.submit();


Try with:
jQuery(#selectionForm).trigger(submit); // or
jQuery(#selectionForm).submit() which is a shortcut


 },

 The javascript above submits the associated form. However I would like to
 submit the form via ajax. Normally I would use an AjaxButton for ajax
 processing but in this case I need something else. I have tried

 selectionForm.add(new AjaxFormSubmitBehavior(selectionForm, onsubmit) {
 @Override
 protected void onSubmit(AjaxRequestTarget target) {
 log.debug(*** ajax form submit);
 }
 }

 but this does not seem to work as the debug does not get outputted.
 Additionally, the onSubmit Form version is called. Is there a way to stop
 this?

 Let me know if should be using something else instead.

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




Re: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException when provider data for DataTable changes before paging (Wicket 6.x up to and including 6.15.0)

2014-06-11 Thread Oddgeir Bell
This works, thank you. We still get the stacktrace in the log, but 
that's ok..


Thank you very much.

regards
Oddgeir

On 11.06.2014 10:32, Martin Grigorov wrote:

I see.

In this case you can use AbstractRequestCycleListener#onException() to
catch ListenerInvocationNotAllowedException and repaint the whole page
instead of logging it and showing an error page.
I.e. you need to do:
return new RenderPageRequestHandler(new
PageProvider(exception.getComponent().getPage()))

Martin Grigorov
Wicket Training and Consulting


On Wed, Jun 11, 2014 at 10:02 AM, Oddgeir Bell oddgeir.b...@deltasoft.no
wrote:


How can we? The deletion doesn't happen on the same page. Without polling
(or websocket), I don't see how we can update the table?
Every time we click a navigation button (in the table), the dataprovider
fetches the data from the database. It just so happens that that data has
been changed between clicks, and by then it would be too late to update the
toolbar (not to mention wrong to update the toolbar from the dataprovider).
Right?

regards
Oddgeir


On 11.06.2014 09:34, Martin Grigorov wrote:


Hi,

On Wed, Jun 11, 2014 at 8:55 AM, Oddgeir Bell oddgeir.b...@deltasoft.no
wrote:

  It's not our component, but a Wicket component:

org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.
AjaxNavigationToolbar

We add it like this:
datatable.addBottomToolbar(new AjaxNavigationToolbar(this));

And then I would assume it took care of itself, and updated the table
when
it needed to...

  No.

You should repaint the table after deleting a row to update the toolbars
automatically.
Otherwise you can repaint just the toolbars, or even just this specific
toolbar, but you have to do it yourself.


  Regards,

Oddgeir


   It seems the link is already disabled when you click on it.


Which component do you update via Ajax after deleting the row? It seems
the browser isn't showing the latest state of the table.

Regards
Sven



-
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



Backward compatibility with URLs generated by HybridUrlCodingStrategy.

2014-06-11 Thread Fabio Fioretti
Hi all,

I am migrating an application from Wicket 1.4 to 6.15. This app makes use
of HybridUrlCodingStrategy, that I replaced with a MountedMapped using
UrlPathPageParametersEncoder.

The problem is that many users have old bookmarks of URLs generated by
HybridUrlCodingStrategy, in which the page instance number comes after a
dot, like in the following example:

http://myapp.com/mount/path/param/value.4

Now, with MountedMapper and UrlPathPageParametersEncoder, the same URL
looks like this (mind the ? replacing the .):

http://myapp.com/mount/path/param/value?4

The result is that the old dotted bookmarks do not work anymore (HTTP 404).

Any suggestion on the best approach to guarantee backward compatibility
with old URLs?

Thanks very much in advance,
Fabio Fioretti


Re: OnChangeAjaxBehavior.onUpdate() not called

2014-06-11 Thread Lucio Crusca
 Well, by hidden do you mean an input type of hidden or not present on the
 DOM?


I mean that I used jQuery to slideUp() the containing div in the
$(document).ready(), so that when the page loads the div is not visible
to the user and it becomes visible on some other event.




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



Re: Implementing a SecureForm to avoid CSRF attacks

2014-06-11 Thread shayy
Unless I'm doing it wrong, I can't get it to work :(
I'm posting my class here maybe someone can see my mistake?

public class SecureFormT extends FormT {
private static final Logger log =
LoggerFactory.getLogger(SecureForm.class);

private static final String TOKEN_NAME = SECURE_FORM_TOKEN;
private String token;

public SecureForm(final String id) {
super(id);
}

public SecureForm(final String id, final IModelT model) {
super(id, model);
}

@Override
protected void onBeforeRender() {
super.onBeforeRender();
this.token = UUID.randomUUID().toString();
}

@Override
public void onComponentTagBody(MarkupStream markupStream, ComponentTag
openTag) {
// render the hidden field
if (isRootForm()) {
AppendingStringBuffer buffer = new AppendingStringBuffer(
div style=\display:none\input
type=\quot;hidden\quot; name=\quot;quot;);
buffer.append(TOKEN_NAME)
.append(quot;\quot; id=\quot;quot;)
.append(TOKEN_NAME)
.append(quot;\quot; value=\quot;quot;)
.append(token)
.append(quot;\quot; //div);
getResponse().write(buffer);
}

// do the rest of the processing
super.onComponentTagBody(markupStream, openTag);
}

@Override
public void onEvent(IEvent? event) {
if (event.getPayload() instanceof AjaxRequestTarget) {
if (StringUtils.isNotBlank(token)) {
// update token via JavaScript
((AjaxRequestTarget) event.getPayload()).appendJavaScript(
document.getElementById('SECURE_FORM_TOKEN').value
=  + token + ;);
}
}

super.onEvent(event);
}

@Override
protected void onValidate() {
// Check the random id in the hidden field. This guards against CSRF
attacks.
StringValue requestToken =
getRequest().getPostParameters().getParameterValue(TOKEN_NAME);
if (!requestToken.equals(StringValue.valueOf(token))) {
log.warn(Attempted unauthorized form submission);
}

super.onValidate();
}
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Implementing-a-SecureForm-to-avoid-CSRF-attacks-tp4666175p4666197.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



Re: Implementing a SecureForm to avoid CSRF attacks

2014-06-11 Thread Sven Meier

Note the apostrophe around 'token':

document.getElementById('SECURE_FORM_TOKEN').value= ' + token + ';);

But don't you want to generate a new token on ajax requests too?

Sven

On 06/11/2014 01:17 PM, shayy wrote:

Unless I'm doing it wrong, I can't get it to work :(
I'm posting my class here maybe someone can see my mistake?

public class SecureFormT extends FormT {
 private static final Logger log =
LoggerFactory.getLogger(SecureForm.class);

 private static final String TOKEN_NAME = SECURE_FORM_TOKEN;
 private String token;

 public SecureForm(final String id) {
 super(id);
 }

 public SecureForm(final String id, final IModelT model) {
 super(id, model);
 }

 @Override
 protected void onBeforeRender() {
 super.onBeforeRender();
 this.token = UUID.randomUUID().toString();
 }

 @Override
 public void onComponentTagBody(MarkupStream markupStream, ComponentTag
openTag) {
 // render the hidden field
 if (isRootForm()) {
 AppendingStringBuffer buffer = new AppendingStringBuffer(
 div style=\display:none\input
type=\quot;hidden\quot; name=\quot;quot;);
 buffer.append(TOKEN_NAME)
 .append(quot;\quot; id=\quot;quot;)
 .append(TOKEN_NAME)
 .append(quot;\quot; value=\quot;quot;)
 .append(token)
 .append(quot;\quot; //div);
 getResponse().write(buffer);
 }

 // do the rest of the processing
 super.onComponentTagBody(markupStream, openTag);
 }

 @Override
 public void onEvent(IEvent? event) {
 if (event.getPayload() instanceof AjaxRequestTarget) {
 if (StringUtils.isNotBlank(token)) {
 // update token via JavaScript
 ((AjaxRequestTarget) event.getPayload()).appendJavaScript(
 document.getElementById('SECURE_FORM_TOKEN').value
=  + token + ;);
 }
 }

 super.onEvent(event);
 }

 @Override
 protected void onValidate() {
 // Check the random id in the hidden field. This guards against CSRF
attacks.
 StringValue requestToken =
getRequest().getPostParameters().getParameterValue(TOKEN_NAME);
 if (!requestToken.equals(StringValue.valueOf(token))) {
 log.warn(Attempted unauthorized form submission);
 }

 super.onValidate();
 }
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Implementing-a-SecureForm-to-avoid-CSRF-attacks-tp4666175p4666197.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: Backward compatibility with URLs generated by HybridUrlCodingStrategy.

2014-06-11 Thread Martin Grigorov
Hi Fabio,

You can create your own root request mapper that when detecting an old url
can either :
1) return a redirect with code 301 (Moved permanently)
2) just move the page id from the last segment to the query string
silently

Martin Grigorov
Wicket Training and Consulting


On Wed, Jun 11, 2014 at 1:00 PM, Fabio Fioretti windom.macroso...@gmail.com
 wrote:

 Hi all,

 I am migrating an application from Wicket 1.4 to 6.15. This app makes use
 of HybridUrlCodingStrategy, that I replaced with a MountedMapped using
 UrlPathPageParametersEncoder.

 The problem is that many users have old bookmarks of URLs generated by
 HybridUrlCodingStrategy, in which the page instance number comes after a
 dot, like in the following example:

 http://myapp.com/mount/path/param/value.4

 Now, with MountedMapper and UrlPathPageParametersEncoder, the same URL
 looks like this (mind the ? replacing the .):

 http://myapp.com/mount/path/param/value?4

 The result is that the old dotted bookmarks do not work anymore (HTTP 404).

 Any suggestion on the best approach to guarantee backward compatibility
 with old URLs?

 Thanks very much in advance,
 Fabio Fioretti



Re: OnChangeAjaxBehavior.onUpdate() not called

2014-06-11 Thread Martin Grigorov
Is there a request made by the browser to the server when you type
something in these input fields ?
we need more information to find out where is the problem - at the client
side or at the server

Martin Grigorov
Wicket Training and Consulting


On Wed, Jun 11, 2014 at 11:34 AM, Lucio Crusca lu...@sulweb.org wrote:

  Well, by hidden do you mean an input type of hidden or not present on the
  DOM?
 

 I mean that I used jQuery to slideUp() the containing div in the
 $(document).ready(), so that when the page loads the div is not visible
 to the user and it becomes visible on some other event.




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




Re: Implementing a SecureForm to avoid CSRF attacks

2014-06-11 Thread shayy
Hmm, not sure about that. Do you mean that onEvent() will both re-generate
the token on the SecureForm class as well as replace the value on the HTML?
Security wise, is there a reason to do that?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Implementing-a-SecureForm-to-avoid-CSRF-attacks-tp4666175p4666201.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



Re: Implementing a SecureForm to avoid CSRF attacks

2014-06-11 Thread Sven Meier

Hi,

a single token from the start of a form until its submit should do fine.

I'm just wondering why you see the need to update the token, although 
the form isn't re-rendered and thus the token is unchanged.


Sven

On 06/11/2014 02:19 PM, shayy wrote:

Hmm, not sure about that. Do you mean that onEvent() will both re-generate
the token on the SecureForm class as well as replace the value on the HTML?
Security wise, is there a reason to do that?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Implementing-a-SecureForm-to-avoid-CSRF-attacks-tp4666175p4666201.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: OnChangeAjaxBehavior.onUpdate() not called [SOLVED]

2014-06-11 Thread Lucio Crusca
Martin was right, there were Javascript errors, but for some reason the
webconsole didn't display them the first time I looked at it.


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



Re: Implementing a SecureForm to avoid CSRF attacks

2014-06-11 Thread shayy
So first let me just say that your answer helped me and everything works now,
I really appreciate the help!

So the scenario is that I have a form, inside the form there are several
tabs.
When the user enters the first tab, the form is first rendered with the
token and the SecureForm class has the same token value.
When the user clicks on the second tab, the from is not rendered again but
the SecureForm is called again - hence creating a new token in the
SecureForm class.
The user now goes back to tab1, the form is getting posted (with the initial
token) but the SecureForm class already has a different value!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Implementing-a-SecureForm-to-avoid-CSRF-attacks-tp4666175p4666204.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



Re: Ajax timer not counting when tab doesn't have focus?

2014-06-11 Thread Ernesto Reinaldo Barreiro
Bruce,

Apologies for the delay in answering. Thanks for your feedback. I have
merged your changes into the original example.

https://github.com/reiern70/antilia-bits/commit/0a1b14534409698b9219137666f060e04e715ed4

Example still seems to work as expected... But I did not do any extensive
testing.



On Tue, May 27, 2014 at 7:58 PM, Bruce Lombardi brlom...@gmail.com wrote:

 For anyone interested, and particularly for Ernesto, I have successfully
 created  a version of the InactivityTimeOutPanel that works even if the
 user changes to another browser tab. The key, which I became aware of from
 the jsfiddle links (see previous posts below is to use an absolute time for
 when a period of inactivity would result in a timeout (timeoutTime,set to
 now plus an interval,, say 5 minutes), and then when the timer fires, to
 compare the current time against the timeoutTime. This seems to avoid the
 problem of the timer slowing down when the user changes to another page.
 Reset just resets the timeoutTime to a now plus the interval. I have set
 the timer to go off in one quarter of the interval, thinking if there are
 some delays this will keep it closer to the mark.

 I have tested this and it seems to work fine.

 I only had to change the JavaScript in Ernesto's example to get everything
  to work, and I have posted the code here:  http://pastebin.com/TWwS5hhE
 for people to see.

 Ernesto, It would be great if you could put this code into the JavaScript
 in your example and try it out. Then we would have a complete example to
 point people to if it works OK.

 Regards,

 Bruce


 -Original Message-
 From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Sent: Friday, May 16, 2014 2:42 PM
 To: users@wicket.apache.org
 Subject: Re: Ajax timer not counting when tab doesn't have focus?

 Bruce.

 Let me see if I can find some time during weekend to play a bit with the
 links your provided and come up with a more robust solution.


 On Fri, May 16, 2014 at 3:57 PM, Bruce Lombardi brlom...@gmail.com
 wrote:

  First, thank you  for your continuing interest. This is the best
  support group experience  I've ever had. I hope the message come in
  the right sequence. Lke Ernesto and other A saw the sequencing problem
  cause by the apache server problem.
 
  I ran the test that Martin suggestion with  6.16.0-SNAPSHOTand got the
  same behavior, which is what Ernesto and I suspected would happen.
 
  I'm sorry, but I don't know a lot about JavaScript so I'm having with
  certain things.  I read this article in stackoverflow:
 
 
  https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-s
  uspended-in-background-tabs
 
  Which lead to this:
 
 
  http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-
  also-work-when-a-tab-is-inactive-in-chrome
 
 
  Which contained an example of a script that doesn’t work correctly (if
  you go to it, you will see that  it walks the word test  across the
 screen.
  If you go to another  tab and come back test hasn’t moved)
 
  http://jsfiddle.net/7f6DX/3/
 
 
  and this example that works (does the same thing but you can see that
  test  moves even when you go to another  tab - but don't go away too
  long it will reach the end and disappear).
 
  http://jsfiddle.net/7f6DX/31/
 
  Do you think the last (working) script  could be adapted  for our
 timeout?
 
  Regards,
  Bruce
 
 
 
  -Original Message-
  From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
  Sent: Tuesday, May 13, 2014 1:59 AM
  To: users@wicket.apache.org
  Subject: Re: Ajax timer not counting when tab doesn't have focus?
 
  Martin,
 
  Thanks for pointing out this. The exact JavaScript enabling this
  feature can be found here
 
 
  https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
  arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
  OutPanel.js
 
  Maybe there is a memory leak in here as well... but I do not see the
  relation with WICKET-5570 as I do not use any of the AJAX timer
  behavior, see
 
 
  https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
  arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
  OutPanel.java
 
  As Bruce describes the problem it sounds like if by switching to other
  tab browser give less priority to the execution of JavaScript in
  inactive tabs.
 
 
 
  On Mon, May 12, 2014 at 9:28 PM, Martin Grigorov mgrigo...@apache.org
  wrote:
 
   It could be that https://issues.apache.org/jira/browse/WICKET-5570
   is the issue.
   Please try with 6.16.0-SNAPSHOT if you can.
  
   Martin Grigorov
   Wicket Training and Consulting
  
  
   On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi brlom...@gmail.com
   wrote:
  
Thanks Ernesto.
   
Yes, I do mean another browser tab. I have some new information.
The
   timer
seems to slow way down, but not stop counting down when the user
switches focus to another tab, either opening a new tab, or 

Re: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException when provider data for DataTable changes before paging (Wicket 6.x up to and including 6.15.0)

2014-06-11 Thread jchappelle
By the way that is exactly how we handle these errors as well. The only time
I ever see ListenerInvocationNotAllowedExceptions are when the state of the
database changes between clicks. With repainting the screen the users may
click a link and then the link disappears which is weird. But that is way
better than redirecting them to an error page.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-core-request-handler-ListenerInvocationNotAllowedException-when-provider-data-for--tp4666171p4666206.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



Re: OnChangeAjaxBehavior.onUpdate() not called [PARTIALLY SOLVED]

2014-06-11 Thread Lucio Crusca
 Martin was right, there were Javascript errors, but for some reason the
 webconsole didn't display them the first time I looked at it.


However the problem is only partially solved. onUpdate() now gets called,
but only when the TextField looses focus. I need it to be called on every
single keypress... is there anything I should do for that?


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



Empty FeedbackPanel

2014-06-11 Thread Lucio Crusca
Here is a form:


http://158.58.168.198/quotaly/wicket/bookmarkable/it.quotaly.web.Register

here is the relevant html snippet:

form class=inputForm wicket:id=registrationform
  fieldset
legendInserisci i tuoi dati/legend
  div id=feedbackPanel
span wicket:id=feedback/
  /div
div class=campoform
  label wicket:for=nome
span class=inputformlabelspanNome */span
span class=inputWrapper
  input type=text class=text_reg placeholder=nome
wicket:id=nome
/span
  /label
/div
[...]


and java code:

registrationform.add(new TextField(nome).setRequired(true));
registrationform.add(new FeedbackPanel(feedback));

If you click the Invia button (italian for Submit), the validation
takes place (in fact my onSubmit() does not get called since many required
fields are not filled in), but the FeedbackPanel remains empty (take a
look at generated html).

Similar code works in other wicket projects I've done, so I don't know
what I'm doing different/wrong here... any clue?


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



Re: FileDownload hides the activity indicator

2014-06-11 Thread msalman
Hi Ernesto,

Thank you for your quick response.  But I think I did not explain the
problem that I am trying to solve.   What is happening in my case is that
when I click the IndicatingAjaxButton to start the file download, the
activity indicator (that twirling round thing) appears.  But it then
disappears very quickly just when the code starts generating and downloading
the file.  All this while, without the activity indicator, the user does not
know if any thing is happening and so may click the button again and again.  

The solutions that you have sent me the links to, are for problems relating
to the GUI not being responsive after the file has been downloaded.  I do
not have that problem.  I just don't want the user to click the button again
while the file is being downloaded.

Also, unfortunately other than Wicket and simple html, I do not know much
about other GUI tools including Javascript.  So I would appreciate very much
if you can provide me with a solution that I can easily use in wickets.

Again, thanks so much for your response.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileDownload-hides-the-activity-indicator-tp4666181p4666209.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



Re: Empty FeedbackPanel

2014-06-11 Thread Sven Meier

Strange, invalid form input isn't preserved either.

Check the application log for clues.

Regards
Sven


On 06/11/2014 06:21 PM, Lucio Crusca wrote:

Here is a form:


http://158.58.168.198/quotaly/wicket/bookmarkable/it.quotaly.web.Register

here is the relevant html snippet:

 form class=inputForm wicket:id=registrationform
   fieldset
 legendInserisci i tuoi dati/legend
   div id=feedbackPanel
 span wicket:id=feedback/
   /div
 div class=campoform
   label wicket:for=nome
 span class=inputformlabelspanNome */span
 span class=inputWrapper
   input type=text class=text_reg placeholder=nome
wicket:id=nome
 /span
   /label
 /div
[...]


and java code:

 registrationform.add(new TextField(nome).setRequired(true));
 registrationform.add(new FeedbackPanel(feedback));

If you click the Invia button (italian for Submit), the validation
takes place (in fact my onSubmit() does not get called since many required
fields are not filled in), but the FeedbackPanel remains empty (take a
look at generated html).

Similar code works in other wicket projects I've done, so I don't know
what I'm doing different/wrong here... any clue?


-
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: FileDownload hides the activity indicator

2014-06-11 Thread Ernesto Reinaldo Barreiro
Hi,


On Wed, Jun 11, 2014 at 6:30 PM, msalman mohammad_sal...@yahoo.com wrote:

 Hi Ernesto,

 Thank you for your quick response.  But I think I did not explain the
 problem that I am trying to solve.   What is happening in my case is that
 when I click the IndicatingAjaxButton to start the file download, the
 activity indicator (that twirling round thing) appears.  But it then
 disappears very quickly just when the code starts generating and
 downloading
 the file.  All this while, without the activity indicator, the user does
 not
 know if any thing is happening and so may click the button again and again.


This is exactly what the articles I sent explain: it seems there is no hook
for detecting downloading been triggered/finished. I did not read them but
I think they proposed a workaround.

http://geekswithblogs.net/GruffCode/archive/2010/10/28/detecting-the-file-download-dialog-in-the-browser.aspx


Another possibility is:

1- Generate the file
2- Once it is ready trigger the download. I.e. poll the server to see if
generation finished. Then use polling ajax request to trigger download.


 The solutions that you have sent me the links to, are for problems relating
 to the GUI not being responsive after the file has been downloaded.  I do
 not have that problem.  I just don't want the user to click the button
 again
 while the file is being downloaded.

 Also, unfortunately other than Wicket and simple html, I do not know much
 about other GUI tools including Javascript.  So I would appreciate very
 much
 if you can provide me with a solution that I can easily use in wickets.

 I do not promise anything as I'm rather busy at the moment... but let me
see if I can come up with an example.


 Again, thanks so much for your response.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/FileDownload-hides-the-activity-indicator-tp4666181p4666209.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




-- 
Regards - Ernesto Reinaldo Barreiro


Re: FileDownload hides the activity indicator

2014-06-11 Thread msalman

Hi Ernesto,

Generating the file first and then triggering the download sounds like a
good idea.  I think at least while the file is being generated the activity
indicator will show.

I will try this.

Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileDownload-hides-the-activity-indicator-tp4666181p4666212.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



Re: OnChangeAjaxBehavior.onUpdate() not called [PARTIALLY SOLVED]

2014-06-11 Thread Paul Bors
How about an AjaxBehavior with the onChange event?

On Jun 11, 2014, at 9:10 AM, Lucio Crusca lu...@sulweb.org wrote:

 Martin was right, there were Javascript errors, but for some reason the
 webconsole didn't display them the first time I looked at it.
 
 
 However the problem is only partially solved. onUpdate() now gets called,
 but only when the TextField looses focus. I need it to be called on every
 single keypress... is there anything I should do for that?
 
 
 -
 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: FileDownload hides the activity indicator

2014-06-11 Thread Ernesto Reinaldo Barreiro
Hi,


On Wed, Jun 11, 2014 at 8:21 PM, msalman mohammad_sal...@yahoo.com wrote:


 Hi Ernesto,

 Generating the file first and then triggering the download sounds like a
 good idea.  I think at least while the file is being generated the activity
 indicator will show.


Good so. You shouldn't do anything taking longer than a few seconds in a
WEB thread: think that by doing that you might deplete the thread pool of
your server as the thread will be busy generating the document and will not
be used to service other requests.



 I will try this.

 Thanks.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/FileDownload-hides-the-activity-indicator-tp4666181p4666212.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




-- 
Regards - Ernesto Reinaldo Barreiro


Wicket Hight chart issue

2014-06-11 Thread prabu
Hello Team,

I have started using Wicket Chart for my project (web based Java project)
and I am facing some difficulties to meet requirement.
 
I wanted to archive below chart using Wicket chart

http://apache-wicket.1842946.n4.nabble.com/file/n4666214/image001.png 

I can’t able to get exactly like above. But I got into this level  using
some example (wicked-charts-highcharts-1.5.0.jar and
wicked-charts-wicket6-1.5.0.jar)

http://apache-wicket.1842946.n4.nabble.com/file/n4666214/image002.png 

Issue Currently I am facing
 
1.Not able to remove background rectangle white box
2.Not able to set values ( 23% 10% 8% ..) in all layer
3.Not able to move all links text ( Ex: 1,170,233 under 50 years ) to right 
like first example

I am developing using java and attached java file I am currently using.
 
ConsumerAnalysticsHome.java
http://apache-wicket.1842946.n4.nabble.com/file/n4666214/ConsumerAnalysticsHome.java
  
DonutOptions.java
http://apache-wicket.1842946.n4.nabble.com/file/n4666214/DonutOptions.java  
ShowcaseOptions.java
http://apache-wicket.1842946.n4.nabble.com/file/n4666214/ShowcaseOptions.java 
 

Please kindly help us.
 
Thanks in advance
 
Regards
Prabu.N


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Hight-chart-issue-tp4666214.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