Wicket StockQuote component
On The Serverside.com there is a JSF Custom Component article, and probably you came from there expecting the full explanation of my StockQuote example component. It is currently 15:00 (3pm) so I have to do some business before I have time for a full disclosure.
In the mean time, you may want to check out the CVS code:
Via viewcvs, you can see the files here. The component is called ‘StockQuoteLabel’, and is defined in the file StockQuoteLabel.java.
The web page files are StockQuote.html and StockQuote.java.
August 20th, 2005 at 10:17 am
Here’s another approach for this particular problem that’s nicer since we already have a label superclass to draw on:
public class StockQuoteLabel extends Label
{
public StockQuoteLabel(String id, final String symbol)
{
super(id, new AbstractReadOnlyModel()
{
public Object getObject(Component component)
{
return soapThingy(symbol);
}
}
}
}
I haven’t tested this, but it should work fine.