Example > Standard, smart linking of column data


Use of automatically generated hyperlinks (the standard way):
    add(new SimpleListView("rows", data)
    {
        public void populateItem(final ListItem listItem)
        {
            final ListObject value = (ListObject) listItem.getModelObject();

            listItem.add(new Label("id", Integer.toString(value.getId())));
            listItem.add(new SmartLinkLabel("email", value.getEmail()));
            listItem.add(new SmartLinkLabel("url", value.getUrl()));
        }
    });
ID Email Url
Test ID Test EMail Test url
Test ID Test Email Test Url

Use of automatically generated hyperlinks (using SimpleListView's newLabel()):
    add(new SimpleListView("rows", data)
    {
        protected Component newLabel(String id)
        {
            return new SmartLinkLabel(id);
        }
    });
ID Email Url
Test ID Test EMail Test url
Test ID Test Email Test Url