Hi,
I have JSF page which contains a tr:inputDate component as given
below:-
<tr:inputDate
binding="#{BB.inputDate1}"/>
As well as there is a commandButton
<tr:commandButton action="#{BB.action}"/>
In the Backing bean the action method is as follows:-
public String action(){
DateTimeConverter converter = new DateTimeConverter();//the
Trinidad
DateTime Converter
converter.setPattern("dd/MM/yyyy");
inputDate1.setConverter(converter);
return null;
}
Then I tried using
<tr:inputDate converter="#{BB.dateConverter}" />
public Converter getDateConverter() {
DateTimeConverter converter = new DateTimeConverter();//the Trinidad
DateTime Converter
converter.setPattern("dd/MM/yyyy");
return converter;
}
While running the JSF page, on clicking the button the converter
does
get
applied, But after the Page gets rendered if the user again clicks
on
the
calendar button to select a new date then a javascript error
appears
[Got this info on using firebug for debugging]
_getDateFieldFormat(input#inputDate1.af_inputDate_content)
_dfsv(input#inputDate1.af_inputDate_content,1217411811404)
returnCalendarvalue(Window,undefined)
_checkUnload(undefined)
_selectdate(1217356200000)
onclick(click client X=1842, client Y =1842)
Common1_2_4.js line 2170
This error appear in the popup window where the calendar gets rendered
How can I set
the above mentioned
converter
on the inputDate cpmponent from the backing bean.
The scope of the BB bean request.
pl. consider that I strictly need to set the converter from the
backing bean.(Beacause sometimes the component gets generated dynamically. so
no way to put tr:convertDateTime )
Thanks,
Dushyant
Bring your gang together. Do your thing. Find your favourite Yahoo! group
at http://in.promos.yahoo.com/groups/