call vaadin component from javascript

Is it possible to call a function on a Vaadin component from javascript?

I have a Vaadin Label displaying html content. This html content contains links like: Link

When the link is clicked, the dosomething function should select an item in a Vaadin Tree object.

Is this possible ahd how to do this, or is there another way to achieve this, by using a component other than Label, …?

Suggestions are welcome !

Rgds,
Annelies

The client-side in Vaadin is created in GWT. It is possible to publish API from client-side widgets to JavaScript. In practice this is rarely needed.

If your need is just to add a link that selects a row in a Vaadin table, why not just use Link-style in button. See
http://demo.vaadin.com/sampler/#ButtonLink
for an example.

I have considered the use of a link style button, but since the html label is the complete content of a page (not just one link), I don’t know how to display the other html content.

E.g.
This is what I put in my label at the moment:

This is some content. And here is my link

I can display the a-tag as a link style button, but how can I display the rest of the html?

Hi,

It sounds like one possible solution in your case would be to set the fragment - i.e select itemX

, then ‘catch’ that on the server using the UriFragmentUtility.

Best Regards,
Marc

Do you know if the UriFragmentUtility can also be used in a portal application?

Update: I tried it out and it works perfectly. Thanks a lot for your help !