package lt.inventi.wicket.component.breadcrumb;

import org.apache.wicket.model.IModel;

public final class BreadcrumbTitle {

    private final IModel<String> title;
    private final boolean shouldEscapeTitle;

    public BreadcrumbTitle(IModel<String> title) {
        this(title, true);
    }

    public BreadcrumbTitle(IModel<String> title, boolean shouldEscapeTitle) {
        this.title = title;
        this.shouldEscapeTitle = shouldEscapeTitle;
    }

    public IModel<String> getTitle() {
        return title;
    }

    public boolean shouldEscapeTitle() {
        return shouldEscapeTitle;
    }

    @Override
    public String toString() {
        return (shouldEscapeTitle ? "Escaped" : "Unescaped") + " title<" + title + ">";
    }
}

@@ -42,16 +42,46 @@
 crumb;%0A%0A
+import java.io.Serializable;%0A%0A
 import o
@@ -147,16 +147,40 @@
 mbTitle 
+implements Serializable 
 %7B%0A%0A    p

Make breadcrumb title serializable