Maury
(Maury Hammel)
February 7, 2010, 7:12pm
1
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
Maury
(Maury Hammel)
February 9, 2010, 1:44am
2
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()”
Philip
(Philip Healy)
August 25, 2010, 3:59pm
4
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):
[font=Courier New]
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();
}
};
[/font]
Regards,
Philip