[Seaside] Widget implementation question

Derek Brans brans at nerdonawire.com
Tue Apr 8 14:24:16 CEST 2003


I used to have a date selector widget in 2.2 that was a subclass of ValueView.

The complicated thing about a date widget that's in a form and represents a member on an object is that there are 3 UI components and you need to take the result of all 3 (day, month, year) to come up with a date object that get's sent to the setter for a member.

In my ValueView subclass I had rendering code like this:

renderOn: html
    renderDayChooserThatSetsMyDayState
    renderMonthChooserThatSetsMyMonthState
    renderYearChooserThatSetsMyYearState

    html renderHiddenInputWithValue: 'ignore' callback: [:ignore | self turnMyStateIntoADateObjectAndPassItToMyModel]

I think this problem can be generalized but I haven't come up with a succinct way of doing that.

Anyone handled the same problem before?

Derek Brans
Nerd on a Wire
Web design that's anything but square
http://www.nerdonawire.com 
phone: 604.874.6463
mailto: brans at nerdonawire.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lnx-12.ams-2.theinternetone.net/pipermail/seaside/attachments/20030408/d21ca3b0/attachment.htm


More information about the Seaside mailing list