[Seaside] Displaying Seaside Components in frames
Ben Schroeder
bschroeder at procro.com
Thu Aug 21 15:28:06 CEST 2003
I wrote:
> Hi all,
>
> We've just started trying Seaside for a project we're doing
> here where I work. Thanks, Avi, Julian, and everyone else
> for such a neat system.
>
> At one point in our project, we'd like to display a Seaside
> Component in one frame and some image or PDF content in
> another, but most of our application is not frames-based.
> I'm not sure how to go from the non-frames part to the frames
> part while maintaining the state of the program.
>
> Does anyone have any pointers on how to run a frameset in Seaside?
Well, I think I may have come up with a solution. Here it is, both in
the hope that it might be useful and in case I've missed something subtle.
I responded with a WAGenericResponse that contained my frameset
HTML, including URLs to the image and to the next page of my
application. The part that I was struggling with was what URL to
use for the next page.
It ends up that I could use WAHtmlRenderer>>#urlForAction: to do what
I needed (which makes sense now that I know).
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.
Thanks,
Ben Schroeder
More information about the Seaside
mailing list