Skip to content

TextArea Input Block

Socheat KHAUV edited this page Dec 3, 2017 · 7 revisions

TextArea


HTML Code

<div wicket:id="{logic}Block" class="form-group">
    <wicket:container wicket:id="{logic}IContainer">
        <label wicket:for="{logic}Field">
             <wicket:message key="{logic}Field">{{logic}Field}</wicket:message>
        </label>
        <textarea wicket:id="{logic}Field" rows="5" class="form-control"></textarea>
        <span wicket:id="{logic}Feedback" class="help-block"></span>
    </wicket:container>
</div>

Java Code

protected WebMarkupBlock {logic}Block;
protected WebMarkupContainer {logic}IContainer;
protected String {logic}Value;
protected TextArea<String> {logic}Field;
protected TextFeedbackPanel {logic}Feedback;

protected void init{Logic}Block() {
    this.{logic}Block = new WebMarkupBlock("{logic}Block", Size.Twelve_12);
    this.form.add(this.{logic}Block);
    this.{logic}IContainer = new WebMarkupContainer("{logic}IContainer");
    this.{logic}Block.add(this.{logic}IContainer);
    this.{logic}Field = new TextArea<>("{logic}Field", new PropertyModel<>(this, "{logic}Value"));
    this.{logic}IContainer.add(this.{logic}Field);
    this.{logic}Feedback = new TextFeedbackPanel("{logic}Feedback", this.{logic}Field);
    this.{logic}IContainer.add(this.{logic}Feedback);
}

Clone this wiki locally