[jboss-user] [JBoss Seam] - Re: selectDate & convertDateTime

tcavaleiro do-not-reply at jboss.com
Mon Aug 27 20:41:22 EDT 2007


Thanks for the reply Pete.


Originally I didn't interpret well what I've read on  http://jira.jboss.org/jira/browse/JBSEAM-623 so I didn't understand the right use of s:selectDate.

But after digging on your code (SelectDateRendererBase.java) I got it (how it works...)
I was thinking that s:selectDate needed some sort of *.js locale resource  (DateFormatSymbols is powerful).


The truth is that I've define the locale in faces-config.xml like this

  | 		<locale-config>
  | 			<default-locale>pt</default-locale>
  | 			<supported-locale>pt</supported-locale>    	  	
  | 		</locale-config>
  | 


and the s:selectDate works very well, but if my s:selectDate is created dynamically through Ajax4JSF the Javascript is transfered but never evaluated.

This is also reported in this thread ( http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035703#4035703  )
 and there's a JIRA related ( http://jira.jboss.com/jira/browse/JBSEAM-1156 )


I don't know exactly what is the problem (I've tested with Firefox 2.0.0.6, Opera 9.23 and IE 7 and in all it goes the same. Also [for all] if I made a refresh then the s:selectDate names now appears on portuguese)


Workaround: After putting the next code (through static form) the problem is solved (as is suggested by damianharvey)!!


  | 	<script type="text/javascript">
  | 	
  | 		//
  | 		var CAL_DAYS_SHORT = 'Do,Se,Te,Qu,Qu,Se,Sá';
  | 		var CAL_DAYS_MEDIUM = 'Dom,Seg,Ter,Qua,Qui,Sex,Sáb';
  | 		var CAL_DAYS_LONG = 'Domingo,Segunda-feira,Terça-feira,Quarta-feira,Quinta-feira,Sexta-feira,Sábado';
  | 		var CAL_MONTHS_MEDIUM = 'Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez';
  | 		var CAL_MONTHS_LONG = 'Janeiro,Fevereiro,Março,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro';
  | 		var CAL_FIRST_DAY_OF_WEEK = 1;
  | 		var CAL_DATE_FORMAT = 'dd/MM/yyyy';
  | 		//
  | 	
  | 	</script>
  | 


Sorry if it went too extensive!

Tiago.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078543#4078543

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078543




More information about the jboss-user mailing list