# HG changeset patch # User paulb # Date 1138322493 0 # Node ID 5bf698cc5805f01e14ef2294e7d20228404ecf47 # Parent 490425e80153d5637a1adee4a70bb2d92435cb5d [project @ 2006-01-27 00:41:33 by paulb] Changed the quoted template document to reflect how in-page update element paths operate with the new template mechanisms. diff -r 490425e80153 -r 5bf698cc5805 docs/in-page-updates.html --- a/docs/in-page-updates.html Fri Jan 27 00:40:56 2006 +0000 +++ b/docs/in-page-updates.html Fri Jan 27 00:41:33 2006 +0000 @@ -112,7 +112,7 @@ update. Since it is the type values that cause each comment field to be added or removed, we add an event attribute on the form field responsible for displaying the type values:

-
  <p>
Item type:
<select template:multiple-choice-list-field="type,type-enum,value" name="..." multiple="multiple"
onchange="requestUpdate(
'comments',
'{template:list-attribute('type-enum', 'value')}',
'{template:other-elements(../options)}',
'{template:child-attribute('value', template:child-element('comment', 1, template:other-elements(../options)))}',
'/structure/item/options')">
<option template:multiple-choice-list-value="type-enum,value,selected" value="..." />
</select>
</p>
+
  <p>
Item type:
<select template:multiple-choice-list-field="type,type-enum,value" name="..." multiple="multiple"
onchange="requestUpdate(
'comments',
'{template:list-attribute('type-enum', 'value')}',
'{template:other-elements(../options)}',
'{template:child-attribute('value', template:child-element('comment', 1, template:other-elements(../options)))}',
'/structure/item')">
<option template:multiple-choice-list-value="type-enum,value,selected" value="..." />
</select>
</p>

This complicated string calls a special update request JavaScript function which triggers the in-page update, and it specifies the following things:

@@ -153,7 +153,7 @@ therefore, we need to make up the final part of the reference using the special template:child-attribute and template:child-element functions. -
'/structure/item/options'
+
'/structure/item'
Finally, we need to provide some context to the application to tell it something about where in the complete form data structure the updated information resides.