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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
LoginForm questions
Hello,all.
I'm new to Vaadin and web applications in general, but I like what I've been able to do with the framework so far. Very nice.
I have a few questions about the LoginForm class:
- When I dispaly the form, it has the labels above the text areas. Is there a way to get it to display the labels to the left of the text areas?
- There is no spacing between the bottom of the password text area and the button. Is there a way to get it to add a bit of space there?
- Is there a way to provide alternate text for the labels -- e.g. for internationalization, or is that built in somehow?
Thanks, Maury
Well, I think I've figured out what the answer to my questions is. I believe all three can be answered with the phrase "override getLoginHTML()" :)
If you are looking for a quick and dirty way to add some vertical spacing to the standard LoginForm then the following does the trick (using Vaadin 6.3.4):
LoginForm loginForm = new LoginForm() {
@Override
public byte[] getLoginHTML() {
byte[] htmlBytes = super.getLoginHTML();
String htmlString = new String(htmlBytes);
htmlString = htmlString.replace(
"<input class='v-textfield' style='display:block;",
"<input class='v-textfield' style='margin-bottom:10px; display:block;");
return htmlString.getBytes();
}
};
Regards,
Philip