[問題] ZK MVVM access UI元件 in ViewModel
大家好
小弟最近在學習zk的MVVM模式
看到教學網站上的範例
http://books.zkoss.org/wiki/Small_Talks/2012/January/MVVM_Extension:_Access_UI_Components_Inside_ViewModel
網頁中間有個範例 SearchAutoWireVM.java,宣告UI元件
@Wire(#msgPopup)
Popup popup;
@Wire(#msg)
Label msg;
我想問一下要怎麼在class的method裡面使用UI元件?
好比說我想要在 method 裡面用 msg.setValue("Test Label");
因為我用 Selectors.wireComponents(msg, this, false);
好像也沒辦法直接把Label(msg)綁到controller裡面??
不知道這樣的描述是不是清楚??
還請知道的大大們不吝賜教
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.169.138.197
※ 文章網址: https://www.ptt.cc/bbs/java/M.1443797421.A.4FD.html
java 近期熱門文章
PTT數位生活區 即時熱門文章