|
|
Subject: WAHtmlAttributes>>submitOnClick - msg#00076
List: lang.smalltalk.squeak.seaside
Seems #submitOnClick does not work as submit() has to be called on that
particular form. It doesn't work on Firefox, but it does on Safari. I
*think* it worked on Opera. I ended up adding
MyScriptLibrary>>submitForm
^ '
function submitForm(formName) {
document.forms[formName].submit();
}
'
WAHtmlAttributes>>submitFormOnClick: aFormNameString
self at: 'onClick' put: 'submitForm("' , aFormNameString , '")'
I also had to modified the dialog/form to allow setting of a form name.
Anyone has a better way?
--
HweeBoon
MotionObj
(65) 6764
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: Rendering a date as three fields
Awesome - thank you.
On Sat Feb 12 04:58:47 PST 2005, Yar Hwee Boon
<hboon@xxxxxxxxxxxxx> wrote:
On 12-Feb-05, at PM 08:52, Mike wrote:
I want to render a date as three selection fields: day, month
and year. So I have code like this:
You can browse #dateInputWithValue:callback: for an example.
--
HweeBoon
MotionObj
(65) 6764-9774
_______________________________________________
Seaside mailing list
Seaside@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/listinfo/seaside
Next Message by Date:
click to view message preview
Re: [VW] Seaside/VW Support - Time & Date Classes
Michel,
I was wonderng the same things myself.
Thanks for the explaination, and keep up the good work with maintaining the
port.
Jon.
---------- Original Message ----------------------------------
From: Michel Bany <m.bany@xxxxxxxxxx>
Reply-To: "The Squeak Enterprise Aubergines Server - general discussion."
Date: Sat, 12 Feb 2005 10:43:44 +0100
>
>> Michel,
>> I was wondering if there is a reason that there are two Date and Time
>> classes in the VW port? As far as I can tell, there is no additional
>> behavior. The classes are Squeak.Date, Seaside.Date and Squeak.Time &
>> Seaside.Time. It seems this also applies to the class Color.
>>
>Yes Brett, there is a reason. Here are the details, sorry for being long.
>
>A large amount of the port work consists in making VisualWorks look like
>Squeak for Seaside.
>For this purpose, we need to add conveniency methods to the base
>VisualWorks library
>and also a bunch of new classes to implement some of the Squeak API. At
>some point in time
>I got the idea to extract all of the "squeakisation" stuff and to create
>a separate bundle. So I created
>that bundle named "Squeak" where I collected the squeakisation items
>needed for Seaside and,
>while at it, I collected more squeakisation stuff from other sources. At
>the same time, I was having
>problems porting the cookies expiration logic, because Seaside relies on
>the Squeak Chronology
>framework for this. Also at the same time, there were discussions (on
>the VWNC mailing list I believe)
>regarding the availability of class DateAndTime in VisualWorks. So I
>decided to port the Chronology
>classes to VisualWorks and I created bundle "Squeak-Chronos". Bundles
>"Squeak" and "Squeak-Chronos"
>were designed independently of Seaside.
>
>As can be expected bundle "Squeak-Chronos" has some classes that
>conflict with the base VisualWorks
>library, namely, Date, Time, and TimeZone (TimeStamp in Squeak does not
>conflict with Timestamp).
>Fortunately VisualWorks has namespaces that can handle that.
>
>However, the Seaside namespace imports both the Squeak and the Smalltalk
>namespace, therefore
>references to these three class names are ambiguous. Since I did not
>want to patch the Seaside
>source code to replace all occurences of those ambiguous names by fully
>qualified names, I used
>a naughty trick to define classes Date, Time and TimeZone in the Seaside
>namespace as subclasses
>of Date, Time, TimeZone from the Squeak namespace, just to resolve the
>ambiguity transparently
>for Seaside. This also ensures that Seaside uses the Squeak
>implementation of these three classes
>making the Seaside port easier and quicker, since I do not have to care
>about Date and Time
>differences between Squeak and VW.
>
>For the Color class, I used the same naughty trick, in a different
>context. Seaside contains extensions
>to the Color class. However the Color class does not exist in
>VisualWorks but exists in the "Squeak"
>bundle, defined in the Squeak namespace as a subclass of VW ColorValue.
>When importing the
>Seaside code into VisualWorks, the Color extensions (for some reason)
>could not be assigned to
>Squeak.Color, therefore I created Seaside.Color (subclass of
>Squeak.Color) so that Seaside
>extensions to Color could be loaded. Note that Seaside does not use the
>Color any longer since
>the Seaside-Contrib package was discontinued.
>
>A final note. You may want to try if Seaside would work with the Date
>and Time from the base
>VisualWorks library. Just change the superclass of Seaside.Date and
>Seaside.Time to be Core.Date
>and Core.Time and see how it goes.
>
>Enjoy,
>Michel.
>
>_______________________________________________
>Seaside mailing list
>Seaside@xxxxxxxxxxxxxxxxxxxxxxxxxx
>http://lists.squeakfoundation.org/listinfo/seaside
>
Previous Message by Thread:
click to view message preview
Rendering a date as three fields
Hi,
I want to render a date as three selection fields: day, month and
year. So I have code like this:
"date is an instance variable"
html selectFromList: days selected: selectedDay callback: c1
html selectFromList: months selected: selectedMonth callback: c2
html selectFromList: years selected: selectedYear callback: c3
I need your help understanding what my callbacks c1, c2 and c3
should do to update the 'date' instance variable on self. c3 is
easy - [:v | self date year: v]
But what about c1 and c2 for day and month?
Thanks very much,
Mike.
PS I guess the more general question is what to do when I need to
have two or more callbacks "collaborate" in some way. Thanks
again.
Next Message by Thread:
click to view message preview
Re: [VW] Seaside/VW Support - Time & Date Classes
Michel,
I was wonderng the same things myself.
Thanks for the explaination, and keep up the good work with maintaining the
port.
Jon.
---------- Original Message ----------------------------------
From: Michel Bany <m.bany@xxxxxxxxxx>
Reply-To: "The Squeak Enterprise Aubergines Server - general discussion."
Date: Sat, 12 Feb 2005 10:43:44 +0100
>
>> Michel,
>> I was wondering if there is a reason that there are two Date and Time
>> classes in the VW port? As far as I can tell, there is no additional
>> behavior. The classes are Squeak.Date, Seaside.Date and Squeak.Time &
>> Seaside.Time. It seems this also applies to the class Color.
>>
>Yes Brett, there is a reason. Here are the details, sorry for being long.
>
>A large amount of the port work consists in making VisualWorks look like
>Squeak for Seaside.
>For this purpose, we need to add conveniency methods to the base
>VisualWorks library
>and also a bunch of new classes to implement some of the Squeak API. At
>some point in time
>I got the idea to extract all of the "squeakisation" stuff and to create
>a separate bundle. So I created
>that bundle named "Squeak" where I collected the squeakisation items
>needed for Seaside and,
>while at it, I collected more squeakisation stuff from other sources. At
>the same time, I was having
>problems porting the cookies expiration logic, because Seaside relies on
>the Squeak Chronology
>framework for this. Also at the same time, there were discussions (on
>the VWNC mailing list I believe)
>regarding the availability of class DateAndTime in VisualWorks. So I
>decided to port the Chronology
>classes to VisualWorks and I created bundle "Squeak-Chronos". Bundles
>"Squeak" and "Squeak-Chronos"
>were designed independently of Seaside.
>
>As can be expected bundle "Squeak-Chronos" has some classes that
>conflict with the base VisualWorks
>library, namely, Date, Time, and TimeZone (TimeStamp in Squeak does not
>conflict with Timestamp).
>Fortunately VisualWorks has namespaces that can handle that.
>
>However, the Seaside namespace imports both the Squeak and the Smalltalk
>namespace, therefore
>references to these three class names are ambiguous. Since I did not
>want to patch the Seaside
>source code to replace all occurences of those ambiguous names by fully
>qualified names, I used
>a naughty trick to define classes Date, Time and TimeZone in the Seaside
>namespace as subclasses
>of Date, Time, TimeZone from the Squeak namespace, just to resolve the
>ambiguity transparently
>for Seaside. This also ensures that Seaside uses the Squeak
>implementation of these three classes
>making the Seaside port easier and quicker, since I do not have to care
>about Date and Time
>differences between Squeak and VW.
>
>For the Color class, I used the same naughty trick, in a different
>context. Seaside contains extensions
>to the Color class. However the Color class does not exist in
>VisualWorks but exists in the "Squeak"
>bundle, defined in the Squeak namespace as a subclass of VW ColorValue.
>When importing the
>Seaside code into VisualWorks, the Color extensions (for some reason)
>could not be assigned to
>Squeak.Color, therefore I created Seaside.Color (subclass of
>Squeak.Color) so that Seaside
>extensions to Color could be loaded. Note that Seaside does not use the
>Color any longer since
>the Seaside-Contrib package was discontinued.
>
>A final note. You may want to try if Seaside would work with the Date
>and Time from the base
>VisualWorks library. Just change the superclass of Seaside.Date and
>Seaside.Time to be Core.Date
>and Core.Time and see how it goes.
>
>Enjoy,
>Michel.
>
>_______________________________________________
>Seaside mailing list
>Seaside@xxxxxxxxxxxxxxxxxxxxxxxxxx
>http://lists.squeakfoundation.org/listinfo/seaside
>
|
|