Announcement Announcement Module
Collapse
No announcement yet.
Commit FormModel on losing focus on FormPage Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Commit FormModel on losing focus on FormPage

    Is it possible to get the state of FormModel either changed or not as a whole form not by a property? I want to prompt user to save their changes if they move away from FormPage and FormModel has been changed.

    Amad

  • #2
    You'll need to do something like this:

    Code:
    void onFocusLost() {
      if (formModel.isDirty()) {
         // prompt user to save
      }
    }
    Ollie

    Comment


    • #3
      Thanks Ollie . Now If I can only make JPanel to work with FocusListener... For some reason or bug JPanel never gets focusGained or focusLost events.

      But thanks for your help, any ideas about my other post on CreateCompoundChild

      Thanks

      Amad

      Comment


      • #4
        A JPanel never receives focus (it's not focusable), so it never receives focusLost or focusGained events.

        Comment

        Working...
        X