Can´t you just use a nested model like
public class ByteBooleanModel implements IModel<Boolean> {
private static final long serialVersionUID = 1L;
private IModel<Byte> model;
public ByteBooleanModel(IModel<Byte> model) {
this.model = model;
}
/* (non-Javadoc)
* @see org.apache.wicket.model.IModel#getObject()
*/
@Override
public Boolean getObject() {
if(model.getObject()== null)
return null;
if(model.getObject().equals(1))
return Boolean.TRUE;
return Boolean.FALSE;
}
/* (non-Javadoc)
* @see org.apache.wicket.model.IModel#setObject(java.lang.Object)
*/
@Override
public void setObject(Boolean object) {
if(object == null)
this.model.setObject(null);
if(object)
this.model.setObject((byte)1);
else
this.model.setObject((byte)0);
}
/* (non-Javadoc)
* @see org.apache.wicket.model.IDetachable#detach()
*/
@Override
public void detach() {
this.model.detach();
}
}
to allow value be stored as a byte?
Ernesto
On Tue, Jan 25, 2011 at 2:02 PM, MattyDE <[email protected]> wrote:
>
> Everyone know what i want.... Byte 0 = False Byte 1 = True.
>
> But unfornately "getConverter" is final in CheckBox so i cant place my own
> converter there.
>
> Any ideas?
>
> Thanks :)
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Use-Byte-vor-CheckBox-instead-of-Boolean-tp3236065p3236065.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]