English 中文(简体)
CRUD模块不支持日历类型?
原标题:CRUD module does not support Calendar type?

CRUD模块非常冷却,但小问题。

I am using Calendar types in model classes, and they do not appear in CRUD pages. Once their types changed to Date from Calendar , they appear.

看来,CRUD不支持日历类型。

Question. How can I use Calendar type in model classes for CRUD module?

你可能只是建议我使用日期而不是日历。 但是,这并不适用于我的项目,因为在我的项目中,某些情况下,日期类型并不奏效。

谢谢。

FYI, one of the model classes

@Entity
@Table(name = "brands")
public class Brand extends Model {
@Column
public String name;

@Column
public Calendar modified_at;

@Column
public Calendar created_at;

...
}

只有名称领域出现在CRUD网页上。 但是,经过修改的“at”和制造的“at”也出现在这些类型改为日期之后。

最佳回答

CRUD是一个基本单元,它缺乏对几件事情的支持(例如,日期只显示干/毫米/贵重部分,而不是小时或分钟)。

You may need to customize it. The code is available here as well as in the Play! distribution you have, in the "modules" folder. Just modify the content to suit you needs and deploy it as a local module in your dependencies file.

问题回答

暂无回答




相关问题
Manage dependencies in a Play Framework app

I m trying to figure out the proper tools for managing dependencies between JARs. I have a Play Framework app, which imports a JAR (based on another project I m writing). This JAR imports other JARs, ...

Deploy Play! application as executable jar

Is it possible to bundle Play! web application to executable jar instead of war? Could it just be run on localhost at some port just like when using "play run" command? (without the need of installing ...

JPA: Store fileAttachment into the database

I would like to know if there is any way I can store a fileAttachment directly into the database with JPA. I have an attribute: public fileAttachement logo; I have tried to change it to: @Lob ...

Java Web Development and Automatic Feedback

I ve been having a (ironic) play around with the Play Framework and have been impressed thus far. I was just curious as to what other Java frameworks are out there that have a similar feature to Play ...

Java web frameworks

I was looking around to see if there is an equivalent to django/RoR in java. I found: Play Framework Grails Does anyone have ever tried those frameworks, or do you know any other? Are they faster ...

热门标签