[Seaside] dateInput Question

Ron Teitelbaum Ron at USMedRec.com
Fri Nov 3 17:42:49 UTC 2006


I see I was wrong the callback is triggered by the request of the form post
on the callback stream.  So it looks like the hidden field is just a place
to put the callback on, but is not actually used in the form itself.  Is
that right?

Ron



> -----Original Message-----
> From: Michel Bany
> Sent: Friday, November 03, 2006 10:05 AM
> 
> Hi Ron,
> 
> Now, I see what you are trying to do, you are trying to implement
> a SeasideAsync missing piece.
> 
> Actually, I have had a for a long time, the project of finishing
> SeasideAsync,
> adding live callbacks to radio buttons, date and time input and maybe
> a few other smaller things. If found it not trivial and I gave up.
> I will look if I can restart this project and let you know.
> 
> Cheers,
> Michel.
> 
> 
> 
> 
> On 03 Nov 2006, at 15:44 , Ron Teitelbaum wrote:
> 
> > Hi Michel,
> >
> > ________________________________________
> > From: Michel Bany [mailto:michel.bany at gmail.com]
> > Sent: Friday, November 03, 2006 3:16 AM
> >
> >> Hi Ron,
> >> I was wondering if you could help me understand something.
> >> You do not provide enough background information.
> >> Are you using Squeak or VW ?
> >> Are you using SeasideAsynx of Scriptaculous ?
> >
> > I'm using Squeak and SeasideAsync and Scriptaculous
> >
> >
> >> Also, the code you are wondering about is using the canvas api.
> >> However, live callbacks are not implemented (yet) for the canvas api.
> >> Are you implementing it ?
> >
> > I'm adding liveCallbackYear to dateInput.
> >
> >> Did you copy/paste some code into your component ?
> >
> > Yes I added the following:
> >
> > liveCallbackYear: liveBlock
> > 	| uri id |
> > 	liveBlock fixTemps.
> > 	id _ self ensureId.
> > 	uri _ canvas urlForLiveAction:
> > 		[:event :h | liveBlock
> > 			value: event value
> > 			value: h].
> > 	self session
> > 		addLoadScript:
> > 			'liveSearch('
> > 				, (id asString, '-year') printString
> > 				, ','
> > 				, (canvas encode: uri asString) printString
> > 				, ')'.
> >
> >
> >>> I'm trying to understand the following code:
> >>> canvas hiddenInput
> >>>                         callback:
> >>>                                     [value := Date
> >>>                                                 newDay: (day min:
> >>> (Date
> >>> daysInMonth: month forYear: year))
> >>>                                                 monthNumber: month
> >>>                                                 year: year.
> >>>                                     callbackBlock value: value];
> >>>                         close.
> >>>             canvas forgetCurrentBrush.
> >
> >> The dateInput composite is made up of four html elements
> >> a select for the month, an input for the day, an input for the
> >> year and
> >> the hidden input, each with a callback. The first three callbacks
> >> are for collecting the input values. The fourth callback assembles
> >> the input values into an instance of Date and passes it to
> >> the component callback.
> >
> > I can see that it creates the date but what triggers the hiddenInput
> > callback?  It appears to work without submitting the form.
> >
> > Thanks for your help!
> >
> > Ron
> >
> 
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




More information about the Seaside mailing list