[Seaside] problem w html dateInput : repeating the date input field twice

Simon TITE simon at tite.st
Sun Sep 13 16:11:56 UTC 2009


I am following through the example in the new book "Dynamic Web  
Development with Seaside" (great book btw!) and I am having a problem with  
the date input field. Obviously, I am pretty much a newbie with  
Seaside/Pharo/Smalltalk, so forgive me if I'm making a stupid error, and  
if this is not the right place for such messages, please point me in the  
right direction.

The problem is, when rendering the date input field, it displays itself  
twice (see the html at the end of this message)
These are some portions of the code:

ContactView>>renderContentOn: html
	html form:
		[ self
			renderNameOn: html;
			renderEmailOn: html;
			renderGenderOn: html;
			renderSendUpdatesOn: html;
			renderDateOn: html;
			renderSaveOn: html ].


ContactView>>renderDateOn: html
	html text: 'Date of birth: '.
	html dateInput
		callback: [ :value | self contact birthdate: value ];
		with: self contact birthdate.
	html break.

This is after the refactoring suggested in section 11.5 of the book, but  
the problem always occurred, from the first time the date input field was  
introduced.
It is using Pharo image 10448 (bet the problem existed long before that) -  
I don't know how to check the Seaside revision, but I suspect it is 2.8?  
or maybe 2.9 - it came with the Pharo image downloaded from the Pharo  
website on 2009-08-19. Any help would be appreciated.

Here is the html produced:


  <br/>Date of birth:
   <select name="13">
     <option value="14">January</option>
     <option value="15">February</option>
     <option value="16">March</option>
     <option value="17">April</option>
     <option value="18">May</option>
     <option value="19">June</option>
     <option value="20">July</option>
     <option value="21">August</option>
     <option value="22" selected="selected">September</option>
     <option value="23">October</option>
     <option value="24">November</option>
     <option value="25">December</option>
   </select>&nbsp;
   <input value="13" name="26" size="2" maxlength="2" type="text"  
class="text"/>&nbsp;
   <input value="2009" name="27" size="4" maxlength="4" type="text"  
class="text"/>
   <input name="28" type="hidden" class="hidden"/>
   <select name="29">
     <option value="30">January</option>
     <option value="31">February</option>
     <option value="32">March</option>
     <option value="33">April</option>
     <option value="34">May</option>
     <option value="35">June</option>
     <option value="36">July</option>
     <option value="37">August</option>
     <option value="38" selected="selected">September</option>
     <option value="39">October</option>
     <option value="40">November</option>
     <option value="41">December</option>
   </select>&nbsp;
   <input value="13" name="42" size="2" maxlength="2" type="text"  
class="text"/>&nbsp;
   <input value="2009" name="43" size="4" maxlength="4" type="text"  
class="text"/>
   <input name="44" type="hidden" class="hidden"/>
   <br/>




More information about the seaside mailing list