[Seaside] Re: Update a component after a Jquery

jtuchel at objektfabrik.de jtuchel at objektfabrik.de
Fri May 29 04:41:47 UTC 2015


Mariano,

load html: replaces the contents of a DOM node, so you need a render 
method that only renders the children of a node or you will end up with, 
say a DIV with itself as its frst child after load html:

replaceWith: replaces the element itself. So you can use the normal 
rendering method to really replace the DOM node with what you render in 
the block.

Note: I keep failing in my use of replaceWith: for whatever reason.

Joachim


Am 29.05.15 um 04:03 schrieb Mariano Martinez Peck:
>
>
> On Thu, May 28, 2015 at 10:40 PM, Paul DeBruicker <pdebruic at gmail.com 
> <mailto:pdebruic at gmail.com>> wrote:
>
>     mail client coding but something like this should work:
>
>
>     (html jQuery new datepicker onSelect: (html jQuery
>     ajax serializeThis;onSuccess:((html jQuery id:
>     'myTableContainerId') *load
>     html:* [:h | h render: myTable])).
>
>
>
> Paul: Is there a difference between doing a "load html:" and 
> "replaceWith:" ? In other words, doing:
>
> (html jQuery new datepicker onSelect: (html jQuery
> ajax serializeThis;onSuccess:((html jQuery id: 'myTableContainerId') 
> *replaceWith:* [:h | h render: myTable]
>
> Thanks,
>
>
>
>
>
>     HilaireFernandes wrote
>     > Hi,
>     >
>     > The datepicker event below updates the model and it implies an
>     important
>     > change in the component content (TableReport, etc). I think I
>     kind of
>     > need to refresh the page on the client.
>     > Is it possible to do so from a callback fired from a jquery?
>     >
>     > Thanks
>     >
>     > Hilaire
>     >
>     >         html textInput
>     >             value: '1/1/2015';
>     >             callback: [ :value | self addMonth: value asDate
>     asMonth];
>     >             script: (html jQuery new datepicker onSelect: html
>     jQuery
>     > ajax serializeThis).
>     >
>     > --
>     > Dr. Geo
>     > http://drgeo.eu
>     > http://google.com/+DrgeoEu
>     >
>     >
>     > _______________________________________________
>     > seaside mailing list
>
>     > seaside at .squeakfoundation
>
>     > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
>
>     --
>     View this message in context:
>     http://forum.world.st/Update-a-component-after-a-Jquery-tp4829158p4829219.html
>     Sent from the Seaside General mailing list archive at Nabble.com.
>     _______________________________________________
>     seaside mailing list
>     seaside at lists.squeakfoundation.org
>     <mailto:seaside at lists.squeakfoundation.org>
>     http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
> -- 
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150529/5bdfc3fb/attachment.htm


More information about the seaside mailing list