|
|
 Uwe Schaefer  Thursday, 4th of February 2010 at 07:31:40 PM
in case someone thought it was a good idea: We’re delighted to introduce a new wicket component which will allow you to easily integrate Google Waves right into your application. Please meet GoogleWavePanel ! The idea of making this component came from a recent tutorial which aimed at clarifying the use of Google’s Wave Embed [...]
 Joseph Pachod  Thursday, 28th of January 2010 at 02:33:20 PM
Wicket comes with some templating facilities. They’re often handy, especially when integrating JavaScript components. Yet, for some reasons I don’t get, these functionalities aren’t much advertised. Anyway, let’s dig in ! Basically, this templating is about some text containing variables, for example ${variable}, whose values are provided through Java code. Let’s take a simple example, [...]
 Joseph Pachod  Monday, 4th of January 2010 at 10:29:01 PM
Hi ! We were some time ago at a presentation about hibernate (at a Karlsruhe JUG event). The presenter, Michael Plöd showed us a nice Hibernate statistics page. As you can bet, we went for reusing it However, in doing so, some issues appeared, and in the end we thought the updated version could be [...]
 Uwe Schaefer  Monday, 4th of January 2010 at 09:32:40 PM
from the javadoc: Creates an image that is rendered by the Gravatar online service. Gravatars are user icons that are registered by a central server and that can be used across the internet with blogs, forums and other profile based websites. The Gravatar requires the email address for which the gravatar image needs to be [...]
 Uwe Schaefer  Wednesday, 30th of December 2009 at 09:04:41 PM
Recently, on the Wicket-User mailing list: What’s the best practice when using generics with models that take some object but return another type of object? examples: When you have a collection and need to convert it to a list for listview purposes. to which mighty Igor replied: Java | copy |? /** * Simplifies implementing wrapper models that adapt from [...]
 Joseph Pachod  Tuesday, 3rd of November 2009 at 09:30:17 PM
Me again… Well, I just wanted to speak about an issue for which I didn’t find any proper answer yet. The matter is gui testing. Currently, at work, we do proper unit test for “framework level code”. By “framework code”, I mean code being in some utilities or services projects which are put there to [...]
 Uwe Schaefer  Friday, 21st of August 2009 at 07:37:47 AM
via Wicket 1.4.1 supports Ajax file uploads | Wicket in Action. The Apache Wicket project is proud to announce the first maintenance release: Apache Wicket 1.4.1. The most notable change in this release is the transparent support for multipart form submissions via Ajax. Wicket is now smart enough to submit a form using a hidden [...]
 Uwe Schaefer  Sunday, 16th of August 2009 at 08:57:16 AM
i just sent this bit to the list [while this is] valid with about any wicket component that uses a JS lib, i´m making the jQuery case here: as it is a good practice to add functions (aka plugins) to the jQuery object, including the jQuery script more than once in a page is not [...]
 Uwe Schaefer  Sunday, 9th of August 2009 at 02:29:38 PM
Whenever you add extensive caching to your wicket resources, this might be awfully useful: Java | copy |? Application.getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl(true); which exactly does what you can get from the name
 Uwe Schaefer  Thursday, 6th of August 2009 at 07:23:53 PM
as we´re into bundling Wicket/JQuery-frontend components lately, we needed a way of automatically minimizing JavaScript on deployment. luckily, there is an excellent mojo out there : http://alchim.sourceforge.net/yuicompressor-maven-plugin the nice thing is, it does not only minify but also check and obfuscate, which turned out to be very handy! if you´re bundling javascript (or even css, [...]
 Joseph Pachod  Tuesday, 4th of August 2009 at 01:37:01 PM
Hi We had a strange issue here : we created a component opened for extension. For some reason it was working with a Label but not a MultilineLabel. Crazy isn’t it ? It turned out we declare this “opened” component like this : The user of it should just override a callback method like this [...]
 Uwe Schaefer  Sunday, 2nd of August 2009 at 10:50:12 AM
disclaimer: don´t get me wrong. 90% of the time i like generics. most of the time it only starts getting weird, when you end up using something like Java | copy |? IModel< List<EntityModel<Address<Person>>>> getAddressModels(); but hey, nothing is perfect. recently stumbled over an easy to avoid mistake you can make introducing generics to your APIs. this tale is [...]
 Joseph Pachod  Friday, 24th of July 2009 at 09:44:17 PM
Wicket is a well known serialization addict, and as such it’s quite often a topic when dealing with wicket pages and, especially, going back through the page map. In doing so, we had recently the following surprise : the DefaultMutableTreeNode, a javax.swing.tree class, is used to to the current incarnation of the tree component in [...]
 Joseph Pachod  Monday, 6th of July 2009 at 09:46:59 PM
As I’ve written on the wicket jira, setGatherExtendedBrowserInfo doesn’t play well with Ajax. For the explanation, here are Igor 2 cents on it : ajax doesnt work because probably the ajax request is redirected to that page…that page is what gathers all the browser info through javascript… . Maybe I am a bit picky, but [...]
 Uwe Schaefer  Saturday, 27th of June 2009 at 09:58:06 AM
that was fun. not that i actually liked these bonbon-buttons, but the disclaimer on their page is hilarious. having a second look, that layout-manager concept can be actually useful.
 Uwe Schaefer  Thursday, 7th of May 2009 at 07:50:41 PM
i just asked this on the Wicket user list: we have a problem here, which we think might be a common one, so i´d like to discuss. from time to time we create models (mostly LDMs) that are not actually reachable by components. (yes, you can argue that this is stupid, but it happens where [...]
 Uwe Schaefer  Monday, 4th of May 2009 at 07:15:47 AM
Wicket 1.3.6 was released. The best news for me there is, that using Guice and persistent Sessions is probably going to work now (did not check yet.)
 Uwe Schaefer  Friday, 23rd of January 2009 at 12:00:00 AM
even though Gavin King expectedly disagrees, i find this article a very useful benchmark. not that much of a surprise, but the actual numbers are more than impressive.
 Uwe Schaefer  Monday, 12th of January 2009 at 12:00:00 AM
ahhh. doesn’t wicket offer a great model of programming webpages? isn’t it too easy to do things like this? Java | copy |? add(new ListView("mylist",someList){ @Override protected void populateItem(ListItem item){ item.add(new PageLink("deleteThisEntry",new DeletePage(item.getModel()))); }};}); but wait PageLink(Page) is deprecated: Java | copy |? /** * This constructor is ideal if a Page object was passed in from a previous Page. Construct a * link to [...]
 Uwe Schaefer  Sunday, 11th of January 2009 at 12:00:00 AM
whenever you have any need for cron-like functionality within your java application, Quartz is the obvious chose for quite a long time now. i did not need much of what quartz had to offer, so i went with a home-grown implementation. why? the fear of having to integrate a good, but feature-rich framework, you really [...]
 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  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  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.
|
|