<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Mariano,<div><br></div><div>A bit longer answer.</div><div><br></div><div>I added an example to the QC Magritte Demo to show how this can be done. I added it to the last demo (form demo).</div><div><br></div><div>There are actual several ways to do this in QC Magritte, but I implemented what I think is the most elegant one for this problem.</div><div><br></div><div>First you need to make sure the QC Magritte stuff is used, so in the domain object we implement to following 2 methods:</div><div><div>mementoClass</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^QCAjaxMemento&nbsp;</div></div><div><br></div><div>The normal memento is not aware of the class and will not process and domain rules, other than validations set in the descriptions. We need to update the values of other objects as well, so this allows for influences and hidden fields.</div><div><br></div><div><br></div><div><div>setDefaultsFor: aContainer</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;magritteContainer&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^aContainer</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>componentRenderer: QCGroupedFormRenderer;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>componentClass: QCContainerComponent;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>descriptionBuilder: QCDescriptionFlattener;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>yourself</div></div><div><br></div><div>This basically overrides the default component class, component renderer and adds a description builder.</div><div><br></div><div>The component renderer adds the AJAX stuff. This renderer adds a callback to each element of a group, that re renders the group when it is changed. Also it allows for groups to be collapsed by the user.</div><div><br></div><div>The component class makes sure the description builder is used to process the description.&nbsp;The description builder you probably don't need, but it processes the description, before it is shown, allowing for defaults, security and such. The descriptionFlattener is expanding relations to groups, allowing to use nested objects. I.E. a person has an address, and you want to model this as a different object. But when you edit a person, you usually want to be able to change the address, without switching pages.</div><div><br></div><div>If you do not want to use the description builder, setting the component renderer will suffice.</div><div><br></div><div>For more information on QC Magritte see:&nbsp;<a href="http://smalltalkhub.com/#!/~DiegoLont/QCMagritte">http://smalltalkhub.com/#!/~DiegoLont/QCMagritte</a></div><div><br></div><div>Cheers,</div><div>Diego</div><div><br><div><div>On Dec 9, 2013, at 9:28 PM, Mariano Martinez Peck wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi guys. I have lots of seaside forms with magritte. One problem I have now is that I want to refresh the form once an item from a combo list has been selected. For example, the typical set country / state (or provice). In other words...I want to refresh the form once certain fields are choose.&nbsp;<div>
I did not find this functionality available in Magritte-Seaside. I am missing something?</div><div><br></div><div>Thanks in advance,&nbsp;<br><div><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com/" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>

</div></div></div>
_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></blockquote></div><br></div></body></html>