Hi,

I am using Wicket 7...

Recently I have been getting lots of the following exception
WARN RequestCycleExtra:347 - Handling the following exception: 
org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: 
Behavior rejected interface invocation. Component: [TextField [Component id = 
name]] Behavior: bidding.web.pages.search.RefineSearchFields$1@1471c2d 
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.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
        at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
        ...

I have the following panel being called from SearchResults web page:
RefineSearchFields refineFields = new RefineSearchFields("refineSearch", 
getPageParameters());
refineFields.setVisible(doSearch());
add(refineFields);

Within the RefineSearchFields Panel, I have:
final TextField<String> nameField = new TextField<String>("name", new 
PropertyModel<String>(this, "name"));
OnChangeAjaxBehavior nameFieldBehavior = new OnChangeAjaxBehavior() {
        @Override
        protected void onUpdate(AjaxRequestTarget target) {
                //do stuff
        }
};
nameField.add(nameFieldBehavior);
form.add(nameField);

I have found out why I get this exception... this is due to doSearch() 
returning false so the RefineSearchFields panel is not visible.
However the behaviour is still added to the field that is invisible.
What I would like, is to not execute/setup RefineSearchFields if its not 
visible.
What is the Wicket way to do this?

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

Reply via email to