Callbacks from plain html code to application


i am trying to solve the following issue:

OpenlayersMap allows to put links, buttons,… to the map. But these links, buttons,… (elements) are pure html and java script elements without any serversided parts. They are no vaadin components.
But if the link is clicked i would like to notify the MapDialog (it contains the currently shown map) about the click and to trigger some operations at the dialog.

I had a deep look into the AbstractApplicationServlet but i am not sure how to solve this issue.

I tried the ParameterHandler and URIHandler:
Therefore i created a unique URL like localhost:8899/myApp?myUniqueId=9988AA4CFF and registered a parameter listener at the window that observes the myUnqiueId parameter.
But it does not work for me, since i do not provide a downloadResource and AbstractApplicationServlet#writeAjaxPage reloads my application.

Then i tried the UriFragmentUtility, but it also reloads the application and does not work for me.

So i thought about creating a new RequestType which is similar to the UIDL-Request type and to subclass the AbstractApplicationServlet.

My question?
Are there any common ways to implement that stuff? Or do i have to create a custom RequestType?

Thanks in advance,
Florian Pirchner

How do you mean, that UriFragmentUtility reloads the application? If you have links like #123 and #124 the fragment change sends only an ajax request about the fragment change and not a get request? I’m sorry I’m not familiar with OpenlayersMap, so I don’t know if there are some particular issues related to that.

let me explain some more in detail the use-case

I’m developing the business-workflows and UI on top of OpenStreetMap via OpenLayers Add-On

I’m adding some waypoints as PointVector, tracked routes as PolyLine etc to VectorLayer
and also Markers to MarkerLayer - works well

I can add Controls - also no problem

I can use Listeners to be notified if a Waypoint, Line etc. is selected or a Marker was clicked - also no problem

Popups are used in different ways:

  • simply displaying informations
  • displaying informations and also let the user choose from some options like “show me the order”, “open the contact window”, “go to the customer”… to solve this I’m using HTML-Links inside the HTML-code of the Popups. something like "http://xxx/backdoor-to-the-app/id=42… There’s no way to get the information on which Link the user clicked.

so the idea was to have a callback into the Vaadin App using URIHandler / ParameterHandler or so to provide a hashmap with the parameters

…and so asked Florian to implement this into redVoodo

perhaps someone can give some hints


BTW: this work is part of - BusinessApps with Vaadin + OSGi - will be available open source later this year. Florian is working hard on redVoodo and I’Äm just implementing Map- and LBS - Support using OpenStreetMap + OpenLayers Add-On


thanks for the hint! I played around and now it works since i am using only the fragment as the url.



For the old way the whole UI renders. But the new version only invoked the URIFragmentUtility.

Thanks again,
Florian Pirchner