New Add-on: QRCode addon

I’ve just recently published a new addon which been on my mind for some time now called QRCode. It allows you to easily add QR encoded images to your Vaadin applications.

What are QR encoded images?
QR-encoded images is a fun way of sharing information using encoded images. Currently they can be found around the web, in magazines and in the streets and they usually look something like this:

The information you can encode in an QRCode can be text, URL or other data and it can be read
by most barcode readers and mobile phones.

Here are some links regarding the addon:

Hope you enjoy :slight_smile:

Released version 1.1.0.

This release features the following enhancements:

  • Fixes issues with the image not loading when using Vaadin 6.5.5 or later.
  • Adds possibility to customize the colors of the QR code by using the newly added methods setPrimaryColor() and setSecondaryColor().

Hi John:

Can te QR code be resized?

regards,

Hugo

Yes, resizing is fully possible.

Just use standard setWidth() / setHeight() methods to resize.

Thanks for your answer John…

Those methods were not working for me but I already fixed that…

That is good to hear :slight_smile:

However I would be interested in what did not work with those methods so I can fix it in the addon. Do you have some sample code where it does not work?

It was just a dumb mistake…I was resizing the layout containing the QR code, not the code itself…

regards,

Hugo

Hi,
Thanks for this addon, very nice.

A Question, I have to save the QRCode in the Database, so is there any posibility to grab the ImageSource from the AddOn?

Thanks!

Looks cool, great one. :smiley:

Great!

When I tried to use QRCode in V7.1, I am getting the following message:
Jul 6, 2013 5:45:31 PM com.vaadin.server.communication.ServerRpcHandler parseServerRpcInvocation
WARNING: Ignoring RPC call to fi.jasoft.qrcode.client.ui.SizeListener.sizeChanged in connector fi.jasoft.qrcode.QRCode(10) as no RPC implementation is regsitered

OK, this is due to a bug in the constructor that takes caption and value as the parameters. registerRpc method is not being called from this constructor.

Is it possible that the widgetset is not compiled with the actual vaadin control panel? I tried out QRCode in V7.1 and Liferay 6.2. Unfortunately it only complains and does not appear:

Widgetset ‘com.vaadin.DefaultWidgetSet’ does not contain implementation for fi.jasoft.qrcode.QRCode. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.

By default Liferay only ships with the Vaadin default widgetset.

So you need to recompile the widgetset with the QRCode addon included and replace the widgetset files in liferay. The widgetset files are located under
/webapps/ROOT/html/VAADIN/widgetsets
.

Alternatively, to help with replacing the correct widgetset there is an addon
https://vaadin.com/directory#addon/vaadin-control-panel-for-liferay:vaadin
you can use.

The control panel add-on mentioned by John is for Vaadin 6.

The Vaadin 7 version can be found
on GitHub
.

Yes, i have the new ControlPanel running.

So should it be enough to throw the addon jar into the lib-folder, and let control panel complile with addon activated?
If yes, something goes wrong although addon is selected.

edit: the qr widget set does not appear in the widgetwet folder after recompiling in control panel.

Or do i also have to do some widgetset compiling during build? Up to now i succeded without (e.g. the old ipc which had to be widgetset compiled).

Yes, it should work by just dropping the addon jar in liferay’s WEB-INF/lib folder according to the
readme
.

Try to see if you can spot any problems in the log when you try compile the widgetset. Usually if there are problems with building the widgetset there are some erros.

Well, absolutely nothing in the log which would be helpful. Only

thats all…
Could it have to to with the different widget set liferay uses?

Got it! Something must have hung up in my liferay environment, set up new one from scratch, addon ran immediately.
Very nice and useful tool, thank You!

Great you figured it out! Liferay can be mysterious at times :smiley: