[Seaside] Re: Ajax that uses server-side rendering

Paul DeBruicker pdebruic at gmail.com
Wed Jul 15 16:00:05 UTC 2015


html select
      onChange: (html jQuery id: 'textInputDiv') load html:[:h | self
renderTextInputForSelectedOn: h]

html div id:'textInputDiv'

do what you want?

Iwan Vosloo wrote
> 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
> _______________________________________________
> seaside mailing list

> seaside at .squeakfoundation

> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

View this message in context: http://forum.world.st/Ajax-that-uses-server-side-rendering-tp4837612p4837691.html
Sent from the Seaside General mailing list archive at Nabble.com.

More information about the seaside mailing list