I am really facing some hard time making Autocomplete Form statless. The
problem basically stems from
AutoCompleteBehavior which extends AbstractAutoCompleteBehavior which
evetually extends AbstractAjaxBehavior.
AbstractAjaxBehavior implements IBehaviorListener. I saw in the the
Component class that the method
public boolean getStatelessHint(Component component)
{
if (this instanceof IBehaviorListener)
{
// this behavior implements a callback interface, so it
cannot be
stateless
return false;
}
return true;
}
So any behaviour implementing IBehaviourlistner is stateful in nature (which
I think is little too restrictive) and closes down possibility to make
AutoComplete behaviour stateless.
Perhaps I am insane but I do not see any point why Autocomplete behaviour
should be "Stateful" all the time and in every context of Web Page. I fully
understand the advantages of being "Stateful" in most of complex web
interaction but to have a way to make some components Stateless in nature
would be nice.
I am not Wicket expert but I would rather do something like
extends IBehaviorListener and include a method
getStatelessHint(Component c) ;
then in org.apache.wicket.Component class implement the method
getStatelessHint in a slightly different way
public boolean getStatelessHint(Component component)
{
if (this instanceof IBehaviorListener)
{
return this.getStatelessHint(component);
}
return true;
}
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Making-Autocomplete-Form-Stateless-tp4455817p4455817.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]