>From the javadocs:
* The model property is used to set the 'value' attribute. It will
* thus be the label of the button that shows up for end users. If you want the
* attribute to keep it's markup attribute value, don't provide a model, or let
* it return an empty string.
If you provide a model object of a type that is not coupled to any
specific converter, the object's toString method will be called. What
you can do is override toString in that object, or - better - let your
model return the value as a proper string.
Eelco
On 6/29/06, cowwoc <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'd like to pass in a non-String model into a Button so I can use it
> for onSubmit() but then the Button text ends up being crap (hashcode of
> the model object). I can workaround this issue using an
> AttributeModifier("value") but this seems like a hack to me that might
> break in future versions. Shouldn't there be a formal hook for doing
> this in Button? I mean, I could always override getModelAsObjectString()
> but there is no guarantee that the code won't use getModel().toString()
> in the future.
>
> Gili
>
>
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
>
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user