# How does BibEntry.java communicate with LinkedFileEditorViewModel.java

**URL:** <https://discourse.jabref.org/t/how-does-bibentry-java-communicate-with-linkedfileeditorviewmodel-java/3632>\
**Category:** Help\
**Tags:** ui, entry-editor\
**Created:** [November 17, 2022, 2:46pm UTC](https://discourse.jabref.org/t/how-does-bibentry-java-communicate-with-linkedfileeditorviewmodel-java/3632 "2022-11-17T14:46:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexLu1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/alexlu1/32/1508_2.png) [@AlexLu1](https://discourse.jabref.org/u/AlexLu1)\
**Post date:** [November 17, 2022, 2:46pm UTC](https://discourse.jabref.org/t/how-does-bibentry-java-communicate-with-linkedfileeditorviewmodel-java/3632/1 "2022-11-17T14:46:51Z")

</div>

We are currently trying to implement an extra feature for JabRef as University Project at Universität Basel, we oriented ourselves at this issue [Better support for managing annotated PDFs · Issue #94 · koppor/jabref · GitHub](https://github.com/koppor/jabref/issues/94).

Currently i’m having a hard time understanding how the BibEntry.java object is notified of a files field change when adding a new LinkedFile over for example the “addNewFile()” Operation in the LinkedFileEditorViewModel.java class.  
A new LinkedFileViewModel.java object is created but i currently don’t see the logic which updates the corresponding BibEntry.java object which can also call a “getFiles()” Operation.  
I already read into Property Bindings as this seems to be heavily used, could someone throw me a hint per chance.

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [November 17, 2022, 9:13pm UTC](https://discourse.jabref.org/t/how-does-bibentry-java-communicate-with-linkedfileeditorviewmodel-java/3632/2 "2022-11-17T21:13:22Z")

</div>

Hi,

thanks for working on this!  
In general this works that way: the BibEntry is the model class and the Fields are bound bidirectional (Bindings are just nice wrapper for the concept of Observables) with the EntryEditor.  
This happens here:

> <https://github.com/JabRef/jabref/blob/3f82d6da95002190932ad8cfd02730c36790f69f/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java#L239>

So whenever we change something either in the model itself or in the gui, the entries are updated.

For the concept of Bindings and Properties, I suggest this good explanation:

> **[JavaFX Properties and Binding - A Complete Guide](https://edencoding.com/javafx-properties-and-binding-a-complete-guide/)**
>
> One of the benefits of using JavaFX is its powerful and comprehensive support for properties and binding. Among other things, properties let you wire your scene so that the view...

PS: Dev questions are better handled in the gitter.chat or on github directly 🙂
