Попробовал пример накидать
XML:
<xp:panel id="panelTasks">
<xp:this.data>
<xp:dominoView var="ProtocolTasksView"
viewName="TasksAllByParentUNID">
<xp:this.databaseName><![CDATA[#{javascript:return 'someSrv!!someDb.nsf';}]]></xp:this.databaseName>
<xp:this.categoryFilter><![CDATA[#{javascript:return document.getDocument().getUniversalID();}]]></xp:this.categoryFilter>
</xp:dominoView>
</xp:this.data>
<xp:repeat id="repeat1" rows="100" var="rowTask"
repeatControls="false" indexVar="rowTaskIndex" first="1"
value = "#{ProtocolTasksView}">
<xp:div styleClass="list-group">
<xp:inputText id="contents">
<xp:this.readonly><![CDATA[#{javascript:if(viewScope.editTasks != null && viewScope.editTasks == '1'){
return false;
}else{
return true;
}}]]></xp:this.readonly>
<xp:this.value><![CDATA[#{javascript:if(rowTask.isDocument()){
return rowTask.getDocument().getItemValueString('TaskContents');
}}]]></xp:this.value>
</xp:inputText>
</xp:div>
</xp:repeat>
<xp:div styleClass="panel-heading clearfix" id="buttonsAddEdit"
rendered="#{javascript:compositeData.dataSource.isEditable();}">
<div class="btn-group">
<xp:button styleClass="btn btn-primary" value=""
id="btnEditTasks">
<xp:span>
<xp:this.styleClass><![CDATA[#{javascript:if(viewScope.editTasks != null && viewScope.editTasks == '1'){
return 'fa fa-save';
}else{
return 'fa fa-edit';
}}]]></xp:this.styleClass>
</xp:span>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="panelTasks">
<xp:this.action><![CDATA[#{javascript:try{
print('try to edit task');
if(viewScope.editTasks == null || viewScope.editTasks == ''){
//редактирование
viewScope.editTasks = '1';
}else{
//окончание редактирования
var coll:NotesDocumentCollection = ProtocolTasksView.getAllDocumentsByKey(document.getDocument().getUniversalID());
var count = 0;
if(coll != null)count = coll.getCount();
var doc:NotesDocument = coll.getFirstDocument();
var xspDoc:NotesXspDocument;
while(doc != null){
xspDoc = XSPUtils_wrapDocument(doc);
if(xspDoc != null) xspDoc.save();;
var tmp = coll.getNextDocument(doc);
doc.recycle();
doc = tmp;
}
viewScope.editTasks = null;
}
}catch(err){
print("Произошла ошибка: " + err);
}}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
</div>
</xp:div>
</xp:panel>