Backand - 在创建对象后添加默认值

时间:2016-03-24 04:00:23

标签: database sdk default backand

在Backand中,在我创建了一个对象并在数据库中为其提供数据后,我想回去为我忽略的字段添加默认值。在GUI中,似乎有一个字段: public static void main(String[] args) { double Xp; double Yp; double Xq; double Yq; Scanner reader = new Scanner(System.in); System.out.print("Enter x- cordinate of P : "); Xp = reader.nextDouble(); System.out.print("Enter y- cordinate of P : "); Yp = reader.nextDouble(); System.out.print("Enter x- cordinate of Q : "); Xq = reader.nextDouble(); System.out.print("Enter y- cordinate of Q : "); Yq = reader.nextDouble(); Point q = new Point("Q", Xq, Yq); Point p = new Point("P", Xp, Yp); System.out.println("Point " + p.getName() + "'s Coordinates are: " + "P(" + p.getX() + " , " + p.getY() + ")"); System.out.println("Point " + q.getName() + "'s Coordinates are: " + "Q(" + q.getX() + " , " + q.getY() + ")"); System.out.println("The Euclidean distance from p to q is :" + getEuclideanDistance(p, q)); } ,但它是灰色的,我无法弄清楚如何使用它。

The default value field is greyed out...

任何帮助都将不胜感激。

1 个答案:

答案 0 :(得分:3)

在模型中完成添加默认值。在UI中,您可以编辑字段并提供默认值,或者在JSON模型中添加此标记:

  

" defaultValue":100

字段对象如下所示:

  

"价格":{      "输入":" float",      " defaultValue":100      }