Vaadin Designer, mid-april status

Hi Marc. First, thanks for your reply.
I am running eclipse:
Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600
Vaadin version is:7.4.7
Windows 7 - 64 bits.
JDK 1.7.0_25

I think that editor mode should work, even though IE is not working. Shouldnt that fail only when trying to show preview page?
I will upgrade to vaadin 7.5 and let you know! the results

Thanks!!!
Regards,

The Designer uses the browser to display all views (except the source view). To do that the Designer embeds the default browser into eclipse. On Windows this is IE. So you will need to get IE to work with Vaadin before you can properly use the Designer.

If you cannot get any Vaadin application to load in IE then the problem most likely is that you have blocked javascript from executing. This can happen if you turn Javascript off in the browser settings or you have a security software (adblock / firewall / virus scanner/…) that installs an IE extension into your browser and actively blocks Javascript.

Hi John! thanks for your comments. My application is deployed using tomcat and I can open it using IE or Chrome, it works on both. I think that what you said about firewall may be the problem. However, I dont know why the URL of the application uses IP:PORT. Why does it uses my IP and not localhost? How can I configure jetty to use localhost instead of my IP? Is difficult for me to change firewall because its not permitted (it’s my work’s computer).
Thanks in advance! Regards,

Hi guys! finally I am using a different computer so that network issues are not there anymore. Now I am having this error I attached as screenshot and also the log I get from error view. I get this log when I try to open a Design using vaadin designer. I hope you can help me.
Thanks in advance!
19910.txt (14.6 KB)
19911.jpg

By default the Designer will try to resolve a public facing IP + port automatically. The reason why it needs a public facing ip address is that the designs can be viewed on any mobile device by just using the design URL. But you can configure what host and port the designer will use under the project settings.

Here is a screenshot of how that can be done (just uncheck the “Automatic” checkbox and add your own ip+port):

Just remember that when you run it on localhost then the external preview feature cannot be used.

Looks like you are trying to open a Java (MainPortal.java) file instead of a design HTML file.

Thanks John!! It’s working now!! very very happy…=)
Now I am having an issue when trying to add an image to a Panel. I opened the Source property of image, and used this:
new ThemeResource(“img/logopri.jpg”) and also tried with img/logopri.jpg but they dont work. Exception is “File not found”.
What am I doing wrong?

Thank you very much for your support!
Regards,

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

This works for icons as well, BTW.

This is not obvious, and it’s in our backlog of things we want to improve asap in a .x release: the […]
button should help you to add images from different sources.

Best Regards,
Marc

Thanks Marc! It worked.

Kind regards,

Quick question on null representations in the designer. I can’t seem to set that field to an empty string… if I set it empty it reverts to null.

If i set the field to “”, I get the quotes showing as the null representation.

Worth noting here that if I edit the HTML to have null-representation=“” it works as expected - hence I think this is an issue with the designer itself.

Is there a way I can set blanks in the visual designer - maybe there is a trick to it.

Radical thought: make empty string the null default for all string based fields?? :slight_smile:

Ok, so if I bring up the detail editor I can set a blank string, just not in the panel editor on the sidebar (reverts to null if you leave it blank).

Hi friends,

A problem about ItemCaptionMode of Select components.

When I drop an OptionGroup or a ComboBox into the designer, designer generate a attribute into the HTML file: “item-caption-mode=‘id’”.

This attribute set the ItemCaptionMode property of these Components into ItemCaptionMode.ID, which will display the ItemID as the selection Caption in to page.

But by default, the ItemCaptionMode property of these Components (inherit from AbstractSelect) should be ItemCaptionMode.EXPLICIT_DEFAULTS_ID.

(1)Why the UI designer change the defualt value of ItemCaptionMode property?
(2)I checked the Properties View of Eclipse, there is not a property where I can change this value

Is this a Bug?

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