Vaadin design page opening problem

Hi when i open the vaadin Visual Designer it saying the message like, could not open the design view:
Failed to find or parse Visual editable Class Caused by non editable custom component Any one can help me why this message coming how to solve it …:blink:

Did you edit the source code of your class by hand? That could be the problem.

To be somewhat more precise, you should not touch (modify/rename/delete) anything marked with the @AutoGenerated annotation outside the visual editor.

In any case, make sure you are using the latest version of the plug-in. Compared to old versions, it should give a much more detailed and useful message about why opening the visual editor failed.

Thanks for giving Quick Replay i M new to vaadin where to get lattest version of plugins i want some more deatils:)

You can check if there are newer versions of Eclipse plugins by going to Help → Check for Updates

Thanks i got it
:slight_smile:

same problem here. I’m totally new to Vaadin. Installed the last Vaadin plugin for Eclipse (I’m using Eclipse 3.7 for J2EE dev 64bit).
generated a sample project and tried to open the Application in “design mode”.

here’s the generated default code:

package com.example.vaadin1;

import com.vaadin.Application;
import com.vaadin.ui.*;

public class Vaadin1Application extends Application {
	@Override
	public void init() {
		Window mainWindow = new Window("Vaadin1 Application");
		Label label = new Label("Hello Vaadin user");
		mainWindow.addComponent(label);
		setMainWindow(mainWindow);
	}

}
  • it can’t be parsed

Please avoid double posting - your question is answered in
the other thread
(but this thread might have been better for your question than the other one).

Hi Henri,

I’m new to Vaadin…

I created my portlet and I was very happy about the first results …

Then I was using Visual editor to design my UI… Then I added code to populate Table and other widgets but just now I realized that I can’t touch the @Autogenerated methods …

I read your post but I can’t understand at all how I can add code and after use the Visual editor again…

Please, could you help a bit more?

Thank you in advance!

Ivano C.

Ooooopss!!

Sorry for the question …

Visual editor was very clear to suggest “// TODO add user code here” … maibe I was blind :slight_smile:

Thank you !

Ivano C.

Vaadin plugin does not support all component properties, that’s why we have to modify the auto generated code. Any suggestions for adding more properties without modifying code?.

Which additional properties would you need for which components?


Creating an enhancement request
for specific properties might help.

In the long term, tickets
#5839
and
#5849
should help if/when implemented.

Hello,

I got the same issue

Failed to find or parse Visual editable Class Caused by non editable custom component

I just update the last vaadin plugin, also XULRunner is correctly install because I reveive a popup about this also. so I install it and register it and popup msg gone.

I restart Eclipse same error message.

I have Eclipse Juno Service Release 2
Build id :20130225-0426

Vaadin plugin Version : 2.1.1.201304120103

I have Windows 8 64bit lastest version, 12gig ram ,I7

here the source code of my .java file


package com.example.web1;

import com.vaadin.annotations.Theme;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

/**
 * Main UI class
 */
@SuppressWarnings("serial")
@Theme("web1")
public class Web1UI extends UI {

    @Override
    protected void init(VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        setContent(layout);

        Button button = new Button("Click Me");
        button.addClickListener(new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
                layout.addComponent(new Label("Thank you for clicking"));
            }
        });
        layout.addComponent(button);
    }

}

any clue, or it’s there a way to run the designer online on the web.

Getting same problem as well.- “Could not open design view”
Windows 7 - 64 bit
Eclipse Juno 32 Bit
XMLRunner installed before Juno was installed.
Getting no other errors - only design view will not open when using Vaadin 7 Editor

What is the magic combination ?

If you get “Failed to find or parse Visual editable Class Caused by non editable custom component,” it means exactly what it says: The class you are trying to edit is not a CustomComponent that the visual editor can handle.

There are several quite specific requirements for a class to be visually editable. In theory it is possible to write a class you can edit with the visual editor by hand, but in practice you must start with the “New… → Vaadin Composite…” wizard and should not touch any autogenerated methods or fields in the generated Java code.

A class extending com.vaadin.ui.UI can never be visually editable, but can contain a visually edited component as its content.

See
this chapter of the book
for some more information.

Keith: If your problem is not the same as the previous post, please give more details. Any error information in Eclipse error log might also be helpful (Window… → Show View… → Error Log).

I´m using After Save Actions in Eclipse and I let eclipse qualify my code with e.g. this.
The code generated from the Visual Designer isn´t qualified with this and so eclipse qualifies also
the generated code.

Then I get following error:
Invalid expression statement in auto-generated layout method buildMainLayout on line 32:
this.mainLayout = new HorizontalLayout();

Why is the generated Code not qualified?
With my Compiler Settings I get (and I want to get) a Warning when code isn´t qualified.

In the Code Guidelines in my Company
there is a “No Warning Policy” and I don´t want generated code which is not qualified with this.

The code parser of the visual designer is currently quite strict about the content of the auto-generated methods.

You can
create a ticket
for this so that the issue won’t be forgotten immediately, although realistically I would not expect this to end up at the top of the priority list at the moment.