[Seaside] Ajax that uses server-side rendering

Iwan Vosloo iwan at reahl.org
Wed Jul 15 10:23:02 UTC 2015


Hi there.

I am relatively new to Seaside and am uncertain about the best way to 
solve some of the requirements we need to cover for a client. We do have 
solutions for these, but they are tightly coupled to in-house 
infrastructure and I think we can lean a lot from seeing how you guys 
would have done it.

All of this is happening on Pharo 3.0, Seaside 3.1 and Magritte 3. Some 
of the stuff is built using components and some using Magritte. We 
prefer the latter.

Here is a relatively simple one:

We need to let a user choose a "type of ID document" in a dropdown. 
Underneath this dropdown, a text input should appear via ajax (on change 
of the dropdown), but it appears only for certain options of the dropdown.

This should happen via ajax, but we have one wish... we do not want to 
use Pharo's javascript library wrappers to code the logic of HOW the DOM 
should be changed in the browser. We'd rather fetch newly generated HTML 
from the server via a "jQuery load", and replace a small chunk of the 
form with this HTML. This way we let the original server-side 
seaside/magritte code render that (changed) HTML snippet. (Some of our 
screens are fairly complex, and we'd prefer to keep the logic for what 
such a screen look like written once, and using Seaside/Magritte.)

Regards
- Iwan

PS: Is the seaside list the correct place to have this discussion? (as 
opposed to the magritte list)


-- 
Reahl, the Python only web framework: http://www.reahl.org



More information about the seaside mailing list