[Seaside] What's the difference and why??
Rick Flower
rickf at ca-flower.com
Wed Mar 1 00:31:07 UTC 2006
Rick Flower wrote:
> Brian Brown wrote:
>> In your case, I wouldn't use a WATask.
> That's kinda what I thought as well.. I guess if I'm not going to use
> a WATask, I'd need to code up the renderContentOn: method to not only
> display my links near the top of the page, but also display the login
> form crud as well.. In MyWebApp, can I do something like this :
>
> renderContentOn: html
> html divClass: 'sidebar' with: [html render: menuArea].
> html divClass: 'contentarea' with: [html render: mainPage].
> html divClass: 'loginarea' with: [html render: loginArea].
>
> where loginArea is an instance of a Login class which has a
> renderContentOn: method that looks something like :
>
> renderContentOn: html
> html form: [
> html defaultAction: [self confirmLogin].
> html heading: 'Welcome to MyWebApp' level: 3.
> html bold: 'Enter login name:'.
> html textInputWithValue: '' callback: [:v | self login: v].
> html br; br.
> html space; space; space; bold: 'Enter password:'.
> html passwordInputWithCallback: [:c | self password: ((MD5
> hash: c) asHexString asLowercase) ].
> html paragraph.
> html attributes value: 'Login!'.
> html submitButton.
> ].
>
Hmm.. I'm apparently wrong on something above.. While the page initially
renders great, when I hit the "login" button,
Seaside gives me the following error :
Components not found while processing callbacks: #(a MSLogin)
I'm guessing this has to do with the fact that Seaside no longer has the
object lying around or something along those
lines.. Do I need to play the games like you showed above with the
'MenuArea' class and have a class-side method
to store an object instance? Now I'm starting to feel a bit like a fish
out of water.. I guess I should have knocked on wood!
-- Rick
More information about the Seaside
mailing list