Giter VIP home page Giter VIP logo

wiquery-qrcode's Introduction

WiQuery QrCodeContainer

Latest releases (to be found on oss.sonatype.org): 0.1 (2011-09-20)

QrCodeContainer creates a QR-code image. Just add a div and add the content that should be encoded to the QR-code. Most of the times I think you'd like a web address here.

You can also give the wicket Page instead of text. You'll get the link generated.

The JavaScript is NOT mine

Have a look at: https://github.com/jeromeetienne/jquery-qrcode

What I did is make sure there is a Wicket WebMarkupContainer which now has this jQuery. In the pom maven minify plugin is used to pack these javascript files into one file and also minify it. So in this package you will not see the javascript files which are downloaded from the site named above.

get jar (not always completely up-to-date)

Maven Dependency

Ad this to your dependencies in your pom.xml:

<dependency>
	<groupId>nl.topicus</groupId>
	<artifactId>wqrcode</artifactId>
	<packaging>jar</packaging>
	<version>0.1</version>
</dependency>

Have the following repository added: http://oss.sonatype.org/content/groups/staging

How to Use It

There are three constructors at the moment, which will invert each other:

  • id

    the wicket:id

  • text or wicket Page

    what should your QR code reader display? This can be just normal text or a web address, your phone will recognise that as a link

  • size (optional)

    What size do you want the QR code to be?

  • typeNumber (optional)

    This goes from 1 to 10, the bigger the more caracters the QR can contain. But the exact way is a little vague, I'd say just leave it and stay under +/- 120 caracters

    public QrCodeImageContainer(String id, String text[[, int size], int typeNumber]) { ... }

    public QrCodeImageContainer(String id, Page page[[, int size], int typeNumber]) { ... }

In the markup you will need an element which can set its outputMarkupId and thus paints its markup; whether it's empty or not. A normal div or a span is applicable, a wicket:container is not.

So if you have a div: <div wicket:id="qr"></div> and you have java code add(new QrCodeImageContainer("qr", "http://github.com/JeroenvDijk/wiquery-qrcode")); you will see the following image:

That's it!

If you hit bugs, fill issues on github.

Feel free to fork, modify and have fun with it :)

wiquery-qrcode's People

Contributors

hielkehoeve avatar

Watchers

 avatar

wiquery-qrcode's Issues

change nl.topicus to com.jeroenvdijk

well... just because I have to... I quit Topicus B.V. and since it's my code, written in my time... I want to keep it myself...

and so the project will go to a new release.
And If I have to, then pls also update the JS if needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.