[Seaside] Re: Update a component after a Jquery

Paul DeBruicker pdebruic at gmail.com
Fri May 29 05:11:22 UTC 2015


Hi Mariano, 

In addition to what Joachim said: 

If you use #replaceWith: the html content must be known when the original
script is created, and therefore cannot reflect changes from the
datepicker's callback.  With  the 'load html:' the client sends an ajax
request for new html content (which could have changed because of the
datepicker's content), so you get up to date info in your DOM.




Mariano Martinez Peck wrote
> On Thu, May 28, 2015 at 10:40 PM, Paul DeBruicker <

> pdebruic@

> >
> 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 .squeakfoundation

>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> 
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
> 
> _______________________________________________
> 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-tp4829158p4829230.html
Sent from the Seaside General mailing list archive at Nabble.com.


More information about the seaside mailing list