Unable to set DateTimeConverter with tr:inputDate component from the backing 
bean
---------------------------------------------------------------------------------

                 Key: TRINIDAD-1141
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1141
             Project: MyFaces Trinidad
          Issue Type: Improvement
          Components: Components
    Affects Versions: 1.2.4-core
         Environment: WinXP,SP2, 2GB RAM , COre2 Duo Processor(2.86)
            Reporter: Dushyant Agarwal
             Fix For: 1.2.4-core


 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


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to