You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by dushyant agarwal <ag...@yahoo.co.in> on 2008/07/03 14:14:29 UTC

[TRINIDAD] Unable to use Converter with tr:inputDate

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;

}

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 (/**incomprehensible**/). How else can I set the above mentioned converter on the inputDate cpmponent from the backing bean.

pl. consider that I strictly need to set the converter from  the backing bean.

Thanks,
Dushyant






      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by Matthias Wessendorf <ma...@apache.org>.
On Fri, Jul 4, 2008 at 10:43 AM, dushyant agarwal
<ag...@yahoo.co.in> wrote:
> I need to put the converter from backing bean because the inputDate
> component is being created dynamically based upon the number of records in
> the database.Why can't we put sort of <tr:validateDateTime >in the backing
> bean????

some don't like bindings, but in some cases, it is OK.

>
> I further tried to make a sample application that contained a class
> implementing Converter class. It was registered in faces-config.There was a
> JSF page with a button and inputDate. I the action method of the button I
> created an instance of the converter class and set it as follows:-
> inputDate1.setConverter(new myConverter());
>
> But here as well the calendar component gave up working(====rant====)!!

you may file an issue and/or provide a patch for that ?

>
> Please specify what u mean by cross-postings......

sending one email to two mailing lists
(user and dev)

>
> Thanks,
> Dushyant
>
> --- On Thu, 3/7/08, Matthias Wessendorf <ma...@apache.org> wrote:
>
> From: Matthias Wessendorf <ma...@apache.org>
> Subject: Re: [TRINIDAD] Unable to use Converter with tr:inputDate
> To: "MyFaces Discussion" <us...@myfaces.apache.org>,
> agarwal_dushyant@yahoo.co.in
> Date: Thursday, 3 July, 2008, 5:55 PM
>
> Please do no cross-postings...
>
> On Thu, Jul 3, 2008 at 2:14 PM, dushyant agarwal
> <ag...@yahoo.co.in> wrote:
>> 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;
>>
>> }
>>
>> 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
>> (/**incomprehensible**/). How else can I set the above mentioned converter
>> on the inputDate cpmponent from the backing bean.
>>
> is the scope of the BB bean request ?
>
>> pl. consider that I strictly need to set the converter from  the backing
>> bean.
>
> why?
>
>>
>> Thanks,
>> Dushyant
>>
>>
>>
>>
>> ________________________________
>> Bollywood, fun, friendship, sports and more. You name it, we have it.
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog:
>  http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>
> ________________________________
> Best Jokes, Best Friends, Best Food. Get all this and more on Best of Yahoo!
> Groups.



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by Matthias Wessendorf <ma...@apache.org>.
On Fri, Jul 4, 2008 at 10:43 AM, dushyant agarwal
<ag...@yahoo.co.in> wrote:
> I need to put the converter from backing bean because the inputDate
> component is being created dynamically based upon the number of records in
> the database.Why can't we put sort of <tr:validateDateTime >in the backing
> bean????

some don't like bindings, but in some cases, it is OK.

>
> I further tried to make a sample application that contained a class
> implementing Converter class. It was registered in faces-config.There was a
> JSF page with a button and inputDate. I the action method of the button I
> created an instance of the converter class and set it as follows:-
> inputDate1.setConverter(new myConverter());
>
> But here as well the calendar component gave up working(====rant====)!!

you may file an issue and/or provide a patch for that ?

>
> Please specify what u mean by cross-postings......

sending one email to two mailing lists
(user and dev)

>
> Thanks,
> Dushyant
>
> --- On Thu, 3/7/08, Matthias Wessendorf <ma...@apache.org> wrote:
>
> From: Matthias Wessendorf <ma...@apache.org>
> Subject: Re: [TRINIDAD] Unable to use Converter with tr:inputDate
> To: "MyFaces Discussion" <us...@myfaces.apache.org>,
> agarwal_dushyant@yahoo.co.in
> Date: Thursday, 3 July, 2008, 5:55 PM
>
> Please do no cross-postings...
>
> On Thu, Jul 3, 2008 at 2:14 PM, dushyant agarwal
> <ag...@yahoo.co.in> wrote:
>> 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;
>>
>> }
>>
>> 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
>> (/**incomprehensible**/). How else can I set the above mentioned converter
>> on the inputDate cpmponent from the backing bean.
>>
> is the scope of the BB bean request ?
>
>> pl. consider that I strictly need to set the converter from  the backing
>> bean.
>
> why?
>
>>
>> Thanks,
>> Dushyant
>>
>>
>>
>>
>> ________________________________
>> Bollywood, fun, friendship, sports and more. You name it, we have it.
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog:
>  http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>
> ________________________________
> Best Jokes, Best Friends, Best Food. Get all this and more on Best of Yahoo!
> Groups.



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by dushyant agarwal <ag...@yahoo.co.in>.
I need to put the converter from backing bean because the inputDate component is being created dynamically based upon the number of records in the database.Why can't we put sort of <tr:validateDateTime >in the backing bean????

I further tried to make a sample application that contained a class implementing Converter class. It was registered in faces-config.There was a JSF page with a button and inputDate. I the action method of the button I created an instance of the converter class and set it as follows:-
inputDate1.setConverter(new myConverter());

But here as well the calendar component gave up working(====rant====)!!

Please specify what u mean by cross-postings......

Thanks,
Dushyant

--- On Thu, 3/7/08, Matthias Wessendorf <ma...@apache.org> wrote:
From: Matthias Wessendorf <ma...@apache.org>
Subject: Re: [TRINIDAD] Unable to use Converter with tr:inputDate
To: "MyFaces Discussion" <us...@myfaces.apache.org>, agarwal_dushyant@yahoo.co.in
Date: Thursday, 3 July, 2008, 5:55 PM

Please do no cross-postings...

On Thu, Jul 3, 2008 at 2:14 PM, dushyant agarwal
<ag...@yahoo.co.in> wrote:
> 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;
>
> }
>
> 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
> (/**incomprehensible**/). How else can I set the above mentioned converter
> on the inputDate cpmponent from the backing bean.
>
is the scope of the BB bean request ?

> pl. consider that I strictly need to set the converter from  the backing
> bean.

why?

>
> Thanks,
> Dushyant
>
>
>
>
> ________________________________
> Bollywood, fun, friendship, sports and more. You name it, we have it.



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org


      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by dushyant agarwal <ag...@yahoo.co.in>.
I need to put the converter from backing bean because the inputDate component is being created dynamically based upon the number of records in the database.Why can't we put sort of <tr:validateDateTime >in the backing bean????

I further tried to make a sample application that contained a class implementing Converter class. It was registered in faces-config.There was a JSF page with a button and inputDate. I the action method of the button I created an instance of the converter class and set it as follows:-
inputDate1.setConverter(new myConverter());

But here as well the calendar component gave up working(====rant====)!!

Please specify what u mean by cross-postings......

Thanks,
Dushyant

--- On Thu, 3/7/08, Matthias Wessendorf <ma...@apache.org> wrote:
From: Matthias Wessendorf <ma...@apache.org>
Subject: Re: [TRINIDAD] Unable to use Converter with tr:inputDate
To: "MyFaces Discussion" <us...@myfaces.apache.org>, agarwal_dushyant@yahoo.co.in
Date: Thursday, 3 July, 2008, 5:55 PM

Please do no cross-postings...

On Thu, Jul 3, 2008 at 2:14 PM, dushyant agarwal
<ag...@yahoo.co.in> wrote:
> 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;
>
> }
>
> 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
> (/**incomprehensible**/). How else can I set the above mentioned converter
> on the inputDate cpmponent from the backing bean.
>
is the scope of the BB bean request ?

> pl. consider that I strictly need to set the converter from  the backing
> bean.

why?

>
> Thanks,
> Dushyant
>
>
>
>
> ________________________________
> Bollywood, fun, friendship, sports and more. You name it, we have it.



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org


      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by Matthias Wessendorf <ma...@apache.org>.
Please do no cross-postings...

On Thu, Jul 3, 2008 at 2:14 PM, dushyant agarwal
<ag...@yahoo.co.in> wrote:
> 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;
>
> }
>
> 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
> (/**incomprehensible**/). How else can I set the above mentioned converter
> on the inputDate cpmponent from the backing bean.
>
is the scope of the BB bean request ?

> pl. consider that I strictly need to set the converter from  the backing
> bean.

why?

>
> Thanks,
> Dushyant
>
>
>
>
> ________________________________
> Bollywood, fun, friendship, sports and more. You name it, we have it.



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by Matthias Wessendorf <ma...@apache.org>.
On Fri, Jul 4, 2008 at 11:07 AM, Matthias Wessendorf <ma...@apache.org> wrote:
> What kind of JavaScript error ?
> What does it say?
>
> Would be good if this is covered by an issue, do you mind filing one ?

please check before if a similar issue is already in our JIRA, thanks!

>
> -M
>
> On Fri, Jul 4, 2008 at 11:04 AM, dushyant agarwal
> <ag...@yahoo.co.in> wrote:
>> please find the content in blue.
>>
>> Thanks,
>> Dushyant
>>
>> --- On Thu, 3/7/08, Volker Weber <v....@inexso.de> wrote:
>>
>> From: Volker Weber <v....@inexso.de>
>> Subject: Re: [TRINIDAD] Unable to use Converter with tr:inputDate
>> To: "MyFaces Discussion" <us...@myfaces.apache.org>,
>> agarwal_dushyant@yahoo.co.in
>> Date: Thursday, 3 July, 2008, 6:10 PM
>>
>> Hi!
>>
>> <IMO>
>>   You should not use binding if you can avoid it !
>>   If you need the component in the bean it is better to do a lookup
>> via clientId.
>> </IMO>
>>
>> The components in my case are being generated dynamically based upon the
>> records in my database. Their instance is
>>  generated at runtime in an action method
>> . After their instance is created I wish to put the converter on them.
>> How can I bring this about??
>>
>> 2008/7/3 dushyant agarwal <ag...@yahoo.co.in>:
>>> Hi,
>>> I have JSF page which contains a tr:inputDate component as given below:-
>>>
>>> <tr:inputDate binding="#{BB.inputDate1}"/>
>>
>> have you tried:
>>
>> <tr:inputDate converter="#{BB.dateConverter}" />
>>
>> public Converter getDateConverter() {
>>   DateTimeConverter converter = new DateTimeConverter();//the Trinidad
>> DateTime Converter
>>   converter.setPattern("dd/MM/yyyy");
>>   return converter;
>> }
>>
>> Yeah I tried using this but still the same runtime javascript error comes
>> along
>> on clicking on a date in the calendar....
>>
>>
>>> 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;
>>>
>>> }
>>>
>>> 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
>>> (/**incomprehensible**/). How else can I set the above mentioned converter
>>> on the inputDate cpmponent from the backing bean.
>>>
>>> pl. consider that I strictly need to set the converter from  the backing
>>> bean.
>>
>> in the action? why?
>>
>>
>> Regards,
>>
>>  Volker
>>
>>>
>>> Thanks,
>>> Dushyant
>>>
>>>
>>>
>>>
>>> ________________________________
>>> Bollywood, fun, friendship, sports and more. You name it, we have it.
>>
>>
>>
>> --
>> inexso - information exchange solutions GmbH
>> Bismarckstraße 13 | 26122 Oldenburg
>> Tel.: +49 441 4082 356 |
>> FAX: +49 441 4082 355 | www.inexso.de
>>
>> ________________________________
>> Unlimited freedom, unlimited storage. Get it now
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by Matthias Wessendorf <ma...@apache.org>.
What kind of JavaScript error ?
What does it say?

Would be good if this is covered by an issue, do you mind filing one ?

-M

On Fri, Jul 4, 2008 at 11:04 AM, dushyant agarwal
<ag...@yahoo.co.in> wrote:
> please find the content in blue.
>
> Thanks,
> Dushyant
>
> --- On Thu, 3/7/08, Volker Weber <v....@inexso.de> wrote:
>
> From: Volker Weber <v....@inexso.de>
> Subject: Re: [TRINIDAD] Unable to use Converter with tr:inputDate
> To: "MyFaces Discussion" <us...@myfaces.apache.org>,
> agarwal_dushyant@yahoo.co.in
> Date: Thursday, 3 July, 2008, 6:10 PM
>
> Hi!
>
> <IMO>
>   You should not use binding if you can avoid it !
>   If you need the component in the bean it is better to do a lookup
> via clientId.
> </IMO>
>
> The components in my case are being generated dynamically based upon the
> records in my database. Their instance is
>  generated at runtime in an action method
> . After their instance is created I wish to put the converter on them.
> How can I bring this about??
>
> 2008/7/3 dushyant agarwal <ag...@yahoo.co.in>:
>> Hi,
>> I have JSF page which contains a tr:inputDate component as given below:-
>>
>> <tr:inputDate binding="#{BB.inputDate1}"/>
>
> have you tried:
>
> <tr:inputDate converter="#{BB.dateConverter}" />
>
> public Converter getDateConverter() {
>   DateTimeConverter converter = new DateTimeConverter();//the Trinidad
> DateTime Converter
>   converter.setPattern("dd/MM/yyyy");
>   return converter;
> }
>
> Yeah I tried using this but still the same runtime javascript error comes
> along
> on clicking on a date in the calendar....
>
>
>> 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;
>>
>> }
>>
>> 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
>> (/**incomprehensible**/). How else can I set the above mentioned converter
>> on the inputDate cpmponent from the backing bean.
>>
>> pl. consider that I strictly need to set the converter from  the backing
>> bean.
>
> in the action? why?
>
>
> Regards,
>
>  Volker
>
>>
>> Thanks,
>> Dushyant
>>
>>
>>
>>
>> ________________________________
>> Bollywood, fun, friendship, sports and more. You name it, we have it.
>
>
>
> --
> inexso - information exchange solutions GmbH
> Bismarckstraße 13 | 26122 Oldenburg
> Tel.: +49 441 4082 356 |
> FAX: +49 441 4082 355 | www.inexso.de
>
> ________________________________
> Unlimited freedom, unlimited storage. Get it now



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by Matthias Wessendorf <ma...@apache.org>.
On Thu, Jul 3, 2008 at 2:40 PM, Volker Weber <v....@inexso.de> wrote:
> Hi!
>
> <IMO>
>  You should not use binding if you can avoid it !
>  If you need the component in the bean it is better to do a lookup
> via clientId.
> </IMO>

+1

>
> 2008/7/3 dushyant agarwal <ag...@yahoo.co.in>:
>> Hi,
>> I have JSF page which contains a tr:inputDate component as given below:-
>>
>> <tr:inputDate binding="#{BB.inputDate1}"/>
>
> have you tried:
>
> <tr:inputDate converter="#{BB.dateConverter}" />
>
> public Converter getDateConverter() {
>  DateTimeConverter converter = new DateTimeConverter();//the Trinidad
> DateTime Converter
>  converter.setPattern("dd/MM/yyyy");
>  return converter;
> }
>
>
>> 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;
>>
>> }
>>
>> 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
>> (/**incomprehensible**/). How else can I set the above mentioned converter
>> on the inputDate cpmponent from the backing bean.
>>
>> pl. consider that I strictly need to set the converter from  the backing
>> bean.
>
> in the action? why?
>
>
> Regards,
>    Volker
>
>>
>> Thanks,
>> Dushyant
>>
>>
>>
>>
>> ________________________________
>> Bollywood, fun, friendship, sports and more. You name it, we have it.
>
>
>
> --
> inexso - information exchange solutions GmbH
> Bismarckstraße 13 | 26122 Oldenburg
> Tel.: +49 441 4082 356 |
> FAX: +49 441 4082 355 | www.inexso.de
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by dushyant agarwal <ag...@yahoo.co.in>.
please find the content in blue.

Thanks,
Dushyant

--- On Thu, 3/7/08, Volker Weber <v....@inexso.de> wrote:
From: Volker Weber <v....@inexso.de>
Subject: Re: [TRINIDAD] Unable to use Converter with tr:inputDate
To: "MyFaces Discussion" <us...@myfaces.apache.org>, agarwal_dushyant@yahoo..co.in
Date: Thursday, 3 July, 2008, 6:10 PM

Hi!

<IMO>
  You should not use binding if you can avoid it !
  If you need the component in the bean it is better to do a lookup
via clientId.
</IMO>

The components in my case are being generated dynamically based upon the 
records in my database. Their instance is generated at runtime in an action method 
.. After their instance is created I wish to put the converter on them.
How can I bring this about??

2008/7/3 dushyant agarwal <ag...@yahoo.co.in>:
> Hi,
> I have JSF page which contains a tr:inputDate component as given below:-
>
> <tr:inputDate binding="#{BB.inputDate1}"/>

have you tried:

<tr:inputDate converter="#{BB.dateConverter}" />

public Converter getDateConverter() {
  DateTimeConverter converter = new DateTimeConverter();//the Trinidad
DateTime Converter
  converter.setPattern("dd/MM/yyyy");
  return converter;
}

Yeah I tried using this but still the same runtime javascript error comes along 
on clicking on a date in the calendar....


> 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;
>
> }
>
> 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
> (/**incomprehensible**/). How else can I set the above mentioned converter
> on the inputDate cpmponent from the backing bean.
>
> pl. consider that I strictly need to set the converter from  the backing
> bean.

in the action? why?


Regards,
    Volker

>
> Thanks,
> Dushyant
>
>
>
>
> ________________________________
> Bollywood, fun, friendship, sports and more. You name it, we have it.



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


      Bollywood, fun, friendship, sports and more. You name it, we have it on http://in.promos.yahoo.com/groups/bestofyahoo/

Re: [TRINIDAD] Unable to use Converter with tr:inputDate

Posted by Volker Weber <v....@inexso.de>.
Hi!

<IMO>
  You should not use binding if you can avoid it !
  If you need the component in the bean it is better to do a lookup
via clientId.
</IMO>

2008/7/3 dushyant agarwal <ag...@yahoo.co.in>:
> Hi,
> I have JSF page which contains a tr:inputDate component as given below:-
>
> <tr:inputDate binding="#{BB.inputDate1}"/>

have you tried:

<tr:inputDate converter="#{BB.dateConverter}" />

public Converter getDateConverter() {
  DateTimeConverter converter = new DateTimeConverter();//the Trinidad
DateTime Converter
  converter.setPattern("dd/MM/yyyy");
  return converter;
}


> 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;
>
> }
>
> 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
> (/**incomprehensible**/). How else can I set the above mentioned converter
> on the inputDate cpmponent from the backing bean.
>
> pl. consider that I strictly need to set the converter from  the backing
> bean.

in the action? why?


Regards,
    Volker

>
> Thanks,
> Dushyant
>
>
>
>
> ________________________________
> Bollywood, fun, friendship, sports and more. You name it, we have it.



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de