Integrate external javascript

Hi there,

I know it is a topic that was already discussed in the past but I need an hint from yours about my specific needs.

We are using vaadin 6.8 and there are different ways to call JS from vaadin:
using labels (not sure if it still working)
using a custom component

We need to add an our custom implementation of a table implemented in javascript code. I think that a custom component could be the right choice but there is a way to add an existing javascript code in our custom component ?

The skeleton of the custom component is the following:

public class TableComponent extends CustomComponent {

	private AbsoluteLayout mainLayout;

	 * The constructor should first build the main layout, set the
	 * composition root and then do any custom initialization.
	 * The constructor will not be automatically regenerated by the
	 * visual editor.
	public TableComponent() {

		// TODO add user code here

	private void buildMainLayout() {
		// the main layout and components will be created here
		mainLayout = new AbsoluteLayout();


I need to “embed” the javascript function in it. I would like to know if it is the best approach and in what way I can do it.

Thanks for any help