Re: ListenerInvocationNotAllowedException and EmptyRequestHandler

2014-01-13 Thread Martin Grigorov
Hi,

On Fri, Jan 10, 2014 at 10:31 PM, jchappelle jchappe...@4redi.com wrote:

 Sometimes it's an AjaxLazyLoadPanel and sometimes it is an AjaxLink. This
 particular one is from an AjaxLazyLoadPanel.


 2013-10-17 07:23:42,782 ERROR ajp-127.0.0.1-8009-6
 com.redi.risk.ui.RiskExceptionMapper - Unexpected error occurred
 2013-10-17 07:23:45,985 WARN  ajp-127.0.0.1-8009-36
 org.apache.wicket.RequestListenerInterface - behavior not enabled; ignore


The error says that a request is attempting to execute a disabled behavior.
Using EmptyRequestHandler will just ignore the real problem.
You better investigate why the behavior is disabled when the request comes.


 call. Behavior
 org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel$1@1ddb562at
 component [ [Component id = filterFormPanel]]
 2013-10-17 07:23:46,001 WARN  ajp-127.0.0.1-8009-36
 com.redi.risk.ui.RiskExceptionMapper - Error during request
 org.apache.wicket.request.handler.ListenerInvocationNotAllowedException:
 Behavior rejected interface invocation. Component: [ [Component id =
 filterFormPanel]] Behavior:
 org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel$1@1ddb562
 Listener: [RequestListenerInterface name=IBehaviorListener, method=public
 abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 at

 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:237)
 at

 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:255)
 at

 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
 at

 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
 at

 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
 at

 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
 at

 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
 at

 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
 at

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

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at

 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
 at

 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 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.StandardHostValve.invoke(StandardHostValve.java:127)
 at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
 at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at
 org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:448)
 at

 org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:403)
 at
 org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760)
 at java.lang.Thread.run(Unknown Source)

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ListenerInvocationNotAllowedException-and-EmptyRequestHandler-tp4663618p4663628.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: Nested Forms

2014-01-13 Thread Martin Grigorov
Hi,

As others explained - yes, this is correct behavior.
In the produced page markup you can see that there is form element only
for the outer form. The inner form is represented by a div element.

Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 10, 2014 at 7:04 PM, gmparker2000 greg.par...@brovada.comwrote:

 When submitting an inner form it appears that the request contains all of
 the
 outer and inner form fields.  Is this the expected behaviour?  From what I
 can see it appears that the outer form is submitted, and only the inner
 form
 parameters are validated and used for model updates.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-tp4663620.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




RequestCycleListener and setPageExpiredErrorPage

2014-01-13 Thread Christoph.Manig
Hello,

in my application I do the following configurations:
getApplicationSettings().setPageExpiredErrorPage(Timeout.class);
getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
getRequestCycleListeners().add(new RequestCycleExceptionListener());

my RequestCycleExceptionListener looks like this:
public class RequestCycleExceptionListener extends AbstractRequestCycleListener 
{

@Override
public IRequestHandler onException(RequestCycle cycle, Exception ex) {
return new RenderPageRequestHandler(new PageProvider(new 
InternalError(getStackTrace(ex;
   }

private String getStackTrace(Exception ex) {
return ex.getMessage();
}
}

Now my problem, if the session expired I will be directed to my 
InternalError-Page. There I can see the Message page xyz expired. But I want to 
be directed to my Timeout-page. It will be right if I delete the two lines 
where I add my RequestCycleListener. What should I do to be directed to the 
timeout-page if the session expires and to the InternalError-page if an 
exception is thrown?

Can anybody help me please?


Mit freundlichen Grüßen
Christoph Manig




Re: Why is getDisplayValue in getDisplayValue final?

2014-01-13 Thread Martin Grigorov
On Fri, Jan 10, 2014 at 9:41 AM, Martin Grigorov mgrigo...@apache.orgwrote:




 On Thu, Jan 9, 2014 at 11:32 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 On Wed, Jan 8, 2014 at 11:41 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  Hi Igor,
 
  While I see what you mean I think that often this is not the case. At
 least
  when using open source library.
  Most of the time users/developers do not read Javadoc but use the code
  directly.

 this is not my experience. most users can barely attach javadoc to
 their ide, not even speaking about source.


 here is where we think differently
 if the user is not experienced enough this is not a problem of the
 library/framework/OS (LFOS) (s)he uses
 if the LFOS stays in the way of the user/developer then the problem is in
 the LFOS

 now the question is whether the LFOS should provide a single (the proper)
 way to do something or it should provide a sane default way and let the
 user choose a better one for her/his use cases
 the user may choose a worse way but this is not something the LFOS should
 prevent on any price
 more experienced users appreciate the provided flexibility

 example from yesterday/today:
 - a user complains that ajax multipart form submit doesn't work for FF
 - I ask for a quickstart
 - the user creates a quickstart and realizes that the problem is in his
 custom code
 - the user apologies and continues his work

 I think users complain more when the LFOS doesn't allow them to do
 something good than when the LFOS doesn't prevent them to do something bad.



  If I want to override a method I'd first consult with the source of the
  overridden method, not with the Javadoc of the overridden method or its
  super.

 if you consulted with the source you would see that there is no reason
 to override that method directly as its functionality can  be
 completely replaced by overriding postprocess()... so why override the
 original?


 For example to prevent MissingResourceException that may be thrown if the
 app doesn't have a value for the resource key.


This reason seems good enough for me to remove 'final' from the signature
of #getDisplayValue() and deprecate #postprocess().

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




 -igor


 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Thu, Jan 9, 2014 at 1:12 AM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  the method is final because overriding it means you will most likely
  break the contract of the resourceKey and postprocess methods which
  are meant to be used by you to customze the behavior of
  getDisplayValue().
 
  so lets say you create subclass MyEnumChoiceRenderer with an
  overridden getDisplayValue() that no longer calls postprocess(). then
  someone subclasses your subclass and overrides postprocess() expecting
  it to be called (thats what the javadoc says) but it wont be, because
  you broke the contract.
 
  having getDisplayValue() be final prevents you from breaking this
  contract and saving hours of head scratching down the road.
 
  if you look at EnumChoiceRenderer without getDisplayValue() there is
  only one meaningful line of code left:
 
  return Classes.simpleName(object.getDeclaringClass()) + '.' +
 object.name
  ();
 
  everything else is javadoc or declarations. so why all the fuss over a
  trivial line of code?
 
  -igor
 
  ps: ironically if you did want to override getDisplayValue() in a way
  that broke the contract you would have to make your subclass final so
  no one further down the road could subclass it...
 
 
  On Tue, Jan 7, 2014 at 6:37 AM, Oliver B. Fischer 
 mails...@swe-blog.net
  wrote:
   Hi,
  
   I just tried to customize EnumChoiceRenderer and to override
   getDisplayValue, but is final. Why?
  
   Can I submit a patch to remove final?
  
   Bye,
  
   Oliver
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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





Re: Why is getDisplayValue in getDisplayValue final?

2014-01-13 Thread Oliver B. Fischer
I see your point and I also think that it is very important to ensure 
the contract your class or methods relies on.


But in such a case the method where the method must be final a 
customization point should be provided to allow us the modify the part 
of the method which is independent of the contract.


For example:

@Override
public final Object getDisplayValue(T object)
{
  final String value = getDisplayValueRaw(object);

  return postprocess(value);
}

getDisplayValueRaw() whould be the customization point and could be 
overwritten by a developer without breaking the method contract.


Oliver


Am 09.01.14 00:12, schrieb Igor Vaynberg:

the method is final because overriding it means you will most likely
break the contract of the resourceKey and postprocess methods which
are meant to be used by you to customze the behavior of
getDisplayValue().

so lets say you create subclass MyEnumChoiceRenderer with an
overridden getDisplayValue() that no longer calls postprocess(). then
someone subclasses your subclass and overrides postprocess() expecting
it to be called (thats what the javadoc says) but it wont be, because
you broke the contract.

having getDisplayValue() be final prevents you from breaking this
contract and saving hours of head scratching down the road.

if you look at EnumChoiceRenderer without getDisplayValue() there is
only one meaningful line of code left:

return Classes.simpleName(object.getDeclaringClass()) + '.' + object.name();

everything else is javadoc or declarations. so why all the fuss over a
trivial line of code?

-igor

ps: ironically if you did want to override getDisplayValue() in a way
that broke the contract you would have to make your subclass final so
no one further down the road could subclass it...


On Tue, Jan 7, 2014 at 6:37 AM, Oliver B. Fischer mails...@swe-blog.net wrote:

Hi,

I just tried to customize EnumChoiceRenderer and to override
getDisplayValue, but is final. Why?

Can I submit a patch to remove final?

Bye,

Oliver

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



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



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



Re: RequestCycleListener and setPageExpiredErrorPage

2014-01-13 Thread Martin Grigorov
Hi,

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 10:52 AM, christoph.ma...@t-systems.com wrote:

 Hello,

 in my application I do the following configurations:
 getApplicationSettings().setPageExpiredErrorPage(Timeout.class);

 getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
 getRequestCycleListeners().add(new RequestCycleExceptionListener());

 my RequestCycleExceptionListener looks like this:
 public class RequestCycleExceptionListener extends
 AbstractRequestCycleListener {

 @Override
 public IRequestHandler onException(RequestCycle cycle, Exception ex) {


return null in case of: ex instanceOf PageExpiredException


 return new RenderPageRequestHandler(new PageProvider(new
 InternalError(getStackTrace(ex;
}

 private String getStackTrace(Exception ex) {
 return ex.getMessage();
 }
 }

 Now my problem, if the session expired I will be directed to my
 InternalError-Page. There I can see the Message page xyz expired. But I
 want to be directed to my Timeout-page. It will be right if I delete the
 two lines where I add my RequestCycleListener. What should I do to be
 directed to the timeout-page if the session expires and to the
 InternalError-page if an exception is thrown?

 Can anybody help me please?


 Mit freundlichen Grüßen
 Christoph Manig





set RequestCycle in parallel Thread

2014-01-13 Thread Christoph.Manig
Hello,

I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. I do this 
the following way:

public class TableDisabler implements Runnable{

private IndicatingAjaxButton button;

public TableDisabler (IndicatingAjaxButton button){
this.button=button;

}

@Override
public void run() {
button.add(new AjaxEventBehavior(onClick) {
@Override
protected void onEvent(AjaxRequestTarget ajaxRequestTarget) {
CustomDataTable table = 
(CustomDataTable)button.getPage().get(searchTable);
table.setEnabled(false);
ajaxRequestTarget.add(table);

}
});
}
}

When the button is clicked I start this thread, but I get this exception:
Exception in thread Thread-69 org.apache.wicket.WicketRuntimeException: No 
RequestCycle is currently set!
at org.apache.wicket.Component.getRequest(Component.java:1795)
at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
at org.apache.wicket.Page.dirty(Page.java:255)
at org.apache.wicket.Page.componentStateChanging(Page.java:930)
at org.apache.wicket.Component.addStateChange(Component.java:3519)
at org.apache.wicket.Behaviors.add(Behaviors.java:55)
at org.apache.wicket.Component.add(Component.java:4503)
at 
smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
at java.lang.Thread.run(Thread.java:722)
Exception in thread Thread-70 org.apache.wicket.WicketRuntimeException: No 
RequestCycle is currently set!
at org.apache.wicket.Component.getRequest(Component.java:1795)
at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
at org.apache.wicket.Page.dirty(Page.java:255)
at org.apache.wicket.Page.componentStateChanging(Page.java:930)
at org.apache.wicket.Component.addStateChange(Component.java:3519)
at org.apache.wicket.Behaviors.add(Behaviors.java:55)
at org.apache.wicket.Component.add(Component.java:4503)
at 
smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
at java.lang.Thread.run(Thread.java:722)

How can I set an RequestCycle in this Thread, so that the table will be 
disabled if the button is clicked?

Mit freundlichen Grüßen
Christoph Manig




Re: Why is getDisplayValue in getDisplayValue final?

2014-01-13 Thread Oliver B. Fischer



Am 10.01.14 08:41, schrieb Martin Grigorov:

if you consulted with the source you would see that there is no reason
to override that method directly as its functionality can  be
completely replaced by overriding postprocess()... so why override the
original?



For example to prevent MissingResourceException that may be thrown if the
app doesn't have a value for the resource key.



This is exactly my use case.

Oliver

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



Re: set RequestCycle in parallel Thread

2014-01-13 Thread Ernesto Reinaldo Barreiro
Why do you need o start a new thread? Is I might ask the question?


On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com wrote:

 Hello,

 I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. I do
 this the following way:

 public class TableDisabler implements Runnable{

 private IndicatingAjaxButton button;

 public TableDisabler (IndicatingAjaxButton button){
 this.button=button;

 }

 @Override
 public void run() {
 button.add(new AjaxEventBehavior(onClick) {
 @Override
 protected void onEvent(AjaxRequestTarget ajaxRequestTarget) {
 CustomDataTable table =
 (CustomDataTable)button.getPage().get(searchTable);
 table.setEnabled(false);
 ajaxRequestTarget.add(table);

 }
 });
 }
 }

 When the button is clicked I start this thread, but I get this exception:
 Exception in thread Thread-69 org.apache.wicket.WicketRuntimeException:
 No RequestCycle is currently set!
 at org.apache.wicket.Component.getRequest(Component.java:1795)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
 at org.apache.wicket.Page.dirty(Page.java:255)
 at org.apache.wicket.Page.componentStateChanging(Page.java:930)
 at org.apache.wicket.Component.addStateChange(Component.java:3519)
 at org.apache.wicket.Behaviors.add(Behaviors.java:55)
 at org.apache.wicket.Component.add(Component.java:4503)
 at
 smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
 at java.lang.Thread.run(Thread.java:722)
 Exception in thread Thread-70 org.apache.wicket.WicketRuntimeException:
 No RequestCycle is currently set!
 at org.apache.wicket.Component.getRequest(Component.java:1795)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
 at org.apache.wicket.Page.dirty(Page.java:255)
 at org.apache.wicket.Page.componentStateChanging(Page.java:930)
 at org.apache.wicket.Component.addStateChange(Component.java:3519)
 at org.apache.wicket.Behaviors.add(Behaviors.java:55)
 at org.apache.wicket.Component.add(Component.java:4503)
 at
 smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
 at java.lang.Thread.run(Thread.java:722)

 How can I set an RequestCycle in this Thread, so that the table will be
 disabled if the button is clicked?

 Mit freundlichen Grüßen
 Christoph Manig





-- 
Regards - Ernesto Reinaldo Barreiro


AW: set RequestCycle in parallel Thread

2014-01-13 Thread Christoph.Manig
If I only add the behaviour to the button it is not fast enough. If the user 
clicks the button an sql-statement starts running which collects a lot of data. 
The delay between clicking the button and disabling the table is too big. 
That's why I want to do this in a parallel thead.


Mit freundlichen Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Gesendet: Montag, 13. Januar 2014 12:10
An: users@wicket.apache.org
Betreff: Re: set RequestCycle in parallel Thread

Why do you need o start a new thread? Is I might ask the question?


On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com wrote:

 Hello,

 I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. I 
 do this the following way:

 public class TableDisabler implements Runnable{

 private IndicatingAjaxButton button;

 public TableDisabler (IndicatingAjaxButton button){
 this.button=button;

 }

 @Override
 public void run() {
 button.add(new AjaxEventBehavior(onClick) {
 @Override
 protected void onEvent(AjaxRequestTarget ajaxRequestTarget) {
 CustomDataTable table = 
 (CustomDataTable)button.getPage().get(searchTable);
 table.setEnabled(false);
 ajaxRequestTarget.add(table);

 }
 });
 }
 }

 When the button is clicked I start this thread, but I get this exception:
 Exception in thread Thread-69 org.apache.wicket.WicketRuntimeException:
 No RequestCycle is currently set!
 at org.apache.wicket.Component.getRequest(Component.java:1795)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
 at org.apache.wicket.Page.dirty(Page.java:255)
 at org.apache.wicket.Page.componentStateChanging(Page.java:930)
 at org.apache.wicket.Component.addStateChange(Component.java:3519)
 at org.apache.wicket.Behaviors.add(Behaviors.java:55)
 at org.apache.wicket.Component.add(Component.java:4503)
 at
 smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
 at java.lang.Thread.run(Thread.java:722)
 Exception in thread Thread-70 org.apache.wicket.WicketRuntimeException:
 No RequestCycle is currently set!
 at org.apache.wicket.Component.getRequest(Component.java:1795)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
 at org.apache.wicket.Page.dirty(Page.java:255)
 at org.apache.wicket.Page.componentStateChanging(Page.java:930)
 at org.apache.wicket.Component.addStateChange(Component.java:3519)
 at org.apache.wicket.Behaviors.add(Behaviors.java:55)
 at org.apache.wicket.Component.add(Component.java:4503)
 at
 smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
 at java.lang.Thread.run(Thread.java:722)

 How can I set an RequestCycle in this Thread, so that the table will 
 be disabled if the button is clicked?

 Mit freundlichen Grüßen
 Christoph Manig





--
Regards - Ernesto Reinaldo Barreiro

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



Re: set RequestCycle in parallel Thread

2014-01-13 Thread Martin Grigorov
Hi,

It won't be faster again.
Your best bet is to use plain JavaScript so that the table is disabled
before the Ajax call is even made to the server.
See AjaxRequestAttributes's onBeforeSend() method
(IndicatingAjaxButton#updateAjaxAttributes()).

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 1:16 PM, christoph.ma...@t-systems.com wrote:

 If I only add the behaviour to the button it is not fast enough. If the
 user clicks the button an sql-statement starts running which collects a lot
 of data. The delay between clicking the button and disabling the table is
 too big. That's why I want to do this in a parallel thead.


 Mit freundlichen Grüßen
 Christoph Manig

 -Ursprüngliche Nachricht-
 Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Gesendet: Montag, 13. Januar 2014 12:10
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Why do you need o start a new thread? Is I might ask the question?


 On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com wrote:

  Hello,
 
  I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. I
  do this the following way:
 
  public class TableDisabler implements Runnable{
 
  private IndicatingAjaxButton button;
 
  public TableDisabler (IndicatingAjaxButton button){
  this.button=button;
 
  }
 
  @Override
  public void run() {
  button.add(new AjaxEventBehavior(onClick) {
  @Override
  protected void onEvent(AjaxRequestTarget ajaxRequestTarget) {
  CustomDataTable table =
  (CustomDataTable)button.getPage().get(searchTable);
  table.setEnabled(false);
  ajaxRequestTarget.add(table);
 
  }
  });
  }
  }
 
  When the button is clicked I start this thread, but I get this exception:
  Exception in thread Thread-69 org.apache.wicket.WicketRuntimeException:
  No RequestCycle is currently set!
  at org.apache.wicket.Component.getRequest(Component.java:1795)
  at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
  at org.apache.wicket.Page.dirty(Page.java:255)
  at org.apache.wicket.Page.componentStateChanging(Page.java:930)
  at
 org.apache.wicket.Component.addStateChange(Component.java:3519)
  at org.apache.wicket.Behaviors.add(Behaviors.java:55)
  at org.apache.wicket.Component.add(Component.java:4503)
  at
 
 smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
  at java.lang.Thread.run(Thread.java:722)
  Exception in thread Thread-70 org.apache.wicket.WicketRuntimeException:
  No RequestCycle is currently set!
  at org.apache.wicket.Component.getRequest(Component.java:1795)
  at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
  at org.apache.wicket.Page.dirty(Page.java:255)
  at org.apache.wicket.Page.componentStateChanging(Page.java:930)
  at
 org.apache.wicket.Component.addStateChange(Component.java:3519)
  at org.apache.wicket.Behaviors.add(Behaviors.java:55)
  at org.apache.wicket.Component.add(Component.java:4503)
  at
 
 smw.console.frontend.components.support.TableDisabler.run(TableDisabler.java:18)
  at java.lang.Thread.run(Thread.java:722)
 
  How can I set an RequestCycle in this Thread, so that the table will
  be disabled if the button is clicked?
 
  Mit freundlichen Grüßen
  Christoph Manig
 
 
 


 --
 Regards - Ernesto Reinaldo Barreiro

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




AW: set RequestCycle in parallel Thread

2014-01-13 Thread Christoph.Manig
Can you give a more detailed example? I cant see how I should add JavaScript 
and how I should use the updateAjaxAttributes method.


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com

T-SYSTEMS INTERNATIONAL GMBH
Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo 
Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
Sitz der Gesellschaft: Frankfurt am Main
WEEE-Reg.-Nr. DE50335567


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org] 
Gesendet: Montag, 13. Januar 2014 12:44
An: users@wicket.apache.org
Betreff: Re: set RequestCycle in parallel Thread

Hi,

It won't be faster again.
Your best bet is to use plain JavaScript so that the table is disabled before 
the Ajax call is even made to the server.
See AjaxRequestAttributes's onBeforeSend() method 
(IndicatingAjaxButton#updateAjaxAttributes()).

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 1:16 PM, christoph.ma...@t-systems.com wrote:

 If I only add the behaviour to the button it is not fast enough. If 
 the user clicks the button an sql-statement starts running which 
 collects a lot of data. The delay between clicking the button and 
 disabling the table is too big. That's why I want to do this in a parallel 
 thead.


 Mit freundlichen Grüßen
 Christoph Manig

 -Ursprüngliche Nachricht-
 Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Gesendet: Montag, 13. Januar 2014 12:10
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Why do you need o start a new thread? Is I might ask the question?


 On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com wrote:

  Hello,
 
  I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. I 
  do this the following way:
 
  public class TableDisabler implements Runnable{
 
  private IndicatingAjaxButton button;
 
  public TableDisabler (IndicatingAjaxButton button){
  this.button=button;
 
  }
 
  @Override
  public void run() {
  button.add(new AjaxEventBehavior(onClick) {
  @Override
  protected void onEvent(AjaxRequestTarget ajaxRequestTarget) {
  CustomDataTable table = 
  (CustomDataTable)button.getPage().get(searchTable);
  table.setEnabled(false);
  ajaxRequestTarget.add(table);
 
  }
  });
  }
  }
 
  When the button is clicked I start this thread, but I get this exception:
  Exception in thread Thread-69 org.apache.wicket.WicketRuntimeException:
  No RequestCycle is currently set!
  at org.apache.wicket.Component.getRequest(Component.java:1795)
  at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
  at org.apache.wicket.Page.dirty(Page.java:255)
  at org.apache.wicket.Page.componentStateChanging(Page.java:930)
  at
 org.apache.wicket.Component.addStateChange(Component.java:3519)
  at org.apache.wicket.Behaviors.add(Behaviors.java:55)
  at org.apache.wicket.Component.add(Component.java:4503)
  at
 
 smw.console.frontend.components.support.TableDisabler.run(TableDisable
 r.java:18)
  at java.lang.Thread.run(Thread.java:722)
  Exception in thread Thread-70 org.apache.wicket.WicketRuntimeException:
  No RequestCycle is currently set!
  at org.apache.wicket.Component.getRequest(Component.java:1795)
  at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
  at org.apache.wicket.Page.dirty(Page.java:255)
  at org.apache.wicket.Page.componentStateChanging(Page.java:930)
  at
 org.apache.wicket.Component.addStateChange(Component.java:3519)
  at org.apache.wicket.Behaviors.add(Behaviors.java:55)
  at org.apache.wicket.Component.add(Component.java:4503)
  at
 
 smw.console.frontend.components.support.TableDisabler.run(TableDisable
 r.java:18)
  at java.lang.Thread.run(Thread.java:722)
 
  How can I set an RequestCycle in this Thread, so that the table will 
  be disabled if the button is clicked?
 
  Mit freundlichen Grüßen
  Christoph Manig
 
 
 


 --
 Regards - Ernesto Reinaldo Barreiro

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




Re: set RequestCycle in parallel Thread

2014-01-13 Thread Martin Grigorov
demo of Wicket 6 AjaxRequestAttributes:
https://github.com/martin-g/blogs/blob/master/wicket6-ajax-demo/src/main/java/com/wicketinaction/HandlebarsButton.java#L104

use beforeSend() callback to execute something like:
http://stackoverflow.com/questions/14929095/how-to-add-a-veil-div-to-a-table-row

More docs about Wicket6's improvements in Ajax area:
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 1:54 PM, christoph.ma...@t-systems.com wrote:

 Can you give a more detailed example? I cant see how I should add
 JavaScript and how I should use the updateAjaxAttributes method.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com

 T-SYSTEMS INTERNATIONAL GMBH
 Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
 Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan,
 Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
 Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
 Sitz der Gesellschaft: Frankfurt am Main
 WEEE-Reg.-Nr. DE50335567


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Montag, 13. Januar 2014 12:44
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Hi,

 It won't be faster again.
 Your best bet is to use plain JavaScript so that the table is disabled
 before the Ajax call is even made to the server.
 See AjaxRequestAttributes's onBeforeSend() method
 (IndicatingAjaxButton#updateAjaxAttributes()).

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, Jan 13, 2014 at 1:16 PM, christoph.ma...@t-systems.com wrote:

  If I only add the behaviour to the button it is not fast enough. If
  the user clicks the button an sql-statement starts running which
  collects a lot of data. The delay between clicking the button and
  disabling the table is too big. That's why I want to do this in a
 parallel thead.
 
 
  Mit freundlichen Grüßen
  Christoph Manig
 
  -Ursprüngliche Nachricht-
  Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
  Gesendet: Montag, 13. Januar 2014 12:10
  An: users@wicket.apache.org
  Betreff: Re: set RequestCycle in parallel Thread
 
  Why do you need o start a new thread? Is I might ask the question?
 
 
  On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com wrote:
 
   Hello,
  
   I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. I
   do this the following way:
  
   public class TableDisabler implements Runnable{
  
   private IndicatingAjaxButton button;
  
   public TableDisabler (IndicatingAjaxButton button){
   this.button=button;
  
   }
  
   @Override
   public void run() {
   button.add(new AjaxEventBehavior(onClick) {
   @Override
   protected void onEvent(AjaxRequestTarget
 ajaxRequestTarget) {
   CustomDataTable table =
   (CustomDataTable)button.getPage().get(searchTable);
   table.setEnabled(false);
   ajaxRequestTarget.add(table);
  
   }
   });
   }
   }
  
   When the button is clicked I start this thread, but I get this
 exception:
   Exception in thread Thread-69
 org.apache.wicket.WicketRuntimeException:
   No RequestCycle is currently set!
   at org.apache.wicket.Component.getRequest(Component.java:1795)
   at
 org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
   at org.apache.wicket.Page.dirty(Page.java:255)
   at org.apache.wicket.Page.componentStateChanging(Page.java:930)
   at
  org.apache.wicket.Component.addStateChange(Component.java:3519)
   at org.apache.wicket.Behaviors.add(Behaviors.java:55)
   at org.apache.wicket.Component.add(Component.java:4503)
   at
  
  smw.console.frontend.components.support.TableDisabler.run(TableDisable
  r.java:18)
   at java.lang.Thread.run(Thread.java:722)
   Exception in thread Thread-70
 org.apache.wicket.WicketRuntimeException:
   No RequestCycle is currently set!
   at org.apache.wicket.Component.getRequest(Component.java:1795)
   at
 org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
   at org.apache.wicket.Page.dirty(Page.java:255)
   at org.apache.wicket.Page.componentStateChanging(Page.java:930)
   at
  org.apache.wicket.Component.addStateChange(Component.java:3519)
   at org.apache.wicket.Behaviors.add(Behaviors.java:55)
   at org.apache.wicket.Component.add(Component.java:4503)
   at
  
  smw.console.frontend.components.support.TableDisabler.run(TableDisable
  r.java:18)
   at java.lang.Thread.run(Thread.java:722)
  
   How can I set 

Re: how to add field to event in a wicket.jquery.ui calendar

2014-01-13 Thread Selom
Hi sebastien,

Thanks for the reply.
Yes I called  calendar.refresh(target) and I use a CompoundPropertyModel.

May be i did not use these  the right way?

I called also calendar.modelChanged() after the form submit but still the
same behavoir.

Please see my  attached quick start zip. 

Best regards.

s-quickstart.zip
http://apache-wicket.1842946.n4.nabble.com/file/n4663644/s-quickstart.zip  

-
Selom
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-add-field-to-event-in-a-wicket-jquery-ui-calendar-tp4663617p4663644.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: set RequestCycle in parallel Thread

2014-01-13 Thread Ernesto Reinaldo Barreiro
Hi,

Just put a div that covers the table and make it visible (hive it after
AJAX). There are many ways to do this in Wicket one is
using IAjaxIndicatorAware. There was an article on wicket in action page
explaining how to use it (if I recall correctly).


On Mon, Jan 13, 2014 at 12:54 PM, christoph.ma...@t-systems.com wrote:

 Can you give a more detailed example? I cant see how I should add
 JavaScript and how I should use the updateAjaxAttributes method.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com

 T-SYSTEMS INTERNATIONAL GMBH
 Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
 Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan,
 Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
 Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
 Sitz der Gesellschaft: Frankfurt am Main
 WEEE-Reg.-Nr. DE50335567


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Montag, 13. Januar 2014 12:44
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Hi,

 It won't be faster again.
 Your best bet is to use plain JavaScript so that the table is disabled
 before the Ajax call is even made to the server.
 See AjaxRequestAttributes's onBeforeSend() method
 (IndicatingAjaxButton#updateAjaxAttributes()).

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, Jan 13, 2014 at 1:16 PM, christoph.ma...@t-systems.com wrote:

  If I only add the behaviour to the button it is not fast enough. If
  the user clicks the button an sql-statement starts running which
  collects a lot of data. The delay between clicking the button and
  disabling the table is too big. That's why I want to do this in a
 parallel thead.
 
 
  Mit freundlichen Grüßen
  Christoph Manig
 
  -Ursprüngliche Nachricht-
  Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
  Gesendet: Montag, 13. Januar 2014 12:10
  An: users@wicket.apache.org
  Betreff: Re: set RequestCycle in parallel Thread
 
  Why do you need o start a new thread? Is I might ask the question?
 
 
  On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com wrote:
 
   Hello,
  
   I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. I
   do this the following way:
  
   public class TableDisabler implements Runnable{
  
   private IndicatingAjaxButton button;
  
   public TableDisabler (IndicatingAjaxButton button){
   this.button=button;
  
   }
  
   @Override
   public void run() {
   button.add(new AjaxEventBehavior(onClick) {
   @Override
   protected void onEvent(AjaxRequestTarget
 ajaxRequestTarget) {
   CustomDataTable table =
   (CustomDataTable)button.getPage().get(searchTable);
   table.setEnabled(false);
   ajaxRequestTarget.add(table);
  
   }
   });
   }
   }
  
   When the button is clicked I start this thread, but I get this
 exception:
   Exception in thread Thread-69
 org.apache.wicket.WicketRuntimeException:
   No RequestCycle is currently set!
   at org.apache.wicket.Component.getRequest(Component.java:1795)
   at
 org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
   at org.apache.wicket.Page.dirty(Page.java:255)
   at org.apache.wicket.Page.componentStateChanging(Page.java:930)
   at
  org.apache.wicket.Component.addStateChange(Component.java:3519)
   at org.apache.wicket.Behaviors.add(Behaviors.java:55)
   at org.apache.wicket.Component.add(Component.java:4503)
   at
  
  smw.console.frontend.components.support.TableDisabler.run(TableDisable
  r.java:18)
   at java.lang.Thread.run(Thread.java:722)
   Exception in thread Thread-70
 org.apache.wicket.WicketRuntimeException:
   No RequestCycle is currently set!
   at org.apache.wicket.Component.getRequest(Component.java:1795)
   at
 org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
   at org.apache.wicket.Page.dirty(Page.java:255)
   at org.apache.wicket.Page.componentStateChanging(Page.java:930)
   at
  org.apache.wicket.Component.addStateChange(Component.java:3519)
   at org.apache.wicket.Behaviors.add(Behaviors.java:55)
   at org.apache.wicket.Component.add(Component.java:4503)
   at
  
  smw.console.frontend.components.support.TableDisabler.run(TableDisable
  r.java:18)
   at java.lang.Thread.run(Thread.java:722)
  
   How can I set an RequestCycle in this Thread, so that the table will
   be disabled if the button is clicked?
  
   Mit freundlichen Grüßen
   Christoph Manig
  
  
  
 
 
  --
  Regards - Ernesto Reinaldo Barreiro
 
  

AW: set RequestCycle in parallel Thread

2014-01-13 Thread Christoph.Manig
I dont want to cover the table. It should be readable for the user. My issue is 
that the user cant click the toolbars while the request is running.
This resolution works, I can see the text 'Before ajax call:
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes){
super.updateAjaxAttributes(attributes);

IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
@Override
public CharSequence getBeforeHandler(Component component){
return alert('Before ajax call');;
}
};
attributes.getAjaxCallListeners().add(ajaxCallListener);
}

How can I disable a table in Javascript? It says that wont be possible. 


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 - 209
email:  christoph.ma...@t-systems.com

T-SYSTEMS INTERNATIONAL GMBH
Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo 
Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
Sitz der Gesellschaft: Frankfurt am Main
WEEE-Reg.-Nr. DE50335567


-Ursprüngliche Nachricht-
Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Gesendet: Montag, 13. Januar 2014 13:09
An: users@wicket.apache.org
Betreff: Re: set RequestCycle in parallel Thread

Hi,

Just put a div that covers the table and make it visible (hive it after AJAX). 
There are many ways to do this in Wicket one is using IAjaxIndicatorAware. 
There was an article on wicket in action page explaining how to use it (if I 
recall correctly).


On Mon, Jan 13, 2014 at 12:54 PM, christoph.ma...@t-systems.com wrote:

 Can you give a more detailed example? I cant see how I should add 
 JavaScript and how I should use the updateAjaxAttributes method.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com

 T-SYSTEMS INTERNATIONAL GMBH
 Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
 Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri 
 Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen 
 Rickmann
 Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der 
 Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Montag, 13. Januar 2014 12:44
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Hi,

 It won't be faster again.
 Your best bet is to use plain JavaScript so that the table is disabled 
 before the Ajax call is even made to the server.
 See AjaxRequestAttributes's onBeforeSend() method 
 (IndicatingAjaxButton#updateAjaxAttributes()).

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, Jan 13, 2014 at 1:16 PM, christoph.ma...@t-systems.com wrote:

  If I only add the behaviour to the button it is not fast enough. If 
  the user clicks the button an sql-statement starts running which 
  collects a lot of data. The delay between clicking the button and 
  disabling the table is too big. That's why I want to do this in a
 parallel thead.
 
 
  Mit freundlichen Grüßen
  Christoph Manig
 
  -Ursprüngliche Nachricht-
  Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
  Gesendet: Montag, 13. Januar 2014 12:10
  An: users@wicket.apache.org
  Betreff: Re: set RequestCycle in parallel Thread
 
  Why do you need o start a new thread? Is I might ask the question?
 
 
  On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com wrote:
 
   Hello,
  
   I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton. 
   I do this the following way:
  
   public class TableDisabler implements Runnable{
  
   private IndicatingAjaxButton button;
  
   public TableDisabler (IndicatingAjaxButton button){
   this.button=button;
  
   }
  
   @Override
   public void run() {
   button.add(new AjaxEventBehavior(onClick) {
   @Override
   protected void onEvent(AjaxRequestTarget
 ajaxRequestTarget) {
   CustomDataTable table = 
   (CustomDataTable)button.getPage().get(searchTable);
   table.setEnabled(false);
   ajaxRequestTarget.add(table);
  
   }
   });
   }
   }
  
   When the button is clicked I start this thread, but I get this
 exception:
   Exception in thread Thread-69
 org.apache.wicket.WicketRuntimeException:
   No RequestCycle is currently set!
   at 

Re: set RequestCycle in parallel Thread

2014-01-13 Thread Martin Grigorov
See my link to StackOverflow.
It shows how to disable a row. By disable it means put a div above the
row so it receives any clicks. The div may be transparent so your users
won't notice it.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 2:42 PM, christoph.ma...@t-systems.com wrote:

 I dont want to cover the table. It should be readable for the user. My
 issue is that the user cant click the toolbars while the request is running.
 This resolution works, I can see the text 'Before ajax call:
 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attributes){
 super.updateAjaxAttributes(attributes);

 IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
 @Override
 public CharSequence getBeforeHandler(Component component){
 return alert('Before ajax call');;
 }
 };
 attributes.getAjaxCallListeners().add(ajaxCallListener);
 }

 How can I disable a table in Javascript? It says that wont be possible.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com

 T-SYSTEMS INTERNATIONAL GMBH
 Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
 Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan,
 Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
 Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
 Sitz der Gesellschaft: Frankfurt am Main
 WEEE-Reg.-Nr. DE50335567


 -Ursprüngliche Nachricht-
 Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Gesendet: Montag, 13. Januar 2014 13:09
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Hi,

 Just put a div that covers the table and make it visible (hive it after
 AJAX). There are many ways to do this in Wicket one is using
 IAjaxIndicatorAware. There was an article on wicket in action page
 explaining how to use it (if I recall correctly).


 On Mon, Jan 13, 2014 at 12:54 PM, christoph.ma...@t-systems.com wrote:

  Can you give a more detailed example? I cant see how I should add
  JavaScript and how I should use the updateAjaxAttributes method.
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 - 209
  email:  christoph.ma...@t-systems.com
 
  T-SYSTEMS INTERNATIONAL GMBH
  Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
  Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri
  Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen
  Rickmann
  Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der
  Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567
 
 
  -Ursprüngliche Nachricht-
  Von: Martin Grigorov [mailto:mgrigo...@apache.org]
  Gesendet: Montag, 13. Januar 2014 12:44
  An: users@wicket.apache.org
  Betreff: Re: set RequestCycle in parallel Thread
 
  Hi,
 
  It won't be faster again.
  Your best bet is to use plain JavaScript so that the table is disabled
  before the Ajax call is even made to the server.
  See AjaxRequestAttributes's onBeforeSend() method
  (IndicatingAjaxButton#updateAjaxAttributes()).
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Mon, Jan 13, 2014 at 1:16 PM, christoph.ma...@t-systems.com wrote:
 
   If I only add the behaviour to the button it is not fast enough. If
   the user clicks the button an sql-statement starts running which
   collects a lot of data. The delay between clicking the button and
   disabling the table is too big. That's why I want to do this in a
  parallel thead.
  
  
   Mit freundlichen Grüßen
   Christoph Manig
  
   -Ursprüngliche Nachricht-
   Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
   Gesendet: Montag, 13. Januar 2014 12:10
   An: users@wicket.apache.org
   Betreff: Re: set RequestCycle in parallel Thread
  
   Why do you need o start a new thread? Is I might ask the question?
  
  
   On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com
 wrote:
  
Hello,
   
I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton.
I do this the following way:
   
public class TableDisabler implements Runnable{
   
private IndicatingAjaxButton button;
   
public TableDisabler (IndicatingAjaxButton button){
this.button=button;
   
}
   
@Override
public void run() {
button.add(new AjaxEventBehavior(onClick) {
@Override
protected void onEvent(AjaxRequestTarget
  ajaxRequestTarget) {
CustomDataTable table =

Re: set RequestCycle in parallel Thread

2014-01-13 Thread Ernesto Reinaldo Barreiro
Hi,

I mean cover it with a veil: semi-transparent blocking click.
IAjaxIndicatorAware
will make this DIV visible.


On Mon, Jan 13, 2014 at 1:42 PM, christoph.ma...@t-systems.com wrote:

 I dont want to cover the table. It should be readable for the user. My
 issue is that the user cant click the toolbars while the request is running.
 This resolution works, I can see the text 'Before ajax call:
 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attributes){
 super.updateAjaxAttributes(attributes);

 IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
 @Override
 public CharSequence getBeforeHandler(Component component){
 return alert('Before ajax call');;
 }
 };
 attributes.getAjaxCallListeners().add(ajaxCallListener);
 }

 How can I disable a table in Javascript? It says that wont be possible.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com

 T-SYSTEMS INTERNATIONAL GMBH
 Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
 Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan,
 Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
 Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
 Sitz der Gesellschaft: Frankfurt am Main
 WEEE-Reg.-Nr. DE50335567


 -Ursprüngliche Nachricht-
 Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Gesendet: Montag, 13. Januar 2014 13:09
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Hi,

 Just put a div that covers the table and make it visible (hive it after
 AJAX). There are many ways to do this in Wicket one is using
 IAjaxIndicatorAware. There was an article on wicket in action page
 explaining how to use it (if I recall correctly).


 On Mon, Jan 13, 2014 at 12:54 PM, christoph.ma...@t-systems.com wrote:

  Can you give a more detailed example? I cant see how I should add
  JavaScript and how I should use the updateAjaxAttributes method.
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 - 209
  email:  christoph.ma...@t-systems.com
 
  T-SYSTEMS INTERNATIONAL GMBH
  Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
  Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri
  Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen
  Rickmann
  Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der
  Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567
 
 
  -Ursprüngliche Nachricht-
  Von: Martin Grigorov [mailto:mgrigo...@apache.org]
  Gesendet: Montag, 13. Januar 2014 12:44
  An: users@wicket.apache.org
  Betreff: Re: set RequestCycle in parallel Thread
 
  Hi,
 
  It won't be faster again.
  Your best bet is to use plain JavaScript so that the table is disabled
  before the Ajax call is even made to the server.
  See AjaxRequestAttributes's onBeforeSend() method
  (IndicatingAjaxButton#updateAjaxAttributes()).
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Mon, Jan 13, 2014 at 1:16 PM, christoph.ma...@t-systems.com wrote:
 
   If I only add the behaviour to the button it is not fast enough. If
   the user clicks the button an sql-statement starts running which
   collects a lot of data. The delay between clicking the button and
   disabling the table is too big. That's why I want to do this in a
  parallel thead.
  
  
   Mit freundlichen Grüßen
   Christoph Manig
  
   -Ursprüngliche Nachricht-
   Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
   Gesendet: Montag, 13. Januar 2014 12:10
   An: users@wicket.apache.org
   Betreff: Re: set RequestCycle in parallel Thread
  
   Why do you need o start a new thread? Is I might ask the question?
  
  
   On Mon, Jan 13, 2014 at 11:58 AM, christoph.ma...@t-systems.com
 wrote:
  
Hello,
   
I want to add a new AjaxEventBehaviour to my IndicatingAjaxButton.
I do this the following way:
   
public class TableDisabler implements Runnable{
   
private IndicatingAjaxButton button;
   
public TableDisabler (IndicatingAjaxButton button){
this.button=button;
   
}
   
@Override
public void run() {
button.add(new AjaxEventBehavior(onClick) {
@Override
protected void onEvent(AjaxRequestTarget
  ajaxRequestTarget) {
CustomDataTable table =
(CustomDataTable)button.getPage().get(searchTable);
table.setEnabled(false);
ajaxRequestTarget.add(table);
   
  

NPEs when locating resources after upgrading to Wicket 6.13.0

2014-01-13 Thread Thomas Heigl
Hey all,

I just tried to upgrade to Wicket 6.13.0 because of the new JQuery version
packaged with it. It breaks some of our resource mounting functionality
that has been working since 1.4x and some package resources cannot be found
anymore. Have there been changes to resource mounting in this release?

A sample exception looks like this:

org.apache.wicket.WicketRuntimeException: An error occurred while
 generating an Url for handler
 'ResourceReferenceRequestHandler{resourceReference=scope:
 com.synexit.friendsic.view.wicket.staticcontent.StaticContentBase; name:
 /images/alt_neu_v2.jpg; locale: null; style: null; variation: null,
 pageParameters=}'
 at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
 at
 org.apache.wicket.util.resource.ResourceStreamWrapper.init(ResourceStreamWrapper.java:36)
 at
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:476)
 at
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:472)
 at
 org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:465)
 at
 org.apache.wicket.request.resource.PackageResource.getCacheableResourceStream(PackageResource.java:395)
 at
 org.apache.wicket.request.resource.PackageResource.getCacheKey(PackageResource.java:227)
 at
 org.apache.wicket.request.resource.caching.version.RequestCycleCachedResourceVersion.getVersion(RequestCycleCachedResourceVersion.java:81)
 at
 org.apache.wicket.request.resource.caching.FilenameWithVersionResourceCachingStrategy.decorateUrl(FilenameWithVersionResourceCachingStrategy.java:102)
 at
 org.apache.wicket.core.request.mapper.BasicResourceReferenceMapper.mapHandler(BasicResourceReferenceMapper.java:238)
 at
 org.apache.wicket.request.mapper.ParentPathReferenceRewriter.mapHandler(ParentPathReferenceRewriter.java:91)
 at
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:215)
 at
 org.apache.wicket.util.tester.BaseWicketTester$TestRequestMapper.mapHandler(BaseWicketTester.java:2758)
 at
 org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:429)
 at
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:529)
 at
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:492)


The resource is there and works perfectly with Wicket 6.12.0.

Any ideas?

Cheers,

Thomas


Re: how to add field to event in a wicket.jquery.ui calendar

2014-01-13 Thread Sebastien
Hi Pierre,

Thanks for the attached zip. I do not see weird things that can prevent the
autocomplete to reflect the changed model object.
Unfortunately, I am not able to debug the quickstart because it missing to
much dependencies (Joda, Spring...) and custom classes (AgendaModele,
AmemetTemplate, etc)...

What I will suggest you is to ensure your bean is correctly persisted when
submitting the dialog. I do not see any reason why the event updates are
not reflected, calling calendar.refresh(target) suffice to refetch events
from server (no need to call calendar.modelChanged() actually)

If you wish to resend me a complete (and compiling) quickstart, you can use
this:
http://wicket.apache.org/start/quickstart.html

Good luck and best regards,
Sebastien.



On Mon, Jan 13, 2014 at 1:06 PM, Selom pierre.kou...@uhb.fr wrote:

 Hi sebastien,

 Thanks for the reply.
 Yes I called  calendar.refresh(target) and I use a CompoundPropertyModel.

 May be i did not use these  the right way?

 I called also calendar.modelChanged() after the form submit but still the
 same behavoir.

 Please see my  attached quick start zip.

 Best regards.

 s-quickstart.zip
 http://apache-wicket.1842946.n4.nabble.com/file/n4663644/s-quickstart.zip
 

 -
 Selom
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/how-to-add-field-to-event-in-a-wicket-jquery-ui-calendar-tp4663617p4663644.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: NPEs when locating resources after upgrading to Wicket 6.13.0

2014-01-13 Thread Martin Grigorov
Hi,

Please check your logs for : Argument 'delegate' may not be null.

This is what
g.Args.notNull(Args.java:41)
 at
 org.apache.wicket.util.resource.ResourceStreamWrapper.init(
ResourceStreamWrapper.java:36)
 at

should actually throw.

I am looking why it could be null.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 3:02 PM, Thomas Heigl tho...@umschalt.com wrote:

 Hey all,

 I just tried to upgrade to Wicket 6.13.0 because of the new JQuery version
 packaged with it. It breaks some of our resource mounting functionality
 that has been working since 1.4x and some package resources cannot be found
 anymore. Have there been changes to resource mounting in this release?

 A sample exception looks like this:

 org.apache.wicket.WicketRuntimeException: An error occurred while
  generating an Url for handler
  'ResourceReferenceRequestHandler{resourceReference=scope:
  com.synexit.friendsic.view.wicket.staticcontent.StaticContentBase; name:
  /images/alt_neu_v2.jpg; locale: null; style: null; variation: null,
  pageParameters=}'
  at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
  at
 
 org.apache.wicket.util.resource.ResourceStreamWrapper.init(ResourceStreamWrapper.java:36)
  at
 
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:476)
  at
 
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:472)
  at
 
 org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:465)
  at
 
 org.apache.wicket.request.resource.PackageResource.getCacheableResourceStream(PackageResource.java:395)
  at
 
 org.apache.wicket.request.resource.PackageResource.getCacheKey(PackageResource.java:227)
  at
 
 org.apache.wicket.request.resource.caching.version.RequestCycleCachedResourceVersion.getVersion(RequestCycleCachedResourceVersion.java:81)
  at
 
 org.apache.wicket.request.resource.caching.FilenameWithVersionResourceCachingStrategy.decorateUrl(FilenameWithVersionResourceCachingStrategy.java:102)
  at
 
 org.apache.wicket.core.request.mapper.BasicResourceReferenceMapper.mapHandler(BasicResourceReferenceMapper.java:238)
  at
 
 org.apache.wicket.request.mapper.ParentPathReferenceRewriter.mapHandler(ParentPathReferenceRewriter.java:91)
  at
 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:215)
  at
 
 org.apache.wicket.util.tester.BaseWicketTester$TestRequestMapper.mapHandler(BaseWicketTester.java:2758)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:429)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:529)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:492)


 The resource is there and works perfectly with Wicket 6.12.0.

 Any ideas?

 Cheers,

 Thomas



Re: NPEs when locating resources after upgrading to Wicket 6.13.0

2014-01-13 Thread Martin Grigorov
Please put a breakpoint at
https://github.com/apache/wicket/blob/wicket-6.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java?source=cc#L431

It seems  /images/alt_neu_v2.jpg; locale: null; style: null; variation:
null does not exists. Only in this case the resource stream would be null.

Unfortunately this happens in a private method and I don't see how to
workaround it.
Please create a ticket with a quickstart.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 3:10 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 Please check your logs for : Argument 'delegate' may not be null.

 This is what
 g.Args.notNull(Args.java:41)
  at
  org.apache.wicket.util.resource.ResourceStreamWrapper.init(
 ResourceStreamWrapper.java:36)
  at

 should actually throw.

 I am looking why it could be null.

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, Jan 13, 2014 at 3:02 PM, Thomas Heigl tho...@umschalt.com wrote:

 Hey all,

 I just tried to upgrade to Wicket 6.13.0 because of the new JQuery version
 packaged with it. It breaks some of our resource mounting functionality
 that has been working since 1.4x and some package resources cannot be
 found
 anymore. Have there been changes to resource mounting in this release?

 A sample exception looks like this:

 org.apache.wicket.WicketRuntimeException: An error occurred while
  generating an Url for handler
  'ResourceReferenceRequestHandler{resourceReference=scope:
  com.synexit.friendsic.view.wicket.staticcontent.StaticContentBase; name:
  /images/alt_neu_v2.jpg; locale: null; style: null; variation: null,
  pageParameters=}'
  at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
  at
 
 org.apache.wicket.util.resource.ResourceStreamWrapper.init(ResourceStreamWrapper.java:36)
  at
 
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:476)
  at
 
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:472)
  at
 
 org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:465)
  at
 
 org.apache.wicket.request.resource.PackageResource.getCacheableResourceStream(PackageResource.java:395)
  at
 
 org.apache.wicket.request.resource.PackageResource.getCacheKey(PackageResource.java:227)
  at
 
 org.apache.wicket.request.resource.caching.version.RequestCycleCachedResourceVersion.getVersion(RequestCycleCachedResourceVersion.java:81)
  at
 
 org.apache.wicket.request.resource.caching.FilenameWithVersionResourceCachingStrategy.decorateUrl(FilenameWithVersionResourceCachingStrategy.java:102)
  at
 
 org.apache.wicket.core.request.mapper.BasicResourceReferenceMapper.mapHandler(BasicResourceReferenceMapper.java:238)
  at
 
 org.apache.wicket.request.mapper.ParentPathReferenceRewriter.mapHandler(ParentPathReferenceRewriter.java:91)
  at
 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:215)
  at
 
 org.apache.wicket.util.tester.BaseWicketTester$TestRequestMapper.mapHandler(BaseWicketTester.java:2758)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:429)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:529)
  at
 
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:492)


 The resource is there and works perfectly with Wicket 6.12.0.

 Any ideas?

 Cheers,

 Thomas





Re: NPEs when locating resources after upgrading to Wicket 6.13.0

2014-01-13 Thread Thomas Heigl
Hey Martin,

I don't have time to create a quickstart at the moment. If you can't find
the problem without it I'll try to do it in the next days.

The resource is definitely there and downgrading to 6.12.0 fixes the
problem immediately.

Thomas


On Mon, Jan 13, 2014 at 2:15 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Please put a breakpoint at

 https://github.com/apache/wicket/blob/wicket-6.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java?source=cc#L431

 It seems  /images/alt_neu_v2.jpg; locale: null; style: null; variation:
 null does not exists. Only in this case the resource stream would be null.

 Unfortunately this happens in a private method and I don't see how to
 workaround it.
 Please create a ticket with a quickstart.

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, Jan 13, 2014 at 3:10 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  Please check your logs for : Argument 'delegate' may not be null.
 
  This is what
  g.Args.notNull(Args.java:41)
   at
   org.apache.wicket.util.resource.ResourceStreamWrapper.init(
  ResourceStreamWrapper.java:36)
   at
 
  should actually throw.
 
  I am looking why it could be null.
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Mon, Jan 13, 2014 at 3:02 PM, Thomas Heigl tho...@umschalt.com
 wrote:
 
  Hey all,
 
  I just tried to upgrade to Wicket 6.13.0 because of the new JQuery
 version
  packaged with it. It breaks some of our resource mounting functionality
  that has been working since 1.4x and some package resources cannot be
  found
  anymore. Have there been changes to resource mounting in this release?
 
  A sample exception looks like this:
 
  org.apache.wicket.WicketRuntimeException: An error occurred while
   generating an Url for handler
   'ResourceReferenceRequestHandler{resourceReference=scope:
   com.synexit.friendsic.view.wicket.staticcontent.StaticContentBase;
 name:
   /images/alt_neu_v2.jpg; locale: null; style: null; variation: null,
   pageParameters=}'
   at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
   at
  
 
 org.apache.wicket.util.resource.ResourceStreamWrapper.init(ResourceStreamWrapper.java:36)
   at
  
 
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:476)
   at
  
 
 org.apache.wicket.request.resource.PackageResource$ProcessingResourceStream.init(PackageResource.java:472)
   at
  
 
 org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:465)
   at
  
 
 org.apache.wicket.request.resource.PackageResource.getCacheableResourceStream(PackageResource.java:395)
   at
  
 
 org.apache.wicket.request.resource.PackageResource.getCacheKey(PackageResource.java:227)
   at
  
 
 org.apache.wicket.request.resource.caching.version.RequestCycleCachedResourceVersion.getVersion(RequestCycleCachedResourceVersion.java:81)
   at
  
 
 org.apache.wicket.request.resource.caching.FilenameWithVersionResourceCachingStrategy.decorateUrl(FilenameWithVersionResourceCachingStrategy.java:102)
   at
  
 
 org.apache.wicket.core.request.mapper.BasicResourceReferenceMapper.mapHandler(BasicResourceReferenceMapper.java:238)
   at
  
 
 org.apache.wicket.request.mapper.ParentPathReferenceRewriter.mapHandler(ParentPathReferenceRewriter.java:91)
   at
  
 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:215)
   at
  
 
 org.apache.wicket.util.tester.BaseWicketTester$TestRequestMapper.mapHandler(BaseWicketTester.java:2758)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:429)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:529)
   at
  
 
 org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:492)
 
 
  The resource is there and works perfectly with Wicket 6.12.0.
 
  Any ideas?
 
  Cheers,
 
  Thomas
 
 
 



WicketTester: getLastRenderedPage() returns null

2014-01-13 Thread Oliver B. Fischer
I have strange unit test where I use the WicketTester. I perform the 
usual Does the page renders test?. In my IDE the test passes, but 
fails on the command line with Maven.


When I execute the test on the command line I can see that 
getLastRenderedPage() returns null.


Any idea how to debug this?

Bye,

Oliver

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



Fwd: Wicket and embedded tomcat

2014-01-13 Thread bangaly sangare
Hello,
I want to embed tomcat with my wicket application.
I use maven to deploy my application.
Can somebody tell how I have to do that ?

Thanks.


AW: set RequestCycle in parallel Thread

2014-01-13 Thread Christoph.Manig
I tried it like this:
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes){
super.updateAjaxAttributes(attributes);

IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
@Override
public CharSequence getBeforeHandler(Component component){
return var table = document.getElementById('searchTable');
\n +
var rowCount = table.rows.length;\n +
for (var i = 1; i  rowCount - 1; i++) { \n +
 $(\#searchTable tbody 
tr:eq(\+i+\)\).each(function(i) {\n +
var offset = $(this).offset();\n +
var veil = $('div 
class=\divVeil\/div').appendTo('body').css({\n +
position: 'absolute',\n +
top: offset.top,\n +
left: offset.left,\n +
height: $(this).outerHeight(),\n +
width: $(this).outerWidth(),\n +
});\n +
});\n +
}  ;
}
};
attributes.getAjaxCallListeners().add(ajaxCallListener);
}

But this didn’t work. Can anybody help?


Mit freundlichen Grüßen
Christoph Manig
Systems Engineer

T-Systems International GmbH
Systems Integration - SC Travel, Transport  Logistics
Hoyerswerdaer Str. 18
01099 Dresden 
tel.:   +49 (0) 351 / 8152 - 188
fax:+49 (0) 351 / 8152 – 209
email:  christoph.ma...@t-systems.com

T-SYSTEMS INTERNATIONAL GMBH
Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan, Thilo 
Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
Sitz der Gesellschaft: Frankfurt am Main
WEEE-Reg.-Nr. DE50335567


-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org] 
Gesendet: Montag, 13. Januar 2014 13:48
An: users@wicket.apache.org
Betreff: Re: set RequestCycle in parallel Thread

See my link to StackOverflow.
It shows how to disable a row. By disable it means put a div above the row 
so it receives any clicks. The div may be transparent so your users won't 
notice it.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 2:42 PM, christoph.ma...@t-systems.com wrote:

 I dont want to cover the table. It should be readable for the user. My 
 issue is that the user cant click the toolbars while the request is running.
 This resolution works, I can see the text 'Before ajax call:
 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attributes){
 super.updateAjaxAttributes(attributes);

 IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
 @Override
 public CharSequence getBeforeHandler(Component component){
 return alert('Before ajax call');;
 }
 };
 attributes.getAjaxCallListeners().add(ajaxCallListener);
 }

 How can I disable a table in Javascript? It says that wont be possible.


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
 Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 - 209
 email:  christoph.ma...@t-systems.com

 T-SYSTEMS INTERNATIONAL GMBH
 Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
 Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri 
 Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen 
 Rickmann
 Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der 
 Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567


 -Ursprüngliche Nachricht-
 Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Gesendet: Montag, 13. Januar 2014 13:09
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 Hi,

 Just put a div that covers the table and make it visible (hive it 
 after AJAX). There are many ways to do this in Wicket one is using 
 IAjaxIndicatorAware. There was an article on wicket in action page 
 explaining how to use it (if I recall correctly).


 On Mon, Jan 13, 2014 at 12:54 PM, christoph.ma...@t-systems.com wrote:

  Can you give a more detailed example? I cant see how I should add 
  JavaScript and how I should use the updateAjaxAttributes method.
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer 
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 - 209
  email:  christoph.ma...@t-systems.com
 
  T-SYSTEMS INTERNATIONAL GMBH
  Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
  Geschäftsführung: Reinhard Clemens 

Re: Fwd: Wicket and embedded tomcat

2014-01-13 Thread Richard W. Adams
What do yo mean by embed? You want to include Tomcat as part of your 
distribution?




From:   bangaly sangare bangaly.sang...@gmail.com
To: users@wicket.apache.org
Date:   01/13/2014 09:22 AM
Subject:Fwd: Wicket and embedded tomcat



Hello,
I want to embed tomcat with my wicket application.
I use maven to deploy my application.
Can somebody tell how I have to do that ?

Thanks.



**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Wicket and embedded tomcat

2014-01-13 Thread Martin Grigorov
Hi,

What have you tried so far ?

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 4:07 PM, bangaly sangare
bangaly.sang...@gmail.comwrote:

 Hello,
 I want to embed tomcat with my wicket application.
 I use maven to deploy my application.
 Can somebody tell how I have to do that ?

 Thanks.



Re: WicketTester: getLastRenderedPage() returns null

2014-01-13 Thread Martin Grigorov
Hi,

You can use MAVEN_OPTS to set the debugging JVM options and attach remote
debugger.
Most probably some resource is in the classpath in the IDE, but not when
executing with Maven.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 3:53 PM, Oliver B. Fischer mails...@swe-blog.netwrote:

 I have strange unit test where I use the WicketTester. I perform the usual
 Does the page renders test?. In my IDE the test passes, but fails on the
 command line with Maven.

 When I execute the test on the command line I can see that
 getLastRenderedPage() returns null.

 Any idea how to debug this?

 Bye,

 Oliver

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




Re: how to add field to event in a wicket.jquery.ui calendar

2014-01-13 Thread Pierre
Sebastien,

Thank for your suggestion.

My bean (PersonnelEvent ) is correctely persisted after submiting the
dialog.

Also I did the  debugging.

And it seems like  the problem is due to the fact that my field sesame is
not a *Event Data*   field   from   fullCalendar
http://arshaw.com/fullcalendar/docs/event_data/Event_Object/  .

Like for example title and start.

Therefore it is not displayed in the /calendar /when the form dialog  is
submitted.

May be you're not agreeing with me ?


Best regards.





-
Pierre
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-add-field-to-event-in-a-wicket-jquery-ui-calendar-tp4663617p4663658.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: set RequestCycle in parallel Thread

2014-01-13 Thread Martin Grigorov
define didn't work
put some console.log() statements in the JS to see what is executed

hint: DataTable uses thead element for the toolbars, and tbody for the real
data

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 4:34 PM, christoph.ma...@t-systems.com wrote:

 I tried it like this:
 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attributes){
 super.updateAjaxAttributes(attributes);

 IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
 @Override
 public CharSequence getBeforeHandler(Component component){
 return var table =
 document.getElementById('searchTable');\n +
 var rowCount = table.rows.length;\n +
 for (var i = 1; i  rowCount - 1; i++) { \n +
  $(\#searchTable tbody
 tr:eq(\+i+\)\).each(function(i) {\n +
 var offset = $(this).offset();\n +
 var veil = $('div
 class=\divVeil\/div').appendTo('body').css({\n +
 position: 'absolute',\n +
 top: offset.top,\n +
 left: offset.left,\n +
 height: $(this).outerHeight(),\n +
 width: $(this).outerWidth(),\n +
 });\n +
 });\n +
 }  ;
 }
 };
 attributes.getAjaxCallListeners().add(ajaxCallListener);
 }

 But this didn’t work. Can anybody help?


 Mit freundlichen Grüßen
 Christoph Manig
 Systems Engineer

 T-Systems International GmbH
 Systems Integration - SC Travel, Transport  Logistics
 Hoyerswerdaer Str. 18
 01099 Dresden
 tel.:   +49 (0) 351 / 8152 - 188
 fax:+49 (0) 351 / 8152 – 209
 email:  christoph.ma...@t-systems.com

 T-SYSTEMS INTERNATIONAL GMBH
 Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
 Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri Abolhassan,
 Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen Rickmann
 Handelsregister: Amtsgericht Frankfurt am Main HRB 55933
 Sitz der Gesellschaft: Frankfurt am Main
 WEEE-Reg.-Nr. DE50335567


 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Montag, 13. Januar 2014 13:48
 An: users@wicket.apache.org
 Betreff: Re: set RequestCycle in parallel Thread

 See my link to StackOverflow.
 It shows how to disable a row. By disable it means put a div above the
 row so it receives any clicks. The div may be transparent so your users
 won't notice it.

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, Jan 13, 2014 at 2:42 PM, christoph.ma...@t-systems.com wrote:

  I dont want to cover the table. It should be readable for the user. My
  issue is that the user cant click the toolbars while the request is
 running.
  This resolution works, I can see the text 'Before ajax call:
  @Override
  protected void updateAjaxAttributes(AjaxRequestAttributes
 attributes){
  super.updateAjaxAttributes(attributes);
 
  IAjaxCallListener ajaxCallListener = new AjaxCallListener() {
  @Override
  public CharSequence getBeforeHandler(Component component){
  return alert('Before ajax call');;
  }
  };
  attributes.getAjaxCallListeners().add(ajaxCallListener);
  }
 
  How can I disable a table in Javascript? It says that wont be possible.
 
 
  Mit freundlichen Grüßen
  Christoph Manig
  Systems Engineer
 
  T-Systems International GmbH
  Systems Integration - SC Travel, Transport  Logistics Hoyerswerdaer
  Str. 18
  01099 Dresden
  tel.:   +49 (0) 351 / 8152 - 188
  fax:+49 (0) 351 / 8152 - 209
  email:  christoph.ma...@t-systems.com
 
  T-SYSTEMS INTERNATIONAL GMBH
  Aufsichtsrat: Thomas Dannenfeldt (Vorsitzender)
  Geschäftsführung: Reinhard Clemens (Vorsitzender), Dr. Ferri
  Abolhassan, Thilo Kusch, Dr. Markus Müller, Georg Pepping, Hagen
  Rickmann
  Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der
  Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE50335567
 
 
  -Ursprüngliche Nachricht-
  Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
  Gesendet: Montag, 13. Januar 2014 13:09
  An: users@wicket.apache.org
  Betreff: Re: set RequestCycle in parallel Thread
 
  Hi,
 
  Just put a div that covers the table and make it visible (hive it
  after AJAX). There are many ways to do this in Wicket one is using
  IAjaxIndicatorAware. There was an article on wicket in action page
  explaining how to use it (if I recall correctly).
 
 
  On Mon, Jan 13, 2014 at 12:54 PM, christoph.ma...@t-systems.com wrote:
 
   Can you give a more detailed example? I cant see how I should add
   JavaScript and how I should use the updateAjaxAttributes method.
  
  
   Mit freundlichen Grüßen
   

[ANNOUNCE] Apache Wicket 6.13.0 adds free online user guide

2014-01-13 Thread Martijn Dashorst
The Apache Wicket PMC is proud to announce Apache Wicket 6.13.0!

This release marks the thirteenth minor release of Wicket 6. Starting
with Wicket 6 we use semantic versioning for the future development of
Wicket, and as such no API breaks are present in this release compared
to 6.0.0.

New and noteworthy
--

This release fixes 25 bugs and adds the following improvements:

 * Online Wicket User guide (see below)
 * CDI 1.1 support (see below)
 * JQuery upgraded from 1.10.1 to 1.10.2
 * Implemented BigIntegerConverter
 * Migrate Wicket-Atmosphere to Atmosphere 2

New Wicket User guide
-

After many years of people asking for a reference guide for Apache
Wicket we finally were able to add one to our site thanks to Andrea del
Bene and comSysto for writing the guide and providing the hours of
converting it to our site.

You can read the manual in 3 forms: multi page HTML, single page HTML
and PDF.

The contents:
 - Introduction
 - How to use the example code
 - Why should I learn Wicket?
 - Wicket says Hello, World!
 - Wicket as page layout manager
 - Keeping control over HTML
 - Component Lifecycle
 - Page versioning and caching
 - Under the hood of request processing
 - Wicket Links and URL generation
 - Wicket models and forms
 - Wicket forms in detail
 - Displaying multiple items with repeaters
 - Internationalization with Wicket
 - Resource management with Wicket
 - An example of integration with JavaScript
 - Wicket advanced topics
 - Working with AJAX
 - Integration with enterprise containers
 - Security with Wicket
 - Test Driven Development with Wicket
 - Test Driven Development with Wicket and Spring
 - Wicket Best Practices
 - Working with Maven (Appendix)
 - Project WicketStuff (Appendix)
 - Lost in redirection with Apache Wicket (Appendix)
 - Contributing to this guide (Appendix)

Read more in the User guide by following this link:

http://wicket.apache.org/start/userguide.html

New CDI-1.1 integration project
---

A new (experimental) module for CDI integration was added to support
CDI 1.1 with Wicket. As CDI 1.0 and 1.1 are different beasts and not
compatible, we had to craft a new module with specific support for the
new CDI standard. The module is still experimental, but we expect to
make it a default module in a couple of releases.

You can use the new Wicket CDI module by including the following
dependency in your POM:

dependency
   groupIdorg.apache.wicket/groupId
artifactIdwicket-cdi-1.1/artifactId
version0.2/version
/dependency

Note that you have to remove the old wicket-cdi module and the Seam
conversation dependency: org.jboss.seam.conversation:seam-conversation-weld

For more information about what is new in CDI 1.1 read this blog post
by Pete Muir: http://s.apache.org/newincdi11

JQuery update in 6.9.0
--

As of Wicket 6.9 we ship JQuery 1.10.1. The JQuery project has
decided to remove deprecated APIs from their codebase from JQuery 1.9
and up. This means that JQuery plugins using these deprecated APIs no
longer work. See the JQuery migration guide for more information,
available from http://jquery.com/upgrade-guide/1.9/

If your application depends on these deprecated APIs you can easily
downgrade to JQuery 1.8.3-the previously provided JQuery that still
contains these APIs. Download the 1.8.3 release of jquery and add it
to your project in its application's init method:

@Override
protected void init() {
getJavaScriptLibrarySettings()
.setJQueryReference(yourJquery183ResourceReference);
}

CDI injection issue
---

In the CDI releases of Weld 2.0.1 and prior, it was assumed that
injection in anonymous inner classes was not legal and when
attempted, it resulted in an exception:

Caused by: org.jboss.weld.exceptions.DefinitionException:
WELD-70 Simple bean [EnhancedAnnotatedTypeImpl] private class
com.example.HomePage$AForm cannot be a non-static inner class

This was reported as
https://issues.apache.org/jira/browse/WICKET-5226, as it became an
issue in Glassfish 4, which ships with Weld 2.0.1 (or earlier). We
implemented a fix for this particular issue by not injecting into
anonymous inner classes.

Unfortunately this was not a bug that needed fixing on our part, but
rather in the Weld framework (see
https://issues.jboss.org/browse/WELD-1441)

Therefore we reverted the commits done for WICKET-5226 and hope that
Glassfish will upgrade their Weld implementation soon. For the whole
story read
https://issues.apache.org/jira/browse/WICKET-5264

Glassfish has fixed this in trunk according to

https://java.net/jira/browse/GLASSFISH-20619

but the fix has yet to be integrated into a release.

Using this release
--

With Apache Maven update your dependency to (and don't forget to
update any other dependencies on Wicket projects to the same version):

dependency
groupIdorg.apache.wicket/groupId

Re: how to add field to event in a wicket.jquery.ui calendar

2014-01-13 Thread Sebastien
Hi Pierre,

I have misunderstood the issue, sorry. I thought you had something
displayed before (state #1), which was not reflected after the update
(state #2)...

Actually, the visual representation of the event in the calendar relies on
the calendar itself (fullcalendar.js). If you wish to modify how the events
are rendered in the calendar, well, you have to fork fullcalendar [1],
modify the event object and modify the rendering.

If you success here, you can override CalendarEvent#createOptions to add
your property(ies) to the JSON object (Options object) that will be send to
the calendar...

Good luck :)
Sebastien.

[1] https://github.com/arshaw/fullcalendar


Models and page serialization

2014-01-13 Thread gmparker2000
I would like to be able to analyze a particular Wicket page to determine
where I might be using models incorrectly.  The model behind the page is a
very nested serializable object that is kept in a document cache.  The idea
is to use a loadable detachable model that will retrieve the object from the
cache on load.  However, I'm fairly certain that there are places where
objects from within the object hierarchy are being used incorrectly.   I'm
assuming that this probably results in portions of the object getting
serialized with the page.  Are there any tools or logging that would let me
see the serialized page in a readable format?  I guess one way I could
analyze the problem is to make my object unserializable and work through the
errors.  Any other ideas?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Models-and-page-serialization-tp4663668.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: [OT] thanks

2014-01-13 Thread Pierre Goupil
Good evening,

I finally have the need to use nginx, but can't figure out how to configure
it with Wicket and Atmosphere.

I've provided the nginx configuration quoted above, and in my init() method
of WebApplication, I have:

this.getFilterFactoryManager().add(new XForwardedRequestWrapperFactory());

But no way, the WebSocket connection returns an error.

GET
http://me.net/?0-IResourceListener.2-...ache-Date=0X-atmo-protocol=true_=1389644050464




= Firefox can't establish a connection to the server at ws://
me.net/?0-IResourceListener.2-X-Atmosphere-tracking-id=0X-Atmosphere-Framework=2.0.8-jqueryX-Atmosphere-Transport=websocketX-Atmosphere-TrackMessageSize=trueX-Cache-Date=0X-atmo-protocol=true

Does anybody have an idea, please?

Regards,

Pierre





On Wed, Aug 14, 2013 at 4:03 PM, Emond Papegaaij emond.papega...@topicus.nl
 wrote:

 We depend heavily on ajp. Our application server needs to know the exact
 url the request was made to. This is very hard to get right with plain http
 proxying (if not impossible). The main reason we use httpd in front of our
 application server(s) is for load balancing and status information (serving
 a 503 when the application is down). Tomcat's (or JBoss in our case)
 performance has never been an issue.

 Best regards,
 Emond

 On Wednesday 14 August 2013 07:50:50 Dan Retzlaff wrote:
  Have you considered nginx? We use httpd but our reverse-proxying
 needs are
  pretty simple. I've been meaning to try nginx.
 
  http://nginx.org/en/docs/http/websocket.html
 
  On Wed, Aug 14, 2013 at 7:42 AM, Pierre Goupil
 goupilpie...@gmail.comwrote:
   I use only Tomcat (7.0.40) and I must admit that with NIO connector
 and
   useNative=true, the performance looks nice. I have no use for an
 httpd for
   the moment, but I'm not in production.
  
   I plan to load test my app, if you're interested, I can communicate the
   results to you.
  
   As a side-note, on the Tomcat list, many people are starting to talk
 about
   better WebSockets support in Tomcat 8 and the dev seem to realize
 that
   there is a strong expectation for them, so maybe they'll try and
 convince
   to work hand-in-hand with the httpd / AJP people?
  
   Anyway, thanks again and keep up the good work!
  
   And of course a big thank you to the people from the great Wicket,
 too!
  
   :-)
  
   Regards,
  
   Pierre
  
  
   On Wed, Aug 14, 2013 at 3:33 PM, Emond Papegaaij 
   emond.papega...@topicus.nl
  
wrote:
   
Hi Pierre,
   
Good to hear you like it! Unfortunately, we are still waiting for the
  
   rest
  
of
the server stack to support websockets before we can actually use
 it in
production applications. Hopefully, with the release of jee7 (with
  
   jsr356)
  
maintainers of httpd and ajp will finally realize they need to
 support
websockets as well.
   
Best regards,
Emond
   
On Wednesday 14 August 2013 12:01:05 Pierre Goupil wrote:
 Good morning,

 All apologies for this totally off-topic message, but I would like
 to
   
say a
   
 big THANK YOU to Emond for his work on wicket-atmosphere.

 His code is far from trivial, yet it is a real pleasure to use it.
 According to me, the killer-feature is the fact that we have an
 AjaxRequestTarget to work with which triggers a Comet /
 WebSocket
   
response.
   
 Thanks again, man!

 Pierre
  
   --
   Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as
 pas
   mal.
   Alors frappez-moi de musique !
   Frappez-moi de musique, maintenant !
  
   (Bob Marley : Trenchtown Rock)




-- 
Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as pas
mal.
Alors frappez-moi de musique !
Frappez-moi de musique, maintenant !

(Bob Marley : Trenchtown Rock)


Static HTML is validating the dynamic content

2014-01-13 Thread Paul Bors
When I develop my components I drop example output so that if the HTML file
is open by itself once can get a preview of a mock-up of how the app might
look like. Usefull for when the component is to be styled and etc.

I just noticed that at runtime in development mode the HTML validation
fails when you use HTML tags like strings for mock-ups such as:

a href=# wicket:id=url
wicket:remove[http://
host:port/troubleshooting.clients?id=###]/wicket:remove/a


Unexpected RuntimeException

Last cause: Tag  'port' (line 14, column 79) has a mismatched close
tag at  '/wicket:remove' (line 14, column 117)

Markup

The problem is in 
file:/C:/MsSQL/glassfish/glassfish/domains/knoa/generated/jsp/console-war-7.1.21-SNAPSHOT/loader_10085307/com/mycom/console/admin/clients/troubleshooting/ExtractAgentLogsPanel$SuccessPanel.html:


Re: Static HTML is validating the dynamic content

2014-01-13 Thread Martin Grigorov
Hi,

Yes, Wicket uses XML-like parser
(org.apache.wicket.markup.parser.XmlPullParser) to read the markup.
You can use CDATA around such special snippets.

Martin Grigorov
Wicket Training and Consulting


On Tue, Jan 14, 2014 at 2:49 AM, Paul Bors p...@bors.ws wrote:

 When I develop my components I drop example output so that if the HTML file
 is open by itself once can get a preview of a mock-up of how the app might
 look like. Usefull for when the component is to be styled and etc.

 I just noticed that at runtime in development mode the HTML validation
 fails when you use HTML tags like strings for mock-ups such as:

 a href=# wicket:id=url
 wicket:remove[http://
 host:port/troubleshooting.clients?id=###]/wicket:remove/a


 Unexpected RuntimeException

 Last cause: Tag  'port' (line 14, column 79) has a mismatched close
 tag at  '/wicket:remove' (line 14, column 117)

 Markup

 The problem is in 

 file:/C:/MsSQL/glassfish/glassfish/domains/knoa/generated/jsp/console-war-7.1.21-SNAPSHOT/loader_10085307/com/mycom/console/admin/clients/troubleshooting/ExtractAgentLogsPanel$SuccessPanel.html:



Re: Models and page serialization

2014-01-13 Thread Martin Grigorov
Hi,

If you use Wicket 6.x then you can use special impl
of org.apache.wicket.core.util.objects.checker.IObjectChecker
To use it you have to
extend org.apache.wicket.serialize.java.JavaSerializer#newObjectOutputStream.
See for example
how 
org.apache.wicket.serialize.java.JavaSerializer.SerializationCheckerObjectOutputStream#writeObjectOverride
uses SerializableChecker.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 7:42 PM, gmparker2000 greg.par...@brovada.comwrote:

 I would like to be able to analyze a particular Wicket page to determine
 where I might be using models incorrectly.  The model behind the page is a
 very nested serializable object that is kept in a document cache.  The idea
 is to use a loadable detachable model that will retrieve the object from
 the
 cache on load.  However, I'm fairly certain that there are places where
 objects from within the object hierarchy are being used incorrectly.   I'm
 assuming that this probably results in portions of the object getting
 serialized with the page.  Are there any tools or logging that would let me
 see the serialized page in a readable format?  I guess one way I could
 analyze the problem is to make my object unserializable and work through
 the
 errors.  Any other ideas?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Models-and-page-serialization-tp4663668.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