-
1. Re: rich:calendar currentDate dataTable select only the month not the day
ilya_shaikovsky Apr 19, 2010 7:25 AM (in response to sam_pc1611)currentDate - always contains the dirst day as it used to define current month. Use value binging..
-
2. Re: rich:calendar currentDate dataTable select only the month not the day
sam_pc1611 Apr 19, 2010 9:50 AM (in response to ilya_shaikovsky)hi Ilya and thanks 4 your answer, ok, i used the value for obtain the day and the month and all is fine, but here ir another question i´ve add another column beacause when i try to do the getDatExpDate from de bean ActProdBean is null, i think is because the actProdItem.datExpDate is inside from the lstActCampDetail, so i´ve create another property Broker.dateCalendarChange and the getDateCalendarChange work very well.
but how can I obtain the value from the actProdItem.datExpDate
the code with the new colum:
<rich:dataTable id="actProdData" var="actProdItem" value="#{ActProdBean.lstActCampDetail}">
<h:column>
<f:facet name="header">
<h:outputText value="Expiration Date"/>
</f:facet>
<rich:calendar id="calendarProd" datePattern="dd/MM/yyyy" value="#{actProdItem.datExpDate}" >
<a4j:support event="onchanged" action="#{OrganizerBean.upDateProdDetail}" reRender="actProdData" />
</rich:calendar></h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Change Expiration Date"/>
</f:facet>
<rich:calendar value="#{Broker.dateCalendarChange}" datePattern="dd/MM/yyyy">
<a4j:support event="onchanged" action="#{OrganizerBean.upDateProdDetail}">
<f:param name="idActivity" value="#{actProdItem.lstActId}"></f:param>
</a4j:support>
</rich:calendar>
</h:column></rich:dataTable>
thanks Ilya
-
3. Re: rich:calendar currentDate dataTable select only the month not the day
ilya_shaikovsky Apr 19, 2010 10:07 AM (in response to sam_pc1611)1 of 1 people found this helpfulactually you could use actionListener at support or valueChangeListener at calendar. In this case you will get Event source component and could easilly obtain value from this object.
-
5. Re: rich:calendar currentDate dataTable select only the month not the day
ilya_shaikovsky Apr 19, 2010 10:30 AM (in response to sam_pc1611)mapping inputs in iteration components to the single property has no sence and the result (all the components stores it's values to the same property) - seems just as it should
-
6. Re: rich:calendar currentDate dataTable select only the month not the day
sam_pc1611 Apr 19, 2010 2:04 PM (in response to ilya_shaikovsky)hi again Ilya, i used the <a4j:support... but the value of the valueChangeListener is null yet i dont found my error. how i can obtain the date select???
here is my calendar
<rich:dataTable id="actProdData" var="actProdItem" value="#{ActProdBean.lstActCampDetail}" headerClass="textHeader" rows="8">
<h:column>
<f:facet name="header">
<h:outputText value="Change Expiration Date"/>
</f:facet>
<rich:calendar value="#{actProdItem.datExpDate}" datePattern="dd/MM/yyyy" >
<a4j:support event="ondateselect" actionListener="#{OrganizerBean.upDateProdDetail}"></a4j:support>
</rich:calendar>
</h:column>
</rich:dataTable>here is my method:
public void upDateProdDetail(ActionEvent event) throws Exception {
System.out.println("get the event for the component");
}the result when i debug
-
7. Re: rich:calendar currentDate dataTable select only the month not the day
nbelaevski Apr 19, 2010 2:19 PM (in response to sam_pc1611)Hi,
a4j:support is a separate component that has its own listener(s). You should define value change listener method on calendar tag explicitly if you need it also.
-
8. Re: rich:calendar currentDate dataTable select only the month not the day
sam_pc1611 Apr 19, 2010 2:29 PM (in response to nbelaevski)i used <a4j:support... because valueChangeListener dont trigger the method
<rich:calendar value="#{actProdItem.datExpDate}" datePattern="dd/MM/yyyy" valueChangeListener="#{OrganizerBean.upDateProdDetail}">
public void upDateProdDetail(ValueChangeEvent event) throws Exception {
System.out.println("Method ");
}
-
9. Re: rich:calendar currentDate dataTable select only the month not the day
ilya_shaikovsky Apr 20, 2010 4:58 AM (in response to sam_pc1611)actually seems the last step remained
return support back without any listeners and remain valueChangeListener defined.
The last code will not wors as there is just no requests.. So after you add support back it will rise requests and calendar will queue ValueChangeEvent when value is changed so you will be able to handle.