Vaadin Designer, mid-april status

You should use theme://img/logopri.jpg - assuming your image is in VAADIN/themes/≤yourtheme>/img/logopri.jpg

If the resource/image is not in the theme directory, but in the general resource directory, how can we reference it in the designer’s image.source property?
(Or is there is another place other than the theme and resource directories we can put the images, because some images are not theme based (example: company logo), but are used regardless of the theme)

A resource that is in the classpath (in the resource directory) can be referenced in Vaadin by using a ClassResource. But a ClassResource cannot be represented by a string, so the Designer cannot support them currently. Maybe we will do something about that in the future, but for now it is unsupported.

So, to use ClassResources you will need to add them manually. Just give a name to your component you want to add the resource to, and add the resource in your Java code.

I thought I’d add some more info about this…

The declarative format currently supports
ExternalResource
(e.g http://…),
ThemeResource
(theme://…) and
FileResource
(file://). The notable omission is
ClassResource
, and Designer can not support it until the declarative format does.

However, for the case you mention, I’d still use
ThemeResource
(note that you can use relative paths, e.g
theme://…/global/logo.png
) or perhaps
ExternalResource
.
I’d recommend setting it up so that static resources can be served separately - potentially with a separate server, if the need arises (and ClassResource might not be optimal for that).

In the future, the Designer will be more helpful in showing the options you have, and letting you drag&drop or select resources.

Best Regards,
Marc

Spring and other dynamic resource loaders have honored a “class://” or “classpath://” approach and a FS naming syntax to identify class resources so this is a problem which has been solved before.

Hello guys again…
I dont know why, but Designer stopped working. I try to open html file, and I see this exception :
java.lang.IllegalStateException: Controller for input org.eclipse.ui.part.FileEditorInput(/activiti-explorer/src/main/resources/org/activiti/explorer/main/MainPortal.html) has not been registred.
I attached the screen I get when it opens. I keeps trying to load view and never loads.
Also I cannot create a new design, this exception is thrown every time I click on the “Finish” button:
java.lang.NoClassDefFoundError: Could not initialize class com.vaadin.designer.eclipse.java.ComponentJavaModel

I updated to designer version 0.6.6 and vaadin version 7.5.0.alpha1, but it doesnt work. =(

Thanks for your help!
Regards,

19956.jpg

Could you please update the Vaadin version to a more recent Vaadin version (like 7.5.0.beta3) and try again?

I updated to 7.5.0.beta3 version but still the same…anything else I can try?

Thanks!!

Please update Designer!
If the problem persists, please let us know, and provide more information about OS version, Eclipse version, Java version etc.

Best Regards,
Marc

Vaadin Designer has reached Beta!

Please update (the version number is 0.8.1) and pop over to this thread with feedback and questions:

https://vaadin.com/forum#!/thread/10332948