[Seaside] updating form element value
Sebastian Sastre
ssastre at seaswork.com
Tue Oct 2 01:09:05 UTC 2007
Dear Lukas,
I think that the #callback:value: should help yes. Right now I have
a reaction renderer like this:
[:html|
html updater
id: self id;
callback:[:v :h|
(self at: aSymbol) model setValue: v.
self renderInnerContentOn: h]
value: (html formElement
id: (self at: aSymbol)
inputElementId;
value)]
Look at the callback. I've put as first argument :v which is
correctly returning an input text value when the #change event actually
happens in the UA, but I'm not receiving the canvas in :h so it's nil. So
I'm unable to perform an update of the content. I think it was possible to
receive the value and the canvas to make the update, maybe I misunderstood
something?
cheers,
Sebastian Sastre
PS1: the "self at: aSymbol" just returns a subcomponent which basically is
an html InputText tied to a model
PS2: the "(self at: aSymbol) inputElementId" returns the id of the inputText
tag of the form element.
PS3: "self id" is the id of the component and the id of the div tag that
wrapps the html rendered by the component
> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre
> de Lukas Renggli
> Enviado el: Viernes, 28 de Septiembre de 2007 12:23
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] updating form element value
>
> > I wish to be able to receive the value of some form element in the
> > server side pretty much like in place editor does but also
> update other element.
> > This could be made hooking an event #change to react with
> the update
> > but that generates an executor and an updater, so I was
> wondering if
> > that can be made just with an updater in one http request
> instead of two.
> >
> > Was I clearer than before?
>
> Not quite sure what you mean, but the method #callback:value:
> and some of the convenience methods that call it might help
> you? You can have multiple #callback:value: calls per request
> and they works with all subclasses of SUAjax.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the Seaside
mailing list