Calendar << started to work as commandButton?
j-pro Sep 18, 2007 3:18 PMI'm sorry for often posts, but I can ensure you that I always try to solve every problem by myself first.
I can't understand, but my rich:calendar are now working strange... When I press the << or < on the calendar - the rich:message fields for other components(not for this calendar) fills with "Value is required". It wasn't like this before. I think it shouldn't be like that, because I didn't press the submit button and validation should have not been invoked.
It started since I've upgraded to 3.1.0 and added some ":" in my reRender attributes of commandButtons. Now I've removed all ":" adresations and it still keeps behaving like this. No changes were made to rich:calendar.
Right now I have:
<rich:tabPanel id="anketaTabPanel" switchType="client" style="background-color:#B5CEFD;width:100%">
<rich:tab label="Date personale" style="background-color:#B5CEFD;width:100%" id="employee_tab">
<h:form>
...
<h:panelGroup>
<font color="red">*</font>
<h:outputText value="Prenumele" />
</h:panelGroup>
<h:panelGroup>
<h:inputText id="employeeLastNameEdit" required="true"
value="#{amBean.employee.firstName}" />
<rich:message style="color: red" for="employeeLastNameEdit"/>
</h:panelGroup>
<h:panelGroup>
<font color="red">*</font>
<h:outputText value="Data nasterii" />
</h:panelGroup>
<h:panelGroup>
<a4j:outputPanel id="calendar_employeeBirthDateEdit" layout="block">
<rich:calendar id="employeeBirthDateEdit"
value="#{amBean.employee.birthDate}"
enableManualInput="true"
popup="true"
locale="#{amBean.calendarLocale}"
datePattern="dd.MM.yyyy"
showInput="true"
required="true"/>
</a4j:outputPanel>
<rich:message style="color: red" for="employeeBirthDateEdit"/>
</h:panelGroup>
...
<a4j:commandButton action="#{amBean.action4Employee}" value="Add" focus="employee_tab" reRender="employeesTable">
</a4j:commandButton>
</h:form>
</rich:tab>And when I press here on << or < of this calendar, my rich:message's of this calendar and of the field above fills with "Value is required". Why does it happen? I didn't press the commandButton, I just wanted to change the month of the calendar.
Maybe somebody faced the problem and can tell why can it happen?