Wicket SecureForm

posted by mighty Igor on the Wicket-User list: Here is a simple demonstration of how to prevent “Cross-Site Request Forgery”  Java |  copy |? /** * Form that uses a random uuid token in order to prevent nasty people from messing around (also known as cross site request forgery) ;)  * @author igor vaynberg */class SecureForm extends Form{ public SecureForm(final String id) [...]

Wicket Breadcrumbs

This template for using a Breadcrumb-like Navigation really shows the beauty of stateful pages that separate wicket from those countless template-based frameworks.  Java |  copy |? /** * Provides a list of Breadcrumbs. THIS IS ONLY A TEMPLATE. DO NOT USE UNMODIFIED * @author igor vaynberg */public abstract class BreadcrumbPage extends Page{ private List<breadcrumbpage> history = new ArrayList</breadcrumbpage><breadcrumbpage>();  public BreadcrumbPage() { add(new [...]

Wicket DropDownIdChoice

This one is all about id <-> object mapping when using DropDowns:  Java |  copy |? /** * @author igor vaynberg */public class DropDownIdChoice extends DropDownChoice{  public DropDownIdChoice(String id, IModel model, IModel choices, IChoiceRenderer renderer, Class<?> type) { super(id, model, choices, renderer); setType(type); }  @Override public String getModelValue() { final Object id = getModelObject(); if (id != null) { return getConverter(getType()).convertToString(id, [...]

Wicket ResubmitSafeForm

Another little gem: /** * Form that divides submit-events to inital and resubmit. * @author igor vaynberg */ abstract class ResubmitSafeForm extends Form { private boolean submitted; private static final long serialVersionUID = 1L; public ResubmitSafeForm(final String id) { super(id); } public ResubmitSafeForm(final String id, final IModel model) { super(id, model); } protected abstract void [...]

Wicket TextLink

Another very simple, yet incredibly helpful snippet: /** * Simple Link that renders its Model as a textual body * @author Al Maw */ abstract class TextLink extends Link { public TextLink(final String id, final IModel model) { super(id, model); } @Override protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Draw anything before [...]

Back to Resin

while this blog happily ran on glassfish v1 for quite some time now, i have to admit switching back to caucho resin. the reason for this is simple: i will be using resin at work soon again, so any detailed experience with glassfish (at least with anything <v3) will be void. i worked with resin2 [...]

Wicket Gems

it happens quite often that, while browsing the Wicket mailing list, i stumble upon gems, that i fail to find or even remember when i could use them. this really has to stop the problem is: there is of course no commen theme about these hacks, components, behaviours etc, so it is very hard to [...]

Wicket-CSSMenu

i just released a simple css-menu component for wicket as a preview.as always, your’re very welcome to send any kind of criticism.

Warp-persist

i recently wrote an article on Warp-persist , an excellent framework for integrating JPA with Guice. This article can be found here .

Things i dislike in EJB3 – Named Query Annotations

Don’t get me wrong: i like annotations, i like JPA etc etc… But there are some things, that – at least – i don’t really get. One thing is using Named Queries realized with annotations, and here is why: As you already know, named queries are a good thing. Compared to the dynamic query creation [...]

Wicket, Guice and persistent PageStore

I filed another guice related issue at Wicket’s Jira https://issues.apache.org/jira/browse/WICKET-1403 . Seems, the injection stuff needs some treatment before the ultra-fast-turnaround development environment will come true. Let’s hope for the best.

Ruby from a good perspective

Finally, one guy seeing Ruby for what it is: a ‘Scripting Language’: The middle ground is really where Ruby belongs, where it flourishes. It’s hardly a general-purpose language, so it could never replace Java and company. With that said, it’s far easier to write an incremental backup script in Ruby than in Java. And while [...]

Google charts as Wicket component

If you do not have a problem sending Data to Google (some have) and you don’t want to create fancy charts for your wicket application yourself, this component can save you a significant amount of time.Thanks to Daniel Spiewak for sharing this.

Colder deployment

If you happen to face the well known hot-deployment issue of OOMs due to a full Permanent Generation, it is likely that you use something, that keeps hold of your Classes, so that the webapp-classloader cannot be GC’d correctly. This is a wellknown but hard to find & fix issue very many configurations suffer from.The [...]

Java Reflection

I just wrote a library that (de-)serializes command objects after transmitting over network. Before executing, i’d like to (re-)inject members annotated with Guices @Inject annotation. I did some Reflection before, but never felt the needed to get hold of private fields, which is now essential.It’s not a big deal, but in case anyone could use [...]

Hibernate, HSQL, Native Queries and Booleans

I use an in-memory HSQL Database in order to test my JPA/Hibernate Application. Common thing. That explains my surprise on the following situation: I have an Entity with a boolean member: @Entity public class Foo{ @Id int id; boolean bar; [..] } Everything works as expected up to here. But then, i use a native [...]

Final methods and CGLib on JDK1.5MacOSX

I ran into a very interesting problem few days ago, where JDK5 on MacOSX threw an AbstractMethodError, while JDK6 on Windows and Linux didn’t.First obvious bet was some class that was compiled to JDK6 bytecode. Unfortunately it wasn’t that easy. While using a debugger, the problem got even more weird… The Method in question was [...]

Hibernate 90% vs 10%

I found this to be true, especially the bold statement. Unfortunately this is more a JBoss issue than a Hibernate Issue as this problem is very obvious in the SEAM ‘community’ as well. Open-source projects in general are a liability but Hibernate specifically has a serious support problem. Unless you pay the organization money you [...]

Glassfish upgrade

I just installed Glassfish V2 on this box. Not that this is very interesting itself, the configuration upgrade is. Glassfish provides an executable for that. In my case, all i had to do, to get all these applications ported, resources added a.s.o. was: bin/asupgrade -c -s domains_90/domain1/ -t domains where domains_90/domain1 was the Glassfish V1 [...]

Artifactory

Artifactory 1.2.5 was released. Find changes here .I’m a big fan of this software, even though they used AJAX much more than convienient in the interface. If you’re using maven, you should really give it a spin. Here’s why: It lets you define WHAT to get from WHICH repository.Afaik, this is a unique feature. The [...]

Bye to Bill

I have to admit, this video about Bill Gates’ last day at m$ is really funny. At least one thing, they’re good at. Thanks to Andre (who is a ms addict, by the way ) for sending over.

Rails? Sure….

Another (to me as an outside quite funny) rant about ruby on rails can be found here .If i may quote? After revitalizing myself, getting out of the Rails business (or trying), distancing myself from Mongrel, disconnecting from the Ruby community, and focusing on my business skills, I finally felt ready to figure out why [...]

Rails? yeah, right….

just found this on DIGG: I recently converted a Rails site to Wicket. Wicket really cuts down on template spaghetti code. I can honestly say that wicket’s OO approach is the right way of doing things for web application development. If anyone is interested in the site I mentioned, http://fabulously40.com/

Wicket 1.3

In case you did not notice it yet: Wicket 1.3 was released today

Another crappy book

I came to read “JUnit Profi-Tipps” yesterday. This book from ‘Entwickler.Press’ is about unit-testing with JUnit, just like many others are. But there is something outstanding to it: The more you read, the harder it gets to keep reading. Don’t get me wrong: i often read books i disagree with. It is a good educating [...]

Q4E very promising

Frequent readers know, that i use maven2 and eclipse and i am very happy with it. There is a an eclipse plugin for maven that generates classpaths from the dependency graph, as well as a plugin for eclipse, that makes adding a dependency to the pom very easy.One flaw existed for me though, that made [...]

Eclipse at the speed of light

If you’re a little bit like me, you’ve been fooling around with VM Startup parameters for quite some time now in order to get your eclipse running as fast as possible. Maybe you’ve even changed VMs to jrockit and so on to make the best of your programming experience.At least after switching to quad-core processing [...]

CI Anti-Patterns

Here is good article about Anti-Patterns concerning Continous Integration. While most of the metioned woes are quite obvious, it is a fine article explaining why it hurts so much to, for instance, check-in too infrequently.

Guice AutoBind

Please note, that i released just another piece of free software: Guice-AutoBind.It is used to complement guices @ImplementedBy annotation in order to easily bulk-bind whole implementation packages. More…

TagCloud

Please note, that there is a TagCloud component for Wicket in Beta stage. Please send Feedback if you use it.

Screen-Designer’s goodies

Once, the was a little desktop program called ruler. A friend of mine (Screendesigner of course) loved it. Now here is a modern (and much better) Firefox Plugin, that can be used for the same purpose. MeasureIt

This book is crap

Well, not actually crap, but utterly useless if you have more than 48hours of experience in the JavaEE field as well as 30min experience with glassfish after installing. It is very much about begining JavaEE and very little – beyond the non-obvious – about glassfish. Do not buy this book or you risk being bored [...]

If in doubt, leave it out.

This is a real good talk by Josh Bloch (Google) about API design. This is kind of an eye-opener because this talk can adjust how you design APIs at any (even the class-) level by encouraging you to take the perspective of the classes/components/librarys user. It’s a good talk, and fun too How To Design [...]

Lightbox integration with Wicket 1.1-beta

I just put Lightbox for Wicket 1.1-beta online. Though this is a preview/beta release, i’d love to get some feedback. New ‘features’ (or bugfixes if you consider a lack thereof a bug ) are: basic IModel support AJAX-supportand few fixes. Grab it here

Being aware of TODOs

This is not about issuetracking or this kind of application. I’m talking about //TODO or //FIXME Tags in ones code. Are you really aware of how many places in your code with these text still in place? If you’re developing feature-driven, you most certainly type some quick lines of code, even though, you know for [...]