|
|
 Uwe Schaefer  Saturday, 10th of January 2009 at 12:00:00 AM
Did you ever try to create an instance of a class with a protected constructor from outside its package? I ran into this need when working with JPA-Entities of which i wanted to know initial field values. (yeah, i know. kind of black magic…) It is actually easier, than getting protected Fields: Java | copy |? public static <t> [...]
 Uwe Schaefer  Thursday, 8th of January 2009 at 12:00:00 AM
Another Wicket Gem. Obvious but helpful. Java | copy |? import org.apache.wicket.PageParameters;import org.apache.wicket.markup.ComponentTag;import org.apache.wicket.markup.html.link.BookmarkablePageLink;import org.apache.wicket.model.IModel; /*** @author Thijs Vonk**/public class AnchoredBookmarkablePageLink extends BookmarkablePageLink { private static final long serialVersionUID = 1L; private IModel stringAnchor; public AnchoredBookmarkablePageLink(String id, Class pageClass, IModel anchor) { super(id, pageClass); this.stringAnchor = anchor; } public AnchoredBookmarkablePageLink(String id, Class pageClass, PageParameters params, IModel anchor) { super(id, pageClass, [...]
 Uwe Schaefer  Wednesday, 7th of January 2009 at 12:00:00 AM
Really weird, what Heinz Kabutz digs out of the java language Read this newsletter to find out, how System.otu.println(“foo”) can throw a SQLException His statement on checked and unchecked seems rather incomplete, though: My personal opinion is that checked exceptions are not as useful as we would hope. For example, the class java.io.IOException has 74 [...]
 Uwe Schaefer  Tuesday, 6th of January 2009 at 12:00:00 AM
From an Email conversation this evening: what do you think about it? For a while, I was “all flame” about Checked exceptions, but then I read about their limitations (which are why they aren’t included in C#, more about it there : http://blogs.msdn.com/csharpfaq/archive/2004/03/12/88421.aspx ) and since I wonder what’s the best solution. i was all [...]
 Uwe Schaefer  Sunday, 4th of January 2009 at 12:00:00 AM
As a happy Q4E User, i did not waste too much time lately on keeping an eye on the other maven-eclipse-integration projects. Now i stumbled upon this wiki page showing a very detailed feature comparison matrix between the usual suspects. One thing that stroke me is, that m2eclipse is proposed at eclipse.org as well as [...]
 Uwe Schaefer  Saturday, 3rd of January 2009 at 12:00:00 AM
The article is about Tapestry 4.1, not v5 as mentioned in the title. Some say, Tapestry can compare with Wicket. And from a certain perspective, they’re obviously right. In case you have not made up your mind yet, this developerworks article might help you. In there is a thorough side-by-side comparison of tapestry against wicket. [...]
 Uwe Schaefer  Wednesday, 31st of December 2008 at 12:00:00 AM
Here is an interesting interview with three of the wicket committers (or, should i say legends, personal heros …) about how Wicket hides the complexity of AJAX-related JavaScript coding from the productive programmer: Learning JavaScript is not hard, what is hard is learning FireFox JavaScript, IE6 JavaScript, IE7 JavaScript, Opera JavaScript, WebKit JavaScript, etc. The [...]
 Uwe Schaefer  Tuesday, 30th of December 2008 at 12:00:00 AM
if there is anyone suffering from https://issues.apache.org/jira/browse/WICKET-1403 , i added a quick hack to make it possible to restart the server while persisting the application’s state. not a final solution, but it works for now and makes the development cycle much faster (for me) The Problem is, that java.lang.reflect.Type is not Serializable right now. The [...]
 Uwe Schaefer  Monday, 29th of December 2008 at 12:00:00 AM
thinking twice, ajax-indicators are not at all eye-candy, but useful from an usablity perspective. Java | copy |? /** * Adds an AJAX-Indicator to DropDownChoice * @author Eyal Golan */class DropDownChoiceWithAjaxIndicator extends DropDownChoice implements IAjaxIndicatorAware{ private static final long serialVersionUID = 1365817942506006686L; private final WicketAjaxIndicatorAppender indicatorAppender = new WicketAjaxIndicatorAppender(); public DropDownChoiceWithAjaxIndicator(final String id, final IModel choices, final IChoiceRenderer renderer, final MarkupContainer markupContainer) [...]
 Uwe Schaefer  Sunday, 28th of December 2008 at 12:00:00 AM
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) [...]
 Uwe Schaefer  Saturday, 27th of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Friday, 26th of December 2008 at 12:00:00 AM
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, [...]
 Uwe Schaefer  Thursday, 25th of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Wednesday, 24th of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Tuesday, 23rd of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Monday, 22nd of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Sunday, 21st of December 2008 at 12:00:00 AM
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.
 Uwe Schaefer  Saturday, 20th of December 2008 at 12:00:00 AM
i recently wrote an article on Warp-persist , an excellent framework for integrating JPA with Guice. This article can be found here .
 Uwe Schaefer  Friday, 19th of December 2008 at 12:00:00 AM
The lovely Q4E-Eclipse plugin has been updated to version 0.5. New and noteworthy can be found here . You can use this update site to install it. Particularly the new “Analyze Dependencies” View is awesome!
 Uwe Schaefer  Thursday, 18th of December 2008 at 12:00:00 AM
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.
 Uwe Schaefer  Monday, 15th of December 2008 at 12:00:00 AM
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.
 Uwe Schaefer  Sunday, 14th of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Saturday, 13th of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Monday, 8th of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Friday, 5th of December 2008 at 12:00:00 AM
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/
 Uwe Schaefer  Thursday, 4th of December 2008 at 12:00:00 AM
In case you did not notice it yet: Wicket 1.3 was released today
 Uwe Schaefer  Tuesday, 2nd of December 2008 at 12:00:00 AM
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 [...]
 Uwe Schaefer  Saturday, 29th of November 2008 at 12:00:00 AM
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…
 Uwe Schaefer  Friday, 28th of November 2008 at 12:00:00 AM
Please note, that there is a TagCloud component for Wicket in Beta stage. Please send Feedback if you use it.
 Uwe Schaefer  Monday, 24th of November 2008 at 12:00:00 AM
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
 Uwe Schaefer  Friday, 21st of November 2008 at 12:00:00 AM
Here’s a pit i fell into few days ago: I am a happy maven2 user. I use aggregator projects to manage the different parts of a project in different sub-projects, and provide a single-entry to building all of them. Imagine project X with modules x-services, x-webapp, x-ejb and x-ear with welldefined dependencies among each other. [...]
 Uwe Schaefer  Tuesday, 18th of November 2008 at 12:00:00 AM
i fell over a subtle bug in Wicket-IOC, that causes RuntimeException when Wicket-Guice is used together with Guice-bound-Interceptors while Injecting non-Interface Classes. While the above usecase is a terribly rare one, this problem shows that it is not always a good idea to copy a required lib to another package in order to have ‘no [...]
 Uwe Schaefer  Monday, 17th of November 2008 at 12:00:00 AM
From now on, i’m going to release a few little spare-time-software projects. The first is a simple Wicket-Component written to integrate the famous Lightbox2 JavaScript into Wicket Components/Pages. It can be found here
 Uwe Schaefer  Saturday, 15th of November 2008 at 12:00:00 AM
When it comes to profiling applications, one of the most important feature to me is the ability to focus on what is important. The problem with Memdumps and Thread-traces is, that you’ll immediately face much more information you can handle, and the tool’s ability of helping you on your way drilling down through the data [...]
 Uwe Schaefer  Friday, 14th of November 2008 at 12:00:00 AM
Did you read “Effective Java”? If you didn’t, you should: it is one of the greatest book about java i have read so far. The only problem with this book is that – over time – you tend to forget some of the invaluable advices, you get from it.At least, this happened to me: I [...]
|
|