[Seaside] Iframe question

Max Schönbauer schonbauer at sc-protec.de
Tue May 17 12:46:46 CEST 2005


Hi all,

I'm new to seaside and have the following problem:

I created a page with three iframes, the user should enter some
keywords in the search-iframe and press a search-button.
When he hit the button, I create a query and send it to the database.
The result shoult be displayed in the list-iframe.
--------------------
detail-iframe
--------------------
list-iframe
--------------------
search-iframe
--------------------
The probelm is that I don't know how to tell the list-iframe, to render
the result-set, when the button in the seach-iframe is pressed.

Here is how I tried it:

WAAVNComponent subclass: #WAAVNAdr
        instanceVariableNames: 'detailIframe listIframe searchIframe'
        classVariableNames: ''
        poolDictionaries: ''
        category: 'AVN-HTTP'
        

renderContentOn: html 
        detail text: ('Detail id = ', (list selId) printString).
        html cssClass: 'frameDetails'; 
                iframe: (html urlForAction: [WARenderLoop new 
                                                                        root: detail; run]).

        (list selId) isNil  ifFalse:[^nil].
        html attributeAt: 'scrolling' put: 'auto'.
        html cssClass: 'frameList'; 
                iframe: (html urlForAction: [WARenderLoop new 
                                                                        root: list ; run]).

        html cssClass: 'frameSearch'; 
                iframe: (html urlForAction: [WARenderLoop new 
                                                                        root: search; run]).
                                                                

WAAVNComponent subclass: #WAAVNList
        instanceVariableNames: 'record ueberschrift '
        classVariableNames: ''
        poolDictionaries: ''
        category: 'AVN-HTTP'                                                            
                                                        
getTable: aSql

        (self session db) execSql: aSql.
        ueberschrift := (self session db) columnNames.
        record := (self session db) values: 100.        
                
renderContentOn: html 

        record isNil 
                ifTrue:[        self getTable].
        html table: [ 
                self renderTableHeader: html.
        .       self renderTableMain: html].
        
        
        
WAAVNComponent subclass: #WAAVNSearch
        instanceVariableNames: 'sql listIframe'
        classVariableNames: ''
        poolDictionaries: ''
        category: 'AVN-HTTP'    
                
renderContentOn: html 
        html form:[
                html text: 'Enter query '.
        html textInputOn: #sql of: self.
        html submitButtonWithAction:[listIframe getTable: sql]].


Thank you for any suggestion.

-- 
 Best regards
 Max Schoenbauer



More information about the Seaside mailing list