Skip to content

Commit

Permalink
#270 fix response of PATH /quickInputId
Browse files Browse the repository at this point in the history
the quick input's document changes shall be reported first
  • Loading branch information
teosarca committed Mar 27, 2017
1 parent fcd13ba commit 851bbd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/de/metas/ui/web/quickinput/QuickInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ public String toString()
.toString();
}

public DocumentPath getDocumentPath()
{
return quickInputDocument.getDocumentPath();
}

public IAutoCloseable lockForReading()
{
final ReadLock readLock = readwriteLock.readLock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ public List<JSONDocument> processChanges(
return Execution.callInNewExecution("quickInput-writable-" + quickInputPath, () -> {
forQuickInputWritable(quickInputPath, quickInput -> {
quickInput.processValueChanges(events);

Execution.getCurrentDocumentChangesCollector().setPrimaryChange(quickInput.getDocumentPath());
return null; // void
});
return JSONDocument.ofEvents(Execution.getCurrentDocumentChangesCollector(), newJSONOptions());
Expand Down

0 comments on commit 851bbd6

Please sign in to comment.