Jhonatan1
(Jhonatan Morais)
September 15, 2014, 5:07pm
1
hello,
i am trying use JAAS with vaadin, but for this i must create a form with a textfield with name “j_username” and a textfield with name like “j_password”. but can’t find a way to change the textfield attribute name. this is possible in the vaadin?
so hope. bye
Jhonatan1
(Jhonatan Morais)
September 16, 2014, 5:57pm
3
Hi Agata,
First, Thankyou for you help.
I try use this add-on, but i made anything wrong. the attributes not are changing.
look my example test (in the attachments section).
Do you have more ideias?
final static String LABEL_NAME = "Label_username";
final static String FIELD_NAME = "j_username";
public LoginView() {
setSizeFull();
setSpacing(true);
Attribute LabelName = new Attribute("for","LABEL_NAME");
Attribute fieldName = new Attribute("name","FIELD_NAME");
Label label = new Label("Enter your information below to log in.");
TextField username = new TextField("Username");
label.setId(LABEL_NAME);
LabelName.extend(label);
username.setId(FIELD_NAME);
fieldName.extend(username);
TextField password = new TextField("Password");
addComponent(label);
addComponent(username);
addComponent(password);
addComponent(loginButton());
}