문제

I am a GWT beginner.

I wanted to bookmark the GWT application developed using MVP.

I have a state where user can narrow down the search results by selecting search criteria on the page. If the user selects any criteria, search results will be fetched thru AJAX and displayed on the page.

Now I want to bookmark it.

The problem here is the URL doesnot contain which search criterai selected.

I want something to update the URL with out refresh/reload the page.

Can anyone please help me out.

도움이 되었습니까?

해결책

You can use Activities and Places design pattern:

https://developers.google.com/web-toolkit/doc/latest/DevGuideMvpActivitiesAndPlaces

It allows bookmarking any place within the app with whatever parameters you need for that particular place. For example, your URL may look like:

myApp.com/#SEARCH:user=123&key=xyz

Your search Activity will read this token and process it as you need it without reloading the page. You will also be able to "create" these URLs without reloading the page.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top