問題描述
在 gwt 框架中使用參數更改 url (Changing url with parameters in gwt framework)
Could someone give me an example how to use celltable in case I would like to change url?
I have a simple celltable ‑
On session select I would like to change url to something like this ‑
localhost#main?sessions=20,21
I have already read about placeControllers
and etc.
But I don't find any example of using url with parameters.
What I have to do when select event is calling?
What I have to do when place(history) event is calling?
參考解法
方法 1:
Using history token in GWT is quite simple, just read little bit about it here.
Basically when you want to change history token, just build string you want and use History.newItem(token). Not sure what do you want to do afterwards, but usually you have to register handler with History.addValueChangeHandler() to react to new "state"
To find out actually selected items, you need kind of selection model. But not sure when do you want to trigger the change..
(by Mary Ryllo、sodik)