Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Vaadin SimpleAddressBook Tutorial Example Portlet Problem William Gosse January 3, 2012 11:01 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem David H Nebinger January 3, 2012 11:22 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem William Gosse January 3, 2012 11:28 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem William Gosse January 3, 2012 11:49 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem David H Nebinger January 3, 2012 12:31 PM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem William Gosse January 3, 2012 1:20 PM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem David H Nebinger January 3, 2012 1:40 PM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem William Gosse January 3, 2012 1:57 PM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem David H Nebinger January 3, 2012 2:52 PM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem David H Nebinger January 3, 2012 2:56 PM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem William Gosse January 4, 2012 6:14 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem David H Nebinger January 4, 2012 6:17 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem William Gosse January 4, 2012 6:57 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem David H Nebinger January 4, 2012 7:22 AM
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem Jack Bakker January 4, 2012 10:59 AM
William Gosse
Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 11:01 AM
Answer

William Gosse

Rank: Regular Member

Posts: 249

Join Date: July 4, 2010

Recent Posts

i'm trying to renderthe SimpleAddressBook tutorial example as a portlet on Liferay 6.06. I've setup a Vaadin project using the latest version of the Liferay IDE and copy in the code from the example.

The project compiles and deploys onto Liferay and can be added to a portal page but does not seem to be executing correctly (see attached file).

I also added the Vaadin admin portlet to Liferay and upgraded to the lastest version of Vaadin. I also compiled all the widget sets.

I've got about a year and half worth of experience with Liferay, using Icefaces for all custom portlet development and have successfully deployed a portal for my employer using this combination (see http://crushpro.salesquest.com/ ).

This is my first foray into using Vaadin and I think I'm missing some critical step here.
Attachment

Attachments: Capture.GIF (63.0k)
David H Nebinger
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 11:22 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

When you update Vaadin, you must manually overwrite the contents of the /ROOT/html/VAADIN folder. There's also a sub folder called ControlPanel that I also end up overwriting the contents. I do these deployments as an ext plugin against the original Liferay.

After these files are updated, then go to the Vaadin control panel and recompile the widget sets.
William Gosse
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 11:28 AM
Answer

William Gosse

Rank: Regular Member

Posts: 249

Join Date: July 4, 2010

Recent Posts

Just hot deploying the vaadin-controlpanel-for-liferay.war isn't enough?
William Gosse
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 11:49 AM
Answer

William Gosse

Rank: Regular Member

Posts: 249

Join Date: July 4, 2010

Recent Posts

I'm not sure if I fully understood your solution. I manually copied the both the themes and widgetsets folder contained in the ControlPanelBundle.zip file to the ROOT/html/VAADIN and ROOT/html/VAADIN/ControlPanel folders then recompiled the widgetsets.

My issue didn't go away so I must still be doing something wrong.
David H Nebinger
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 12:31 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

There's a separate download on the Vaadin site. Go to the download page and click on "Other Packages". Under there is a "Vaadin 6 Liferay Update Package". Download that, extract the contents to /webapps/ROOT/html (already has the VAADIN folder in it). That updates your core widget set and theme package.

The Vaadin jar goes to /webapps/ROOT/WEB-INF/lib, replacing the old vaadin jar that's there.

The control panel looks for it's own widget set as /webapps/ROOT/html/VAADIN/ControlPanel. If you don't already have the folder, then create one. Copy the themes and widgetsets directories (and their contents) from /webapps/ROOT/html/VAADIN into this new ControlPanel folder.

Recycle your app container, log in and recompile the widget sets.

I know it's a total pain to do all of these steps. I created an EXT plugin where I do these updates, then deploy the EXT plugin. That way I don't have to expand into /webapps/ROOT manually, I just deploy the EXT and it will take care of the file copying. All I have to do is recycle and recompile the widgetsets.
William Gosse
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 1:20 PM
Answer

William Gosse

Rank: Regular Member

Posts: 249

Join Date: July 4, 2010

Recent Posts

Well I did everything as you've described in your last reply, but the portlet still looks the same as in my original post. I'm assuming it should look more like the picture on the https://vaadin.com/tutorial page. It doesn't seem to be initializing correctly. It should be preloaded with sample contact data. I've run it in debug and it seems to be stepping through the init() ok, When I click the + button it gets a nullpointerexception in the button click listener, but I think there's a problem in the initialization. I copied this code from https://vaadin.com/tutorial page and it compiles ok with a deprecated SplitPane class only. Maybe I'll try to update this class with the newer HorizontalSplitPane.

This kind of just an experiment for me now. I was hoping turning this example code into portlet would have went a little smoother then its has. The auto-generated Hello World Vaadin portlet code deployed fine but it has no widgets,

I went ahead a attached my war to this thread. I appreciated if you could take look at it for anything not correct I'd appreciate it. The war includes the source code.
Attachments: SimpleAddressBook.war (12.8k)
David H Nebinger
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 1:40 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

I'll take a look at it. We've done a number of Vaadin-based portlets w/o much trouble.

When I've seen rendering issues like this in the past, they've been due to CSS set by Liferay by default that the Vaadin theme does not expect to be set.

But as a portlet development framework, it's been a really great platform to work with. Crisp Ajax-based response, and our devs are more productive as they no longer have to be concerned about doing javascript coding (in jQuery and/or AUI).
William Gosse
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 1:57 PM
Answer

William Gosse

Rank: Regular Member

Posts: 249

Join Date: July 4, 2010

Recent Posts

Thanks for your help.

I was just able to convert the http://demo.vaadin.com/docs/example-source/com/vaadin/demo/Calc.java.html to a portlet.

Also I'm seeing the following error message popping up from time to time:
Failed to load the widgetset: /SimpleAddressBook/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?1325627696969
David H Nebinger
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 2:52 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

Okay, I deployed the app that you uploaded and had the same result.

By inserting the line
1splitPanel.setHeight("500");
at line #42, things looked right.

This is an example of how the Liferay CSS sometimes screws up the Vaadin theme CSS. Manually setting the height as I did above countered whatever Vaadin was doing under Liferay.

Sometimes these things can be fixed by choosing a different Vaadin theme (i.e. creating your own that 'undoes' the Liferay CSS that you're having trouble with), and sometimes you can just use a simple change such as above to get it to work right.

One of the fun issues we get to deal with!

P.S. I tried the HorizontalSplitPanel and VerticalSplitPanel classes also w/ the same result. Unless I manually set the height that I wanted, it couldn't render correctly on it's own...
David H Nebinger
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 3, 2012 2:56 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

Bill Gosse:
Also I'm seeing the following error message popping up from time to time:
Failed to load the widgetset: /SimpleAddressBook/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?1325627696969


This would be coming from the servlet side, as the portlet side uses the shared widgetset provided by Liferay.
William Gosse
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 4, 2012 6:14 AM
Answer

William Gosse

Rank: Regular Member

Posts: 249

Join Date: July 4, 2010

Recent Posts

Thanks for the tip on setting the height.

How would I get rid of that error message.
David H Nebinger
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 4, 2012 6:17 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

Since you're working in the portlet world now, just strip everything out of the web.xml and be done with the servlet world emoticon
William Gosse
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 4, 2012 6:57 AM
Answer

William Gosse

Rank: Regular Member

Posts: 249

Join Date: July 4, 2010

Recent Posts

Cool! Its working pretty good now. Thanks again. I probably make the switch from Icefaces to Vaadin for my next project.
David H Nebinger
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 4, 2012 7:22 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11097

Join Date: September 1, 2006

Recent Posts

I'm really digging the Vaadin stuff. No more javascript coding, automagic ajax support, ... The Vaadin guys have done a lot of great stuff!
Jack Bakker
RE: Vaadin SimpleAddressBook Tutorial Example Portlet Problem
January 4, 2012 10:59 AM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 840

Join Date: January 3, 2010

Recent Posts

yup ; no question that Vaadin is my favoured portlet approach

no more client-side coding which is 'enormous' (I used to use dojotoolkit to struts ; ouch)

yeah still there is stuff like css styling where 'theme' doesn't suffice; search things that require additional ; and so on

but wow is my final word: wow