Making Record Metadata Editable

You may use the following code from encounter_form_layout_long,jsp as a guide to implement editing of other metadata fields:

<td id="cellSiteId" ondblclick="callMetaDataWidget('SiteId', '${subject.id}')">
<span id="valueSiteId" class="renderedValue">${subject.siteName}</span>
<span id="widgetSiteId"></span>
</td>

Note that the first parameter in callMetaDataWidget is "SiteId." Identify each of the metadata widgets by a unique name - dateOfVisit, for example, for the Date of Visit widget. You'll need to edit WidgetDisplay class to remove the hard-coding of SiteId in dispatchMetaData. View the "SiteID" condition in WidgetUtils to craft one for the new widget. Add a new condition for the new sidget in dwr-utils.jsp getValue method.