To clarify: I need this option because when ajax request is sent on node selection and there was some errors after the first selection(e.g. facesContext.addMessage is called in the actionListener) they disappeared when we click on the same node twice. So I'd like to have either options(better both):
- force rich:tree queue NodeSelectedEvent even if the selected node is not changed
Help me please implement either of the aforementioned options!
you could turn ajaxSubmit selection off and use a4j:support for event onselect and define ActionListener instead of NodeSelectListener.
Thank you, Ilya, but this approach doesn't suit me well, because I found only 'onselected' event that is generated right after selecting node, not after ActionListener is completed and I cann't use reRender on a4j:support for this event if components(that need rerendering) are updated only in this listener. How about disabling of sending request altogether in the case of the second click? Can I do this?
Does anybody know how do I have to use data of rich:tree in JSON format to disable sending ajax request in on listener on th client side? I mean how can I determine that a user has clicked the already selected node?
I.e. I want to assign JS expression to onselected event.
because I found only 'onselected' event that is generated right after selecting node, not after ActionListener is completed
not sure that I understand.. you could disable internal tree request and fire your own with a4j:support. so your actionListener will perform the actions you need and you could reRender part of the tree after request complete.