Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2680

Text Fields in Modeler loose modification when switching to another tab or panel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.1
    • 5.0-M2
    • Modeler
    • None

    Description

      Observation:

      Several (single line) text fields in Modeler forget changes or insertions of text if the user switches to a different panel or tab without explicitly leaving (bluring) the text field.

       

      Expectation:

      Text changes shall be kept also in those cases.

       

      Background:

      It hit me several times, when, e.g. walking through a list of entities to add comments or modify other texts, that the changes are dismissed due to switching to the next entity or a different 'area' of the application. To keep the changes, it is necessary to click onto a different UI element within the same panel. It seems that changes of single line texts are 'taken over' only on 'focus lost' event, which are not fired in the described cases.

       

      As a simple solution, I defaulted 'checkOnTyping' to 'true' in the standard constructor of

      org.apache.cayenne.modeler.util.TextAdapter
      

      which is more a quick hack, since it might not cover all relevant instances and introduces some potential processing overhead when typing. A better approach would probably be to trigger the commit of changed texts in listeners of appropriate events. Nevertheless no negative impact to performance was observed using this approach.

      The attached patch provides this change AND the propagation of constructor arguments, which have originally been dismissed and replaced by hardcode values.

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            sITo Stefan S.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: