You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@empire-db.apache.org by Jan Glaubitz <ja...@glaubitz.org> on 2018/03/22 09:19:08 UTC

Problem using empire-jsf SelectInputControl with Enum and CHAR

Hi all,

I’m using the empire-jsf SelectInputControl with a column thats defined as CHAR(2). Recently I added a new option that has only one char, I can set the value, but its never rendered in read-only mode.

I figured out that the length of the String in java, which comes from the postgres jdbc driver is always 2. So my new option „B“ is really „B „. This is really strange, when I do "SELECT COLUMN, LENGTH(COLUMN)“ postgres says its 1.

Can anyone test if that is a jdbc-specific thing and is the same on e. g. Oracle?

I worked around that problem for now overriding SelectInputControl.formatValue and trimming the value. But maybe there should be a general solution?

- jan