-
1. Re: Calendar
tjakopec Jan 31, 2008 7:36 AM (in response to marx3)<h:form name="forma"> <r:calendar id="datumVazenja" /> </h:form>
over javascript
document.getElemetById('forma:datumVazenjaInputDate').focus; -
-
3. Re: Calendar
marx3 Feb 4, 2008 7:58 AM (in response to marx3)I see it as a bug. Can I open bug in JIRA?
-
4. Re: Calendar
ilya_shaikovsky Feb 4, 2008 8:32 AM (in response to marx3)you can't focus calendar component itself. use suggestion above. Focus the input of the calendar.
-
5. Re: Calendar
marx3 Feb 4, 2008 8:43 AM (in response to marx3)I've tried many diferent method, but no luck.
My calendar hasid="dummy"
I've tried to makefocus="dummyInputDate"
but it doesn't work. -
6. Re: Calendar
ilya_shaikovsky Feb 4, 2008 8:51 AM (in response to marx3)include naming container to the id of the calendar like "form:dummyInputDate"
-
7. Re: Calendar
marx3 Feb 4, 2008 9:21 AM (in response to marx3)it doesn't work. Here is my code:
<h:form id=form> (...) <rich:calendar id="dummy1" tabindex="2" value="#{managerBean.dummy1}" datePattern="yyyy-MM-dd" enableManualInput="true" required="false" inputClass="f_input requiredInput" immediate="true" focus="form:dummy2InputDate"> <f:convertDateTime pattern="yyyy-MM-dd" timeZone="CET"/> <a:support event="oninputchange" reRender="dummy1" ajaxSingle="true"/> </rich:calendar> <rich:calendar id="dummy2" tabindex="3" value="#{managerBean.dummy2}" datePattern="yyyy-MM-dd" enableManualInput="true" required="false" inputClass="f_input"> <f:convertDateTime pattern="yyyy-MM-dd" timeZone="CET"/> <a:support event="oninputchange" reRender="dummy2" ajaxSingle="true"/> </rich:calendar> (...) </h:form>
Additionally, if I don't use converter nor ajax, "focus=" never works, and TAB from calendar always focuses on image opening calendar (which has no sense because there is no possibility to launch calendar form keyboard) -
8. Re: Calendar
ilya_shaikovsky Feb 4, 2008 9:47 AM (in response to marx3)You shouldn't use focus attribute on the calendar.
To change focus after the request - you should use corresponding a:support attribute. -
9. Re: Calendar
marx3 Feb 4, 2008 10:03 AM (in response to marx3)but "focus" works ok except moving focus to another calendar field! So what's "focus" for?
And how to change focus in a:support? in oncomplete event? -
10. Re: Calendar
marx3 Feb 5, 2008 3:52 AM (in response to marx3)ok, i've used "focus" attribute in a:support (not in calendar) and it works
-
11. Re: Calendar
marx3 Feb 5, 2008 3:55 AM (in response to marx3)ok, i've used "focus" attribute in a:support (not in calendar) and it works
-
12. Re: Calendar
richfaceslearner Mar 11, 2008 6:37 PM (in response to marx3)<a4j:support focus is not working for me.This is my code.
<h:form id="soForm">
<rich:calendar id="closedDateTo" datePattern="MM/dd/yyyy" inputSize="9" enableManualInput="true">
<a4j:support focus="soForm:addDateToInputDate"></a4j:support>
</rich:calendar>
<rich:calendar id="addDateTo" datePattern="MM/dd/yyyy" inputSize="9" enableManualInput="true"/>
</h:form>
Please help.
Thanks. -
13. Re: Calendar
sergeysmirnov Mar 11, 2008 7:02 PM (in response to marx3)focus is set after the ajax request is done by particular event. As far, as you have no event attribute, this code will never be invoked.
-
14. Re: Calendar
richfaceslearner Mar 12, 2008 10:50 AM (in response to marx3)I tried with 'onblur','oninputchange',events but no luck.I want to go to 'AddDateTo' field thru tab change.Please help.