The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dialloma (72) [Avatar] Offline
#1
Hello,

I explain you my problem and if you can, you propose me a solution please !
In my GWT application, I have two panels. One in left and onother on right. In my left panel, I have a list of links. I want to that when I click in one display more informations about this links on the right panel. So when I want to display a new information on right, I must delete the old that was displayed. My problème is how can I use History listener on this case. I lost the last information anytime I display a new. My question is how can I do this type of application ? Is it possible in GWT to identifier any page by an Id ? For example, when I want to acced to the page 1, the URL can be http://domainName/MyModule.html?idPage=3 .

Thanks
dialloma
adam.tacy (269) [Avatar] Offline
#2
Re: How can we create a GWT application with many HTML Pages ?
Hi Dialloma,

Not sure why the standard history approach in GWT wouldn't work here, using the tokens as a reference to the page required. Each time you click on a link you would load the right page into the frame and add an appropriate token to the History manager.

Then if a user navigated to your page with a token, you just read that and then load the appropriate page.

Have a look at page 119 in the book on HistoryListener and see if that could help

Regards,

//Adam
dialloma (72) [Avatar] Offline
#3
Re: How can we create a GWT application with many HTML Pages ?
I know this approch. But you know that the same page can have many states. For example in the same page, when I do some action, the iterface can change. So must I associate each state to a specific token ?

Thanks,
dialloma
adam.tacy (269) [Avatar] Offline
#4
Re: How can we create a GWT application with many HTML Pages ?
In principle you can assign any value to the token as it is a String, so you could encode the required page and state in the token, e.g.

token = "Page:state1:state2:state3:"

That way rather than just using the token as an indicator to the page you would also have to parse the token to get the page and then the stored state of the page's components.

Could become rather unwieldy if you have too much state though......and I've not tried it myself so it might not work......

//Adam
dialloma (72) [Avatar] Offline
#5
Re: How can we create a GWT application with many HTML Pages ?
Thanks adam,

So I'm goint to try it.

thanks
dialloma