-
1. Re: how to do autocomplete="off" for rich:calendar
sivaprasad9394 Sep 17, 2010 12:44 AM (in response to sarocks)try like this,
<rich:calendar id="searchingDateToField" styleClass="celcom01" inputClass="celcom01"value="#{transactionListBean.tnx_EndDate_Search}"locale="en/US" popup="true" datePattern="dd/MM/yyyy"showApplyButton="false" cellWidth="24px" inputSize="11"cellHeight="22px" style="width:200px"><rich:calendar id="searchingField" value="#{Beanname.fieldVariable}"
locale="en/US" popup="true" datePattern="dd/MM/yyyy"
showApplyButton="false" cellWidth="24px" inputSize="11"
cellHeight="22px" style="width:200px">
</rich:calendar>
-
2. Re: how to do autocomplete="off" for rich:calendar
sarocks Sep 20, 2010 12:43 AM (in response to sivaprasad9394)Hi Sivaprasad,
I did not find any solution to my problem.
I need to disable autocomplete for rich:calendar input field.
Note: It happens only in mozilla browser, the inputs made to the input field previously is getting displayed as a dropdown box, which i need to disable.
Here is a screenshot of the issue:
Anyway,
Thanks for the reply.
Saroj
-
3. Re: how to do autocomplete="off" for rich:calendar
sarocks Sep 21, 2010 8:20 AM (in response to sarocks)I am still looking for an answer to the above issue
Thanks,
Saroj
-
4. Re: how to do autocomplete="off" for rich:calendar
akaine Sep 21, 2010 8:49 AM (in response to sarocks)It's a browser's feature and is not related to JSF or RF.
The feature can be turned off by editing userChrome.css manually:
- http://lifehacker.com/197715/customize-firefox-with-userchromecss
- http://www.mozilla.org/unix/customizing.html
- http://kb.mozillazine.org/Disabling_autocomplete_-_Firefox#Firefox_3.5
Though if you want to prevent this behavior for all users - it's impossible.
-
5. Re: how to do autocomplete="off" for rich:calendar
sarocks Sep 21, 2010 11:00 AM (in response to akaine)I hope there would be a solution for this.
Becasue for h:inputtext we can able to disable autocomplete feature irrespective of different type of browsers.
And rich:calendar is also an input type.
I also tried calling a javascript as below:
<script type="text/javascript">
function disableAutocomplete(obj)
{
obj.setAttribute('autocomplete','off');
}
</script>
<rich:calendar ...
oninputfocus="disableAutocomplete(this);"/>
Now, on first time focusing on rich:calendar, the previously entered values displaying in drowndown box (which it shoudn't do). But second time onwards focusing on the rich:calendar, the problem is getting solved. Now i don't know how to disable this for the first time focus also
And as I have used lots of rich:calendar in my page and rich:calendar getting created dynamically in a grid box, I can't call the script on onloadof the page.
I need a proper solution for this issue.
Thanks in advance,
Saroj
-
6. Re: how to do autocomplete="off" for rich:calendar
sivaprasad9394 Sep 22, 2010 12:01 AM (in response to sarocks)1 of 1 people found this helpfulI tried with this code it is working in Mozilla,
<h:outputText value="From" />
<rich:calendar id="searchingDateFromField" styleClass="celcom01" inputClass="celcom01"
value="#{transactionListBean.tnx_StartDate_Search}"
locale="en/US" popup="true" datePattern="dd/MM/yyyy HH:mm"
showApplyButton="false" cellWidth="24px" inputSize="11" mode="client"
cellHeight="22px" style="width:200px" enableManualInput="true"
oninputmouseover="disableAutocomplete(this);">
</rich:calendar>
<script type="text/javascript">
function disableAutocomplete(obj)
{
obj.setAttribute('autocomplete','off');
}
</script>
It is working for me and i have attached Image also.In From data rich:calender box if u double click then only it will show the autocomplete or you have to type.so there it will clear the values like OFF.
<h:outputText value="From" /><rich:calendar id="searchingDateFromField" styleClass="celcom01" inputClass="celcom01"value="#{transactionListBean.tnx_StartDate_Search}"locale="en/US" popup="true" datePattern="dd/MM/yyyy HH:mm"showApplyButton="false" cellWidth="24px" inputSize="11" mode="client"cellHeight="22px" style="width:200px" enableManualInput="true"oninputmouseover="disableAutocomplete(this);"></rich:calendar> -
7. Re: how to do autocomplete="off" for rich:calendar
sarocks Sep 22, 2010 2:25 AM (in response to sivaprasad9394)Hi Sivaprasad,
Your solution is helpful. Now when we reach calendar by mouse, it's not showing the history in dropdown (nice trick of oninputmouseover). But now if we reach the calendar by keyboard control (Tab button), I am facing same issue, (with keyboard Arrow key down button, I am getting history in dropdown box).
I tried with "oninputkeydown" etc. without any success.
Need a permanent and good solution for this.
Thanks,
Saroj -
8. Re: how to do autocomplete="off" for rich:calendar
sivaprasad9394 Sep 22, 2010 3:06 AM (in response to sarocks)Hi Saroj,
Yes i tried with these attributes also it is not working,May be this is Jboss bug in 3.3.3
oninputblur
oninputchange
oninputfocus ---- Not working
oninputkeydown
onfocus ---- NO attribute in the rich:calendar
It is not working..
oninputbluroninputchangeoninputfocusoninputkeydown -
9. Re: how to do autocomplete="off" for rich:calendar
sarocks Oct 8, 2010 7:14 AM (in response to sarocks)Hi All,
Still waiting for a proper solution to this issue.
Thanks in advance,
Saroj
-
10. Re: how to do autocomplete="off" for rich:calendar
tai.n. Jul 25, 2014 5:32 AM (in response to sarocks)Hi,
I used the javascript to disable auto complete it.
<script>
document.getElementById('mainForm:calInputDate').setAttribute('autocomplete','off');
</script>