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

Ramon Leon rleon at insario.com
Mon Mar 13 20:47:04 UTC 2006


with: and text: need to always be the last tags, they cause rendering,
so all your anchors are ignoring their callbacks, set the callback:
before the text. 

> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf 
> Of Rick Flower
> Sent: Monday, March 13, 2006 1:43 PM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: [Seaside] Problem with anchors (Canvas API) 
> generating bad links
> 
> 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].
>                 ].
>         ].
> .
> .
> .
> 
> 
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 


More information about the Seaside mailing list