[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
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
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:
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:
self addScripts: script
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
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside