On Fri, Dec 13, 2013 at 12:59 PM, Diego Lont <diego.lont@delware.nl> wrote:
On 11 dec. 2013, at 21:09, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
Ok, I understand. What I need is:

1) To not re-render all fields (I have many forms where I have many lists that are queried from a DB) for every single field modification.

Yes, that should not be the problem. That was what the rendering in groups was for. The method that creates the script does it on a single id, and creates and updater for this part of the page only.

Yes, I saw that. You either create the script for the whole form or for the group div. 
 

2) I don't want to have to display some fields together in order to have them been re-rendered when one of them has been modified. 

That implies adding multiple updates, so multiple scripts to the same input.

Yes. Each element of the group has multiple scripts (one for each other of the group), right?
 
So instead of adding a "script: aScript" parameter, we probably should have a variant that adds a "scripts: aCollection" parameter. I am not sure how the implementation should look like exactly. You can try simply adding all scripts.

What if:

- We store the container (as you did with the AjaxTable..)
- to the container we ask the "dependencyGroups" (I pick this name for this mail).
- We create a script for each element of each dependencyGroup. 
- To each element of each dependencyGroup we set all the scripts of that group.
 
Sounds ok but no idea how to implement it heheheh. But the flexibility is huge. You decouple from #group, you decouple from the fact of having to display dependent fields one below another one... 

Of course: beware of loops, because otherwise the loading will never stop.


OK
 
3) I am not obligued to use #group: I can use something different, like #dependentsGroups or something like that

Point taken. I misused group here. I probably should have introduced another term. Do you have a good suggestion? I do not think we should couple this to group.


#dependenciesGroup: ? 
#notificationGroup:
#updaterGroup:

same of above but using the word "set" instead of group (to avoid any confusion with Magritte groups). Like "dependenciesSet" 

 
Diego

P.S. If added you as contributor to QCMagritte


Thanks!
 
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



--
Mariano
http://marianopeck.wordpress.com