package org.apache.wicket.examples.compref;
import org.apache.wicket.examples.WicketExamplePage;
import org.apache.wicket.markup.html.basic.MultiLineLabel;
@link
@author
public class MultiLineLabelPage extends WicketExamplePage
{
public MultiLineLabelPage()
{
String text = "\nThis is a line.\n" + "And this is another line.\n" + "End of lines.\n";
add(new MultiLineLabel("multiLineLabel", text));
}
@Override
protected void explain()
{
String html = "<span wicket:id=\"multiLineLabel\" class=\"mark\">this text will be replaced</span>";
String code = " public MultiLineLabelPage() {\n"
+ " String text =\n"
+ " \"\\nThis is a line.\\n\" +\n"
+ " \"And this is another line.\\n\" +\n"
+ " \"End of lines.\\n\";\n"
+ "\n"
+ " add(new MultiLineLabel(\"multiLineLabel\", text));\n"
+ " }";
add(new ExplainPanel(html, code));
}
}