Dialogs as sub-components

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dialogs as sub-components

Ken Causey-3
I've returned to using Seaside for a project a long, long time (like 2
years?) after having first worked with it and, basically, I'm starting
all over again in my understanding.

I want a component/app that is basically a table of items and below that
a textarea to add more items to the table (one per line).  I was
thinking that the form would be a sub-component and so I created a
WAFormDialog subclass and it has an #ok method which #answer:s a
collection of the items found after processing the string from the
textarea.

My thought was then that in the parent component's #renderContentOn: it
would self call: an instance of the dialog and that would return the
collection of items found.  However I'm finding that the result of a
#call: the entire page is replaced by the dialog.  And using #render:
does not return the result.

Where am I going wrong?

Also while I'm here I might as well make a call for anyone with the time
to come by #squeak since we do occasionally have Seaside questions come
up (this being a case in point).

Ken

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dialogs as sub-components

Ken Causey-3
Lukas dropped by and helped me out.

Basically the solution was to use #onAnswer: to set a 'answer handler'
block for the sub-components that does the work and use #render: in
#renderContentOn: .

Thanks!

Ken

On Wed, 2006-05-31 at 13:41 -0500, Ken Causey wrote:

> I've returned to using Seaside for a project a long, long time (like 2
> years?) after having first worked with it and, basically, I'm starting
> all over again in my understanding.
>
> I want a component/app that is basically a table of items and below that
> a textarea to add more items to the table (one per line).  I was
> thinking that the form would be a sub-component and so I created a
> WAFormDialog subclass and it has an #ok method which #answer:s a
> collection of the items found after processing the string from the
> textarea.
>
> My thought was then that in the parent component's #renderContentOn: it
> would self call: an instance of the dialog and that would return the
> collection of items found.  However I'm finding that the result of a
> #call: the entire page is replaced by the dialog.  And using #render:
> does not return the result.
>
> Where am I going wrong?
>
> Also while I'm here I might as well make a call for anyone with the time
> to come by #squeak since we do occasionally have Seaside questions come
> up (this being a case in point).
>
> Ken

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

signature.asc (196 bytes) Download Attachment