wicket-atmosphere

2014-07-24 Thread Pierre Goupil
Good evening,

I'm still in the process of making wicket-atmosphere testable, after a long
pause. For the moment in my EventBus, I am able to retrieve the broadcasted
messages. I'd like to be able to retrieve this (Ajax-like) response with
tester.getLastResponse().getDocument(). Because if I do this, I have the
full WicketTester API to work with.

When I do this in the EventBus:

private void post(final AtmosphereResource _resource, final PageKey pageKey,
final CollectionEventSubscription subscriptionsForPage, final
AtmosphereEvent event) {

... snap ...
final Response response = new
AtmosphereWebResponse(_resource.getResponse());
if (this.application.createRequestCycle(request,
response).processRequestAndDetach())
{
  System.out.println(response.toString());
this.broadcaster.broadcast(response.toString(), _resource);
}
}

the Sys.out do gives me a non-empty ajax-response but I can't figure out
how to hook it into the WicketTester's getLastResponse().

Any help will be much appreciated.

Regards,

Pierre Goupil


-- 
La vie est source de joie, la mort est source de paix, seule la transition
est difficile.


Form-Validators and invisible form components

2014-07-24 Thread Joachim Schrod
Hi,

I have a form with a date input that may be invisible. If it is
visible, its value must be after another date input's value.

I established a FormValidator that checks that condition. It knows
about the potential invisibility and handles it.

Now, for most pages Wicket outputs the warning

IFormValidator in form `form` depends on a component that has
been removed from the page or is no longer visible. Offending
component id `inhaber1.arbeitSeit`.

I thought about disabling the FormValidator if its dependent
component is invisible -- but then I realized that isEnabled() of
validator-behaviors is not checked and that's not the route to go.

FWIW, I think that's a mis-feature.
Form.validateFormValidator(IFormValidator) should check
isEnabled(). Checking isEnabled() also in
FormComponent.validateValidators() is a different question, I can't
find a use case for it.

Thus, my question: how may I realize checks over several form
components where one of them may be invisible?

Here's hoping for a hint in the right direction,

Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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