-
1. Re: ajaxSubmitSelection=
ilya_shaikovsky Jul 14, 2009 5:32 AM (in response to praveenkr09)Could not say much using description. ondblclick invokes nodeSelectionList two times because onclick as you mentioned before also submits selection. So two requests risen.
-
2. Re: ajaxSubmitSelection=
kukeltje Jul 14, 2009 8:02 AM (in response to praveenkr09)I have this 'problem' to. Would be nice if a double-click fires the selection only once. And in addition, I'd like a right-click to also fire selection once which it currently does not. That behaviour is in line with what you expect from desktop apps.
Maybe I'll file a jira issue -
3. Re: ajaxSubmitSelection=
praveenkr09 Jul 15, 2009 1:43 AM (in response to praveenkr09)Hi Ronald,
Have you raised the JIRA issue. Please let me know, if you have already done that. I will really appreciate if you can give me the JIRA Id, so that I can also track the progress.
Thanks is advance.
Hi ilya,
I really appreciate your comments, but I believe that on doubleClick, if the nodeSelectListener is getting invoked twice, it should not be attached to ajaxSubitSelection. I am not very much aware of it. Anyways, I need both the events for the tree, so ajaxSubmitSelection="false" is not the solution.
Problem#1: ajaxSubmitSelection when set to false should not invoke the nodeSelectionListener.
If you can throw some light on this issue as in how should i get it working, i will really appreciate that.
I am using richfaces 3.3.0 with jsf1.2.09 on Tomcat 6.0.14.
I have written my custom view handler and I am facing this issue for rich:tree. This tree is being created dynamically using the class as code show below:
public void create() {
tree = new HtmlTree();
tree.setId(getControlId());
tree.setVar(getControlId() + "Var");
tree.setAjaxSubmitSelection(false);
uiComponent = tree;
}
Similarly the tree nodes are created.
Even after setting the ajaxSubmitSelection=false, the nodeSelectListener is getting invoked.
Problem#2: Double click invokes nodeSelectListener twice.
I am using richfaces 3.3.0 with jsf1.2.09 on Tomcat 6.0.14.
I am not sure, where is the issue. Please guide me through that as well.
Thanks in Advace.
Praveen -
4. Re: ajaxSubmitSelection=
nbelaevski Jul 15, 2009 5:20 AM (in response to praveenkr09)Hi Praveen,
Problem#1: ajaxSubmitSelection when set to false should not invoke the nodeSelectionListener.
That's not right. ajaxSubmitSelection only controls client-side behavior - do ajax request or not. If form is submitted by another means and selection was changed, listeners will fire.
Problem#2: Double click invokes nodeSelectListener twice.
Make sure there are no two parallel requests in this case. -
5. Re: ajaxSubmitSelection=
kukeltje Jul 15, 2009 5:24 AM (in response to praveenkr09)#2: Does a generic 'queue' help here? If so, that would be great, but still I think it should be default behaviour. A double click is something different then two quick single clicks and only should fire one event
I'll try tonight. -
6. Re: ajaxSubmitSelection=
ilya_shaikovsky Jul 15, 2009 5:38 AM (in response to praveenkr09)
#2: Does a generic 'queue' help here? If so, that would be great, but still I think it should be default behaviour. A double click is something different then two quick single clicks and only should fire one event
I'll try tonight.
good point but... try just to define some custom JS method in onclick and ondblclick at the same time on simple button and check the result. It's not RF specific at all. -
7. Re: ajaxSubmitSelection=
praveenkr09 Jul 15, 2009 6:03 AM (in response to praveenkr09)Hi nbelaevski,
I really appreciate your comments about ajaxSubmitSelection, but this is something which I have observed from the Richfaces demo. When I had ajaxSubmitSelection=false, the nodeSelectionListener was not invoked, but as soon as I set ajaxSubmitSelection to true, nodeSelectionListener was invoked properly. Please throw some light on this.
And for the problem #2, yes there are two parallel requests coming up and that is what I am trying to figure out, why are there two parallel request. Please let me know, what approach should I take to resolve this problem.
Thanks in Advance,
Praveen -
8. Re: ajaxSubmitSelection=
ilya_shaikovsky Jul 15, 2009 6:09 AM (in response to praveenkr09)Again on problem 1#.. When you explored at demo environment you probably just set it to false and clicked over the tree and no request occurs. But Nick told you that the server side event will be risen in this case on any external submit (e.g. from support as in your case). So this property manage only sending request internally.
-
9. Re: ajaxSubmitSelection=
praveenkr09 Jul 15, 2009 6:26 AM (in response to praveenkr09)Hi ilya,
I got this point, but this is only in the demo environment. In my environment, where I have written my own custom view handler, the ajaxSubmitSelection=false still fires the server side event.
Please let me know, if you want to have a look at the code of custom view handler.
Thanks,
Praveen -
10. Re: ajaxSubmitSelection=
kukeltje Jul 15, 2009 6:48 AM (in response to praveenkr09)"praveenkr09" wrote:
And for the problem #2, yes there are two parallel requests coming up and that is what I am trying to figure out, why are there two parallel request. Please let me know, what approach should I take to resolve this problem.
Because that is how javascript works.
http://www.chipchapin.com/WebTools/JavaScript/example3-01.html
The way he solved it is by using a 'timer' just like what the ajaxqueue does. -
11. Re: ajaxSubmitSelection=
kukeltje Jul 15, 2009 6:53 AM (in response to praveenkr09)Oh and in this regard (kind of topic hacking I know, sorry ;-)) is it possible to have the selectionchange also fire before the context menu event? So I can have a context menu content based on the item that is selected without having to select it first with a left click?
-
12. Re: ajaxSubmitSelection=
ilya_shaikovsky Jul 15, 2009 7:01 AM (in response to praveenkr09)possible to have a4j:support for menu population and show the menu on oncomplete after rerendered
-
13. Re: ajaxSubmitSelection=
kukeltje Jul 15, 2009 7:04 AM (in response to praveenkr09)Yes, that is how it works now (onContext event does not work in exendeddatatable) but before that how can I trigger the select? I'll make a new topic for this and try to make a small example which does not fully work. Maybe you can give some tips then based on that example. Thanks...
-
14. Re: ajaxSubmitSelection=
praveenkr09 Jul 15, 2009 7:31 AM (in response to praveenkr09)Hi Ronald,
As per this link, double click will get a click event before you get double click event. But in my case, I am getting two click events before I get a double click event.
I am using IE7.
Please let me know, what approach should I take. Is ajaxQueue the only solution??
Thanks in advance,
Praveen