Customize the Login Dialog

The standard login dialog looks like this:

It's not super fancy but solves the login problem. If you need a styled login dialog, simply create your own or extend the existing class. In order to use a custom login dialog, you have to use the corporation style. It's not possible to use a custom login dialog with standard application style.
public class CustomLogin extends WebLogin
    private UIIcon icoLogo;
    protected void createLogin()
        Label lblTitle = getTitleLabel();
        lblTitle.setText(((ITranslator)getApplication()).translate("Members Portal"));
        Label lblInfo = getInfoLabel();
        AbstractLayout layout = (AbstractLayout)lblTitle.getParent();
        icoLogo = new UIIcon("/com/sibvisions/apps/portal/images/logo.jpg");
        Component logo = (Component)icoLogo.getResource();
        layout.setComponentAlignment(logo, Alignment.MIDDLE_LEFT);

This simple code extends the standard WebLogin class. It removes the info label and adds a centered icon.

In order to use the custom login dialog, you have to configure the new class as your preferred login class. Add following parameter to the web.xml of your application:


The result will look like this dialog:

It's very easy to change the layout with source code but it's also possible to use css for customization:

We changed following styles in an external css file:

.jvx .loginwindow .v-label.welcome 
    font-size: 23px;
    color: #888888;
    width: 100%;
    text-align: center;
.jvx .loginwindow 
    display: none;
    visibility: hidden;
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information