2009/11/18 Jeremy Thomerson jer...@wickettraining.com
Well, you can't make a subclass a different parameterized type than it's
parent. It won't work.
You should be using an Integer model for this and using a converter rather
than a nested model to make it a string. That's what converters
http://cwiki.apache.org/WICKET/using-custom-converters.html
--
Jeremy Thomerson
http://www.wickettraining.com
On Wed, Nov 18, 2009 at 10:09 AM, smallufo small...@gmail.com wrote:
2009/11/18 Jeremy Thomerson jer...@wickettraining.com
Well, you can't make a subclass a different
2009/11/19 Jeremy Thomerson jer...@wickettraining.com
http://cwiki.apache.org/WICKET/using-custom-converters.html
Thanks a lot , this solves my problem...
But , there is a more complicated situation :
Old code : (works in 1.3)
ListView poem = new ListView(poem , new PropertyModel(model ,
ListView needs a model that has ListV, so do this:
ListViewString poems = new ListViewString(poems, new
AbstractReadOnlyModelListString() {
public ListString getObject() {
// here you put the code that takes the string and tokenizes it
}
}) {
@Override
protected void
Hi all
I've already converted most of my code from 1.3 to 1.4 , except this
situation :
Label intToStringLabel = new Label(intToString , new
PropertyModel(this , integer)
{
@Override
public Object getObject()
{
int value = ((Integer)
Well, you can't make a subclass a different parameterized type than it's
parent. It won't work.
You should be using an Integer model for this and using a converter rather
than a nested model to make it a string. That's what converters are for.
--
Jeremy Thomerson
http://www.wickettraining.com
chain the two models:
class numstringmodel extends abstractreadonlymodelstring {
private final imodelinteger intmodel;
public numstringmodel(imodelinteger intmodel) { this.intmodel=intmodel; }
public string getobject() {
int val=intmodel.getobject();
switch (val)