On Tue, 28 Oct 2008, dlipski wrote:
> Textfields do recive onchange event, even AutocompleteTextField has modified
> version off onchange event handler.
> Whats more new AjaxFormComponentUpdatingBehavior("onchange"){..}; works well
> in this scenario but
> OnChangeAjaxBehavior not.
> I looked at OnChangeAjaxBehavior implemenation and this is a subclass of
> AjaxFormComponentUpdatingBehavior class with super("onchange"); call in its
> constructor.
> This class only provides its own implementation of onComponentRendered
> method so there should be a problem.
> When I looked at OnChangeAjaxBehavior class contract description in JavaDoc
> ("A behavior that updates the hosting FormComponent via ajax when value of
> the component is changed. This behavior uses best available method to track
> changes on different types of form components.") there is no mention that it
> shouldnt be used with some components so I think its bug either in
> OnChangeAjaxBehavior class or AutocompleteTextField class.
OnChangeAjaxBehavior overwrites the onchange JavaScript event
handler of the DOM element it's attached to. It makes
"onchange" of a text field work so that whenever you change
the contents of the text field with keyboard or mouse (cut /
paste), the event gets fired, and also disables the browser
autocompletion (because it doesn't send any event that could
be caught).
I don't have it very clear how it works on other type of
components, I've only found it useful on text fields.
Best wishes,
Timo
--
Timo Rantalaiho
Reaktor Innovations Oy <URL: http://www.ri.fi/ >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]