imbibinebe
unread,Mar 9, 2012, 2:07:55 PM3/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JavaScript Templates Engine PURE
Hi,
I trying to build a table template which is meant to display any JSON
object we give it, with dynamic sorting and filtering features. A
shark template which eats anything that looks like JSON :D
While rendering the template, depending on properties (type, ie ...)
of a subset of the JSON object, i would like to append a new row&cell
which will contain the same template (table) with a different #id than
its parent template. This nested template will be rendered later with
the JSON object subset if the user wants to (by clicking on an cell
expand button for example).
If you know how Firebug displays JSON objects, my shark template will
do the same + sorting&filtering features ;)
What I do til now is:
While rendering the base template, i save JSON object subsets in event
handlers of user interaction tags like 'onclick="dataSubset={JSON
subset};functionThatReRenderBaseTemplate();"'
Then, the base template is re-rendered with the data subset. This
works perfectly !
Now I'd like to keep what was rendered before instead of replacing
everything.
Does anyone have a solution ? I hope you understood what I want, my
english is not so good and it might be a bit tricky ...