I want to use an optionGroup and copied the code from WAInputElementContainer>>renderNestedSelectionOn:.
The callback does not fire. See below. Is this a bug? How can I force the callback to fire? Sabine |selectTag | selectTag := html select. selectTag callback: [ :value | value inspect ]; selected: 'Lisp'; with: [#(#('Functional' #('Haskell ' 'Lisp' 'ML')) #('Dataflow' #('G' 'Max' 'Prograph'))) do: [ :list | html optionGroup label: list first; with: [ list second do: [ :each | html option value: each with: selectTag; with: each ] ] ] ]. |
I think you need to add #beOnChange or something similar. That will add the script for the callback.
On 21.04.2013, at 12:24, Sabine Knöfel <[hidden email]> wrote: > I want to use an optionGroup and copied the code from > WAInputElementContainer>>renderNestedSelectionOn:. > The callback does not fire. See below. > Is this a bug? > How can I force the callback to fire? > > Sabine > > |selectTag | > selectTag := html select. > selectTag > callback: [ :value | value inspect ]; > selected: 'Lisp'; > with: [#(#('Functional' #('Haskell ' 'Lisp' 'ML')) #('Dataflow' #('G' 'Max' > 'Prograph'))) > do: [ :list | > html optionGroup > label: list first; > with: [ > list second > do: [ :each | > html option > value: each with: selectTag; > with: each ] ] ] ]. > > > > -- > View this message in context: http://forum.world.st/optionGroup-callback-does-not-fire-tp4682815.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > 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 |
Hi Max,
thank you. There is >>beSubmitOnChange. But I dont want the whole page to be submitted. But you gave me the hint! My error was, that I added onChange AFTER the with: block...and that does not work. This works: theInput1 id: mid; selected: self currentDay expensesCountryDay; callback: [ :value | self countryDay: value inspect ]; onChange: (html prototype evaluator triggerForm: self countryDaySelectionFormID; return: false); with: [ .....] ]. This doesNOT work theInput id: mid; selected: self currentDay expensesCountryDay; callback: [ :value | self countryDay: value inspect ]; with: [ ..... ]; onChange: (html prototype evaluator triggerForm: self countryDaySelectionFormID; return: false). On Sun, Apr 21, 2013 at 12:40 PM, Max Leske [via Smalltalk] <[hidden email]> wrote:
|
In reply to this post by Sabine Manaa
Hi Sabine,
You mean you want the callback to fire when the selection has changed? You need to intercept the change event and trigger the callback serialization: html select onChange: (html jQuery ajax serializeThis); callback: ... cheers, Johan On 21 Apr 2013, at 12:24, Sabine Knöfel <[hidden email]> wrote: > I want to use an optionGroup and copied the code from > WAInputElementContainer>>renderNestedSelectionOn:. > The callback does not fire. See below. > Is this a bug? > How can I force the callback to fire? > > Sabine > > |selectTag | > selectTag := html select. > selectTag > callback: [ :value | value inspect ]; > selected: 'Lisp'; > with: [#(#('Functional' #('Haskell ' 'Lisp' 'ML')) #('Dataflow' #('G' 'Max' > 'Prograph'))) > do: [ :list | > html optionGroup > label: list first; > with: [ > list second > do: [ :each | > html option > value: each with: selectTag; > with: each ] ] ] ]. > > > > -- > View this message in context: http://forum.world.st/optionGroup-callback-does-not-fire-tp4682815.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > 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 |
Hi Johan,
yes. I was just anwering that I added the onChange: at the wrong place. Thank you. Sabine On Sun, Apr 21, 2013 at 1:12 PM, Johan Brichau <[hidden email]> wrote: Hi Sabine, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sabine Manaa
On Sun, Apr 21, 2013 at 1:12 PM, Sabine Knöfel <[hidden email]> wrote:
> Hi Max, > > thank you. There is >>beSubmitOnChange. > But I dont want the whole page to be submitted. > > But you gave me the hint! > > My error was, that I added onChange AFTER the with: block...and that does > not work. > > This works: > theInput1 > id: mid; > selected: self currentDay expensesCountryDay; > callback: [ :value | self countryDay: value inspect ]; > onChange: (html prototype evaluator > triggerForm: self countryDaySelectionFormID; > return: false); > with: [ .....] ]. > > This doesNOT work > theInput > id: mid; > selected: self currentDay expensesCountryDay; > callback: [ :value | self countryDay: value inspect ]; > with: [ ..... ]; > onChange: > (html prototype evaluator > triggerForm: self countryDaySelectionFormID; > return: false). This is a common mistake, I believe we even have a Slime rule for this. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
What is a slime rule?
On Sun, Apr 21, 2013 at 3:27 PM, Philippe Marschall [via Smalltalk] <[hidden email]> wrote:
|
On Sun, Apr 21, 2013 at 3:29 PM, Sabine Knöfel <[hidden email]> wrote:
> What is a slime rule? The refactoring engine comes with a static analysis engine (SLint). We (well, Lukas mostly) wrote several custom rules for Seaside applications, the package is called Seaside-Slime. It's mostly used in Pharo/Squeak and the UI is tied to OB (AFAIK). I don't know what would be required to port it to other dialects. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I've recently started working on porting the Refactoring Engine to GemStone[1] and at the moment I've got the code loading into GLASS and I think there are about 500 errors and and handful of failing tests ... the code seems to be pretty tightly coupled to the Squeak/Pharo reflection model but I haven't gone so far as to determine if the coupling is isolated in a few spots or spread out over the whole system:)
Dale [1] https://github.com/dalehenrich/rb ----- Original Message ----- | From: "Philippe Marschall" <[hidden email]> | To: "Seaside - general discussion" <[hidden email]> | Sent: Sunday, April 21, 2013 6:40:36 AM | Subject: Re: [Seaside] Re: optionGroup -> callback does not fire | | On Sun, Apr 21, 2013 at 3:29 PM, Sabine Knöfel <[hidden email]> | wrote: | > What is a slime rule? | | The refactoring engine comes with a static analysis engine (SLint). We | (well, Lukas mostly) wrote several custom rules for Seaside | applications, the package is called Seaside-Slime. It's mostly used in | Pharo/Squeak and the UI is tied to OB (AFAIK). I don't know what would | be required to port it to other dialects. | | Cheers | Philippe | _______________________________________________ | 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 |
Free forum by Nabble | Edit this page |