我是GWT的新手,試圖製作一個試圖繼承複合小部件的頁面,但複合小部件的值是動態的。gwt中的uibinder的動態值
我的主頁是服用點,如:
.....
.....
<g:Button>Open composite widget</g:button>
.....
.....
這是打開一個又一個彈出面板是這樣的:
.....
<table>
<tr><td>Top: <myCompany:userMeasurementUnit/> </td></tr>
<tr><td>Bottom: <myCompany:userMeasurementUnit/> </td></tr>
<tr><td>Left: <myCompany:userMeasurementUnit/> </td></tr>
<tr><td>Right: <myCompany:userMeasurementUnit/> </td></tr>
</table>
以上須出示
top (cm)
bottom (cm)
left (cm)
right (cm)
但我不知道如何將值從主頁面傳遞到自定義小部件,即usermeasurementunit
<myCompany:userMeasurementUnit/>
我usermeasurementunit是一樣的東西:
UiBinder的:
<htmlpanel tag="span" ui:field="unit"/>
和組合大部件是
usermeasurementunit extends Composite {
public usermeasurementunit(){
initwidget...
}
public onload() {
...
}
}
現在我想通過任何測量單位釐米或英寸或米按一下按鈕。我嘗試了使用事件總線,但它並沒有幫助,因爲當我點擊按鈕popuppanel不在屏幕上,並沒有捕捉事件。如果你們中的任何一個人能夠幫助我,我會非常感謝,因爲我真的在爲這件事而苦苦掙扎。
親切的問候
似乎你已經在你的UI冷落的類名:有型。 – 2014-08-03 11:38:13
你說得對。我錯過了包括它。 – 2014-08-03 17:34:44