Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

JPAContainer FieldFactory properties caption

Paweł Rzeczewski
10 years ago Jan 25, 2012 6:38pm

Hi,

how do you change caption of JPAContainer FieldFactory fields?

As I recall FieldFactory uses DefaultFieldFactory.createCaptionByPropertyId for that: FieldFactory - source code.

Thanks in advance,
Etam.

Last updated on Jan, 25th 2012
Paweł Rzeczewski
10 years ago Jan 26, 2012 11:16am

I think you should surround all generated fields with protected Field configureBasicFields(Field field) method for clients to extend it.

Matti Tahvonen
10 years ago Jan 26, 2012 11:27am

Hi,

That is an option, but maybe better would be a separate configureFieldCaption method that users could override.

Currently you could override the createField method (or actually both of them) and configure captions there.

cheers,
matti

Paweł Rzeczewski
10 years ago Jan 26, 2012 7:11pm