Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Position of the required dot in AbsoluteLayout textfield
I have placed my textfield in a AbsoluteLayout. Because of some strange Layout wishes of my client. So now I set some Textfield to required mode.
The red dot which indicates that this field is reuqired appear directly besides the caption text. But unfortunately I got none. So I have a red dot (or a star)
above my textfield, which is irritating the whole design. My question is, has anybody figured out a way to place the little dot elsewhere?
i already tried to setStyleName() with a css style like that:
I am afraid that doesn’t change a this. ;(
So as it happens i got the same problem with the error indicator.
It means that caption and errorindicator position isn't changeable ? Seems odd ... ;(
thanks in advance
In Vaadin component client side implementations can decide who manages caption and error indicator. Most of the components delegate this responsibility to layouts so it is the layout who renders the caption. Where the caption is rendered depends on the layout implementation. There are not any layouts where you could configure the position from server-side. It may be possible to position it with css and I tried a little, but unfortunately I don't possess such css skills.
If this is just about the required indicator, why not hide them altogether with CSS (e.g. display:none) and then add any you might want to have as Labels containing "*" with suitable style name (the one used by the normal required indicator).