[ask] error using decimalbox in listcell

asked 2013-11-11 07:55:05 +0800

tnharisman gravatar image tnharisman
31 3

updated 2013-11-11 08:03:34 +0800

hello guys, i'm newbe here. I'm using zk and I always get an error when I want to make a decimalbox in listcell.

my code :

                <listitem self="@{each=payment }" value="@{payment }">
                        <label value="@{payment.Id }"/>

                        <decimalbox value="@{payment.price }" />


and the error : MyModel price=123.0000 cannot be converted to class java.math.BigDecimal.

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-11-11 09:49:41 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8

Can you please update What type of variable is this ?price=123.0000 As you can see Java Docs of DecimalBox Its needed BigDecimal Value may be you are passing wrong value to this column.Please tell me what is your java code otherwise convert your value in BigDecimal.

link publish delete flag offensive edit

answered 2013-11-15 04:33:45 +0800

tnharisman gravatar image tnharisman
31 3

this is my class model

public class MyModel {
private Integer Id;
private BigDecimal price= BigDecimals.ZERO;

public class Mymodel(){}

==> getter and setter


any one help me?

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2013-11-11 07:55:05 +0800

Seen: 8 times

Last updated: Nov 15 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More