[Seaside] date picker

Pavel Krivanek squeak3 at continentalbrno.cz
Mon Oct 3 12:50:43 UTC 2005


Hi all,

I have created wrapper class for date picker widget from ShoreComponents.

The usage will be:

picker := ShoreDatePicker in: html.
picker on: #date of: self.

There will be next abstract class named ShoreWidget as the ancestor of 
widget classes.

There are two problems:

1) I have tried to create subclass that submits parent form immediately 
(ShoreDatePickerSubmitting). The problem is how to get ID of parent 
form. I have solved this by adding next method to the ShoreRenderer:

formId

  | currentContext formMethod |

  currentContext := thisContext.
  formMethod := ShoreComponent>>#formOn:with:.

  [ currentContext sender isNil ]            whileFalse: [
          currentContext sender method == formMethod
          ifTrue: [
              ^ currentContext sender receiver formId ].
          currentContext := currentContext sender ].

  ^ nil

Has anybody better idea how to get the form id? Notice that the widget 
is bound only to the renderer.
2) date picker doesn't work correctly with the date format dd.mm.yyyy, 
because method String>>asDate doesn't support it well.

Any suggestions and remarks?

-- Pavel


More information about the Seaside mailing list