[Seaside] Problem with announcements in Seaside when using Pharo 1.3

Andrei Vasile Chis chisvasileandrei at gmail.com
Sun Jul 17 16:53:50 UTC 2011


Hi all,


In have a simple case: in an ajax callback I trigger an announcement and in
the callback associated with the announcement I try to render a Date object.
When I do this I get a WARequestContextNotFound exception.

To be more exact I have in a component this function to render the callback
link:

renderAnnouncementUpdate: html
  html anchor
     onClick: (html jQuery ajax script: [ :s |
script := s.
 model announce: SGLLinkClickedAnnouncement new ]);
      with: 'Update Announcements'

The model is initialized when I create the component in:
initialize
super initialize.
 model := SGLVerySimplePresentation new.
 model on: SGLLinkClickedAnnouncement do: [:ann|
self onClick: ann].

When the announcement is called it will trigger the onclick: method which
will do the rendering:
onClick: ann
self addScripts: script
addScripts: s
s << (s jQuery: #date1)
             html: [ :r | r render: Date today ].
      s << (s jQuery: #time1)
             html: [ :r | r render: Time now ]

However the html: method trigers an WARequestContextNotFound exception.

I'v tried this on Pharo 1.3 (running on CogVM) with the latest version of
Seaside.

The application can be found in the Moose Playground project from
http://www.squeaksource.com in the package SGL-Seaside-Problem. Atfer you
install the package and
start a web server you have to execute "SGLTestComponentMin
registerAsApplication: 'SGLTestComponentMin'." to register the application.

Am I missing something?

Cheers,
Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110717/a58fb7ae/attachment.htm


More information about the seaside mailing list