[Seaside] Problem with anchors (Canvas API) generating bad links

Rick Flower rickf at ca-flower.com
Mon Mar 13 20:43:01 UTC 2006


Hi all.. Every time I think I'm taking one step forward, I get stuck. 
The other day I found that my web links
are no longer working for some reason after I had to regenerate my 
image.. For some reason, when the
HTML is generated, they refer to links such as 
"http://localhost:8008/seaside/go/nil" which cause browser
not found errors such as "Error: "/seaside/go/nil" not found... 
Unfortunately, when they were working, I
didn't bother paying any attention to what they did point to -- I'm 
assuming some sort of internal link that
Seaside generated.. For these links, they don't really need to point to 
any pages per-se, but are only used
for their callbacks mechanism.

Below is my current code -- keep in mind that my "self parent home" is a 
place holder until I plug in the functionality
I want to those items.  I suspect I'm doing something wrong and perhaps 
another set of eyes can show me what
goof up I did this time..   Many thanks in advance as usual!

MSMenuArea>>renderContentOn: html
        html unorderedList with: [
            html listItem with: [ html anchor text: 'Home';             
        callback: [ self parent home ] ].
            self session loggedIn ifFalse: [
                html listItem with: [ html anchor text: 'About';         
callback: [ self parent home ] ].
                html listItem with: [ html anchor text: 'Enroll';     
            callback: [ self parent home ] ].
                html listItem with: [ html anchor text: 'Contact Us'; 
            callback: [ self parent home ] ].
            ]
            ifTrue: [
                html listItem with: [ html anchor text: 'Update Contact 
Info';     callback: [ self parent home ] ].
                html listItem with: [ html anchor text: 'My Orders';     
        callback: [ self parent home ] ].
                html listItem with: [ html anchor text: 'My Reports'; 
            callback: [ self parent home ] ].
                html listItem with: [ html anchor text: 'Logout';     
            callback: [ self parent home ] ].
            ]
        ].

The above code is called in turn by the first line in the "ifFalse" 
block where "menuArea" is rendered :

MyWebApp>>renderContentOn: html
   html div id: 'container'; with: [
      html div id: 'header'.
        self session loggedIn
                ifFalse: [
                        html div id:'mainnav'; with: [html render: 
menuArea].
                        html div style: 'height: 300px'; with: [
                            html div id: 'loginLeftBox'; with: [html 
render: loginArea].
                            html div id: 'loginRightBox';  with: [html 
render: MOTDarea].
                       ]
                ]
                ifTrue: [
                        html div id: 'mainnav'; with: [html render: 
menuArea].
                        html div style: 'margin-bottom: 10px; 
background-color: #eee'; id: 'contents'; with: [html render: mainPage].
                ].
        ].
.
.
.




More information about the Seaside mailing list