two inputs one updater

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

two inputs one updater

Sebastian Sastre-2
Hey guys,
anyone knows how to:
- update 2 inputs
- using one updater?

having that:
- there are other inputs in the same page
- only one big (tag) form wrapping all

When I saw the implementation of triggerFormElement: I've though two parameters
can came serialized in the POST so I've tried this:

        updater
                callback:[:h|
                        self renderThoseTwoInputsOn: h];
                triggerFormElement: idInput1;
                triggerFormElement: idInput2;
                yourself.

but with that I only get the model of input1 updated.
As workaround I'm posting the whole form but is really not ideal.
What could be interfering with the update of the second input?
maybe the serialized value of the second input is not hitting its callback?
fixable? hints?
thanks,
sebastian

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: two inputs one updater

Lukas Renggli
> When I saw the implementation of triggerFormElement: I've though two parameters
> can came serialized in the POST so I've tried this:
>
>        updater
>                callback:[:h|
>                        self renderThoseTwoInputsOn: h];
>                triggerFormElement: idInput1;
>                triggerFormElement: idInput2;
>                yourself.

Sure, that's how it is ment to be used.

What kind of input fields are you using? Be sure to carefully consider
what is written in the method comment of #triggerFormElement: if any
of the input fields is a check-box or a multi-select list.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: two inputs one updater

Sebastian Sastre-2
Ah.. mm ok, but then I don't get why is not the second model being updated.
I was aware of checkboxes and such. This inputs are just text inputs. I mean
both.
I'll give a look with the debugger when the parameters arrive to see if I get
more info about it
sebastian

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Lukas Renggli
> Enviado el: Monday, August 10, 2009 04:57
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] two inputs one updater
>
> > When I saw the implementation of triggerFormElement: I've
> though two parameters
> > can came serialized in the POST so I've tried this:
> >
> >        updater
> >                callback:[:h|
> >                        self renderThoseTwoInputsOn: h];
> >                triggerFormElement: idInput1;
> >                triggerFormElement: idInput2;
> >                yourself.
>
> Sure, that's how it is ment to be used.
>
> What kind of input fields are you using? Be sure to carefully consider
> what is written in the method comment of #triggerFormElement: if any
> of the input fields is a check-box or a multi-select list.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

More jQuery questions!!! Rendering on dialogs...

Robert Sirois
Here's the case in question:

A dialog is rendered on the root component, and pretty much just hangs out.

My master plan involves rendering links and whatnot on it so it acts like a little floating menu. So, changing pages re-renders the dialog contents with new links.

I've messed around with a few different ways of doing this and sorta settled on announcements within ajax callbacks (or regular callbacks, doesn't matter too much at this juncture).

My problem lies in sending the information within an announcements payload. WAComponents work fine, but I was hoping I could just use a method such as the following (this oughta show my Seaside knowledge heh):

self session announce: (TOCAnnounceUpdateActionMenu on: (newWindow menuContent: html)).

menuContent: html
    html text: 'blah'.

I get this error:

MessageNotUnderstood: receiver of "print:" is nil

I have to pass in a real object, huh?

Thanks!
RS


Get back to school stuff for them and cashback for you. Try Bing now.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside