how i can edit the name attribute in a TextField component?

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

Try
Attributes add-on

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());
    }

16478.png