-
1. Re: Calendar submit()
ilya_shaikovsky Sep 19, 2007 7:56 AM (in response to eminil)you should use a4j:support on the first calendar. And it should be binded to ondateselect event.
Or you may use client side solution usign calendar JS API.
(described at demo-site in corresponding tab) -
2. Re: Calendar submit()
eminil Sep 19, 2007 8:40 AM (in response to eminil)"ilya_shaikovsky" wrote:
you should use a4j:support on the first calendar. And it should be binded to ondateselect event.
Or you may use client side solution usign calendar JS API.
(described at demo-site in corresponding tab)
Hmm i tried doing (on the first calendar):<a4j:support event="ondateselect" action="submit()" />
That makes the calendar broken though. When you try to select a date inside it nothing happens... -
3. Re: Calendar submit()
ilya_shaikovsky Sep 19, 2007 10:29 AM (in response to eminil)Hm.. I highly recommend you to read about a4j:support usage in our guide.
It will highly reduce questions count in future. -
4. Re: Calendar submit()
eminil Sep 20, 2007 2:17 AM (in response to eminil)"ilya_shaikovsky" wrote:
Hm.. I highly recommend you to read about a4j:support usage in our guide.
It will highly reduce questions count in future.
I found nothing that explains it there. Could you please be so kind and quote it for me? -
5. Re: Calendar submit()
eminil Sep 20, 2007 2:19 AM (in response to eminil)Question count might be reduced if the answers (if there are any to give) are given on the forums as well, as people use the search feature to find things that boggle them.
-
6. Re: Calendar submit()
eminil Sep 20, 2007 2:55 AM (in response to eminil)Tried adding the following to first calendar:
<a4j:support event="ondateselect" oncomplete="myForm.submit()"/>
It seems to submit the form after selecting a date in the calendar. However, no date is being changed in the first calendar. It keeps the old date... -
7. Re: Calendar submit()
eminil Sep 21, 2007 2:45 AM (in response to eminil)Nobody can give an example on how to make one calendar update another on the form?
-
8. Re: Calendar submit()
eminil Sep 21, 2007 3:36 AM (in response to eminil)Ok, so it is a bug as well?
From the wiki:
RF-945 calendar. Selection doesn't applied with a4j:support inside calendar -
9. Re: Calendar submit()
ilya_shaikovsky Sep 21, 2007 6:44 AM (in response to eminil)B.t.w. I'm created a bug to allow submit calendar after the selection.. But not only before as it performed now.
http://jira.jboss.com/jira/browse/RF-978 -
10. Re: Calendar submit()
eminil Sep 21, 2007 7:38 AM (in response to eminil)Ahh ok, so it is not possible for me to get this sort of behavior in the current version?
Thanks for checking into it btw. -
11. Re: Calendar submit()
ilya_shaikovsky Sep 21, 2007 9:40 AM (in response to eminil)Not possible through server side processing. But you may use get the date selected through JS event and jst copy it to the field you need.
-
12. Re: Calendar submit()
eminil Sep 24, 2007 2:56 AM (in response to eminil)"ilya_shaikovsky" wrote:
Not possible through server side processing. But you may use get the date selected through JS event and jst copy it to the field you need.
Ok, but how do i trigger on the event?
Suppose i have a JS test method as:<script> function test() { alert('testing'); } </script>
And to trigger it i just put a onchange="test()" on the components.
However, on the calendar component nothing seems to work...
Could you give an example on how to trigger a js function from a change in the calendar field? -
13. Re: Calendar submit()
eminil Sep 24, 2007 3:11 AM (in response to eminil)If i do ondateselect="test()" on the calendar, it calles the test() javascript but then the calendar stops working (it doesn't set the date on the input field).
-
14. Re: Calendar submit()
ilya_shaikovsky Sep 24, 2007 7:09 AM (in response to eminil)update the version to snapshot. This problem was solved.