How to add listeners to bidirectionally bound objects

后端 未结 2 729
醉话见心
醉话见心 2021-01-20 20:01

I am trying to bind a TextArea\'s textProperty to a StringProperty in controller\'s initialize() method.

Both of them are listened by listeners to perform some behav

2条回答
  •  -上瘾入骨i
    2021-01-20 20:18

    I found 2 solutions to you answer

    1:

    Declare the StringProperty as static

    OR 2:

    In the TextArea Listener just call toBind.get()

    But honestly I don't know why those work.

提交回复
热议问题