[Seaside] Displaying Seaside Components in frames
Avi Bryant
avi at beta4.com
Thu Aug 21 12:51:22 CEST 2003
On Thu, 21 Aug 2003, Ben Schroeder wrote:
> Here's something like my code for creating the response.
>
> | response |
> response _ WAGenericResponse new
> nextPutAll: '<html><frameset rows="10%, 90%">';
> nextPutAll: '<frame src="';
> nextPutAll: (html urlForAction: [self call: PrintOrFax new]);
> nextPutAll: '" />';
> nextPutAll: '<frame src="';
> nextPutAll: self imageUrl;
> nextPutAll: '"/>';
> nextPutAll: '</frameset></html>'.
>
> self session returnResponse: response.
Hi Ben,
That'll certainly work, although it's not really necessary to go to that
low a level. I might have used a render method something like this:
html attributes rows: '10%, 90%'.
html frameset: [
html attributes src: (html urlForAction: [self call: PrintOrFax new]).
html frame.
html attributes src: self imageUrl.
html frame
]
An obvious thing that should be done to clean this up is to implement
#frameWithUrl: and #frameWithAction: on HtmlBuilder and HtmlRenderer
respectively; this would then become
html attributes rows: '10%, 90%'.
html frameset: [
html frameWithAction: [self call: PrintOrFax new].
html frameWithUrl: self imageUrl.
]
>From there, you might or might not want to build a generic FrameSet
component...
Cheers,
Avi
More information about the Seaside
mailing list