Hi guys, I'm asking for an opinion on how to approach the following:

Wicket 1.5.7, browser Chrome, Firefox.

I have a FormTestPanel with 
TextField and AjaxFormComponentUpdatingBehavior attached:

        AjaxFormComponentUpdatingBehavior formUpdate = new
AjaxFormComponentUpdatingBehavior("onblur") {
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                 //do nothing just want to update the textfield model on
leaving it
            }

The Form also has an AjaxButton:
        AjaxButton btnSend = new AjaxButton("sendMessage") {
            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form)
{
                    //replace through ajax FormTestPanel with Empty panel
let's say
            }
       }


My view on this was that the flow would be to queue events in this order:
Blur
Submit

somehow it gets to 
Submit
Blur

This causes a ComponentNotFoundException: Could not find component
'content-panel:form:textMessage'.

Shouldn't page versioning "help" with ComponentNotFound in this case? Sure
the component hierarchy changed after the form submit but that blur event
should have the older version of the page which had a different component
hierarchy?

I tried putting a Channel "0" type Drop on both behavior and AjaxButton:
            @Override
            protected AjaxChannel getChannel() {
                return new AjaxChannel("0", AjaxChannel.Type.DROP);
            }
but it doesn't seem to cancel any of them, anyway I wouldn't have expected
this to work as it would have probably canceled the submit button event but
it was reminiscent of the times when I thought the blur event gets triggered
twice.


My current solution was so far to setResponsePage which I think might work
as it will clearly target another version but I didn't want to have to give
up on the SinglePage setup.

Any other idea how I can handle this?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ComponentNotFound-exception-question-tp4651013.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to