List Info

Thread: separating the date and time components




separating the date and time components
user name
2007-09-21 08:36:41
Hi,
 
I have attempted to assemble a tx:date with a tc:time follow the same field (expecting each componenent will fill its data in the part it is concerned with)

 &nbsp; &nbsp;  <tx:date

 &nbsp; &nbsp;   ; &nbsp; &nbsp; id ="workStartDate&quot;

 &nbsp; &nbsp;   ; &nbsp; &nbsp; value ="#{intervention.workStart}&quot;

 &nbsp; &nbsp;   ; &nbsp; &nbsp; label ="#{i18n.workStartDate}"; >

 &nbsp; &nbsp;   ; &nbsp; &nbsp; < f:convertDateTime pattern ="dd.MM.yyyy"; />

 &nbsp; &nbsp;  </ tx:date>

 

 &nbsp; &nbsp;  < tc:time

 &nbsp; &nbsp;   ; &nbsp; &nbsp; id ="workStart"

 &nbsp; &nbsp;   ; &nbsp; &nbsp; value= "#{intervention.workStart}" />

 



The result is that tc:time seams to create a new instance with a date set to 0 (01.01.1970) instead of using GregorianCalendar.set() on the existing one.

Do I have to cretae a minor issue on this behavior?

View Original Image
separating the date and time components
user name
2007-09-21 09:08:45

Sorry forgot to mention [tobago]
---------- Forwarded message ----------
From: Zied Hamdi < javahamdigmail.com">javahamdigmail.com >
Date: 21 sept. 2007 15:36
Subject: separating the date and time components
To: MyFaces < usersmyfaces.apache.org">usersmyfaces.apache.org&gt;

Hi,
 
I have attempted to assemble a tx:date with a tc:time follow the same field (expecting each componenent will fill its data in the part it is concerned with)

 &nbsp; &nbsp;  < tx:date

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStartDate&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value ="#{intervention.workStart}&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; label ="#{i18n.workStartDate}"; >

 &nbsp; &nbsp; &nbsp;   ; &nbsp; < f:convertDateTime pattern = "dd.MM.yyyy&quot; />

 &nbsp; &nbsp;  </ tx:date>

 

 &nbsp; &nbsp;  < tc:time

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStart"

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value = "#{intervention.workStart}&quot; />

 



The result is that tc:time seams to create a new instance with a date set to 0 (01.01.1970) instead of using GregorianCalendar.set() on the existing one.

Do I have to cretae a minor issue on this behavior?




--
Zied Hamdi
zatreex.sourceforge.net
View Original Image
Re: separating the date and time components
user name
2007-10-04 17:28:01
Hello,
 
I've just wrote a util class that could help in this task.
&nbsp;
Regards,
Zied

 
2007/9/21, Zied Hamdi < javahamdigmail.com">javahamdigmail.com>:

Sorry forgot to mention [tobago]

---------- Forwarded message ----------
From: Zied Hamdi <gmail.com" target="_blank"> javahamdigmail.com >
Date: 21 sept. 2007 15:36
Subject: separating the date and time components
To: MyFaces <myfaces.apache.org" target="_blank"> usersmyfaces.apache.org&gt;

Hi,
 
I have attempted to assemble a tx:date with a tc:time follow the same field (expecting each componenent will fill its data in the part it is concerned with)

 &nbsp; &nbsp;  < tx:date

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStartDate&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value ="#{intervention.workStart}&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; label ="#{i18n.workStartDate}"; >

 &nbsp; &nbsp; &nbsp;   ; &nbsp; < f:convertDateTime pattern = "dd.MM.yyyy"; />

 &nbsp; &nbsp;  </ tx:date>

 

 &nbsp; &nbsp;  < tc:time

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStart"

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value = "#{intervention.workStart}&quot; />

 



The result is that tc:time seams to create a new instance with a date set to 0 (01.01.1970) instead of using GregorianCalendar.set() on the existing one.

Do I have to cretae a minor issue on this behavior?




--
Zied Hamdi
zatreex.sourceforge.net




--
Zied Hamdi
zatreex.sourceforge.net
  
Re: separating the date and time components
user name
2007-10-04 18:01:10
Hello again,
 
Sorry I forgot we're in multitasking.
&nbsp;
Here&#39;s a better version.
 
Regards,
Zied

&nbsp;
2007/10/5, Zied Hamdi < javahamdigmail.com">javahamdigmail.com>:
Hello,
 
I've just wrote a util class that could help in this task.
&nbsp;
Regards,
Zied

 
2007/9/21, Zied Hamdi <gmail.com" target="_blank">javahamdigmail.com>:

Sorry forgot to mention [tobago]

---------- Forwarded message ----------
From: Zied Hamdi <gmail.com" target="_blank"> javahamdigmail.com >
Date: 21 sept. 2007 15:36
Subject: separating the date and time components
To: MyFaces <myfaces.apache.org" target="_blank"> usersmyfaces.apache.org&gt;

Hi,
 
I have attempted to assemble a tx:date with a tc:time follow the same field (expecting each componenent will fill its data in the part it is concerned with)

 &nbsp; &nbsp;  < tx:date

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStartDate&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value ="#{intervention.workStart}&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; label ="#{i18n.workStartDate}"; >

 &nbsp; &nbsp; &nbsp;   ; &nbsp; < f:convertDateTime pattern = "dd.MM.yyyy"; />

 &nbsp; &nbsp;  </ tx:date>

 

 &nbsp; &nbsp;  < tc:time

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStart"

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value = "#{intervention.workStart}&quot; />

 



The result is that tc:time seams to create a new instance with a date set to 0 (01.01.1970) instead of using GregorianCalendar.set() on the existing one.

Do I have to cretae a minor issue on this behavior?




--
Zied Hamdi
zatreex.sourceforge.net





--
Zied Hamdi
zatreex.sourceforge.net
  
Re: separating the date and time components
user name
2007-10-05 03:51:08
Hello,
 
Sorry for spamming, I found a bug in the class I sent you this morning: so just to see how tedious it is to point to the same Date with separate tc:date and tc:time tags, if every tag was just updating the fields he shows, we could point to the same field without ths linking cables:
 

 &nbsp; &nbsp; &nbsp; &nbsp;   ; public Date getWorkStartTime() {

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   return getCurrentWorkTask().getWorkStart();

 &nbsp; &nbsp;   ; &nbsp; &nbsp; }

 

 &nbsp; &nbsp;   ; &nbsp; &nbsp; public Date getWorkStartDate() {

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   Date start = getCurrentWorkTask().getWorkStart();

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   if ( start == null || CalendarUtil.equalsDate( start, 1970, 0, 1 ) )

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  return null;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; return start;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; }

 

 &nbsp; &nbsp; &nbsp; &nbsp;   ; public void setWorkStartDate(Date workStart) {

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   getCurrentWorkTask().setWorkStart( CalendarUtil.setDate( workStart, getWorkStart() ) );

 &nbsp; &nbsp;   ; &nbsp; &nbsp; }

 

 &nbsp; &nbsp;   ; &nbsp; &nbsp; public String toString() {

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   return getCurrentWorkTask().toString();

 &nbsp; &nbsp;   ; &nbsp; &nbsp; }

 


To remind what I would like to have here's what I expected from these components:

 &nbsp; &nbsp;  < tx:date

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStartDate&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value ="#{intervention.workStart}"

 &nbsp; &nbsp; &nbsp;   ; &nbsp; label ="#{i18n.workStartDate}"; >

 &nbsp; &nbsp; &nbsp;   ; &nbsp; < f:convertDateTime pattern = "dd.MM.yyyy&quot; />

 &nbsp; &nbsp;  </ tx:date>

 

 &nbsp; &nbsp;  < tc:time

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStart"

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value = "#{intervention.workStart}" />

in that case all the code above is simplified in a pojo manner.
 
Regards,
Zied
 ;
2007/10/5, Zied Hamdi < javahamdigmail.com">javahamdigmail.com>:
Hello again,
 
Sorry I forgot we're in multitasking.
&nbsp;
Here&#39;s a better version.
 
Regards,
Zied

&nbsp;
2007/10/5, Zied Hamdi <gmail.com" target="_blank">javahamdigmail.com>:
Hello,
 
I've just wrote a util class that could help in this task.
&nbsp;
Regards,
Zied

 
2007/9/21, Zied Hamdi <gmail.com" target="_blank">javahamdigmail.com>:

Sorry forgot to mention [tobago]

---------- Forwarded message ----------
From: Zied Hamdi <gmail.com" target="_blank"> javahamdigmail.com >
Date: 21 sept. 2007 15:36
Subject: separating the date and time components
To: MyFaces <myfaces.apache.org" target="_blank"> usersmyfaces.apache.org&gt;

Hi,
 
I have attempted to assemble a tx:date with a tc:time follow the same field (expecting each componenent will fill its data in the part it is concerned with)

 &nbsp; &nbsp;  < tx:date

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStartDate&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value ="#{intervention.workStart}&quot;

 &nbsp; &nbsp; &nbsp;   ; &nbsp; label ="#{i18n.workStartDate}"; >

 &nbsp; &nbsp; &nbsp;   ; &nbsp; < f:convertDateTime pattern = "dd.MM.yyyy"; />

 &nbsp; &nbsp;  </ tx:date>

 

 &nbsp; &nbsp;  < tc:time

 &nbsp; &nbsp; &nbsp;   ; &nbsp; id ="workStart"

 &nbsp; &nbsp; &nbsp;   ; &nbsp; value = "#{intervention.workStart}&quot; />

 



The result is that tc:time seams to create a new instance with a date set to 0 (01.01.1970) instead of using GregorianCalendar.set() on the existing one.

Do I have to cretae a minor issue on this behavior?




--
Zied Hamdi
zatreex.sourceforge.net






--
Zied Hamdi
zatreex.sourceforge.net
  
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )