Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to concatenate 2 textboxes in wicket?
    primarykey
    data
    text
    <p>So i got these 2 text boxes and I'm trying to concatenate them together and show the result in label. I found an example and did it like in the example but something is wrong. So maybe some one can see what I am doing wrong, because i have just started and don't understand how to do it properly. </p> <pre><code>public class HomePage extends WebPage { private String fNumber="Big"; private String sNumber=" text!"; private String sResult=fNumber+sNumber; public HomePage() { PropertyModel&lt;String&gt; firstNumber = new PropertyModel&lt;String&gt;(this, "fNumber"); PropertyModel&lt;String&gt; secondNumber = new PropertyModel&lt;String&gt;(this, "sNumber"); add(new Label("message", "HelloWorld!")); add(new Label("result", sResult)); Form&lt;?&gt; form = new Form("form"); form.add(new TextField&lt;String&gt;("firstNumber", firstNumber)); form.add(new TextField&lt;String&gt;("secondNumber", secondNumber)); add(form); } } </code></pre> <p>soo i have made this </p> <p>` add(new Label("message", "HelloWorld!"));</p> <pre><code> add(new Label("result", new Model(numb.getsResult()))); Form&lt;?&gt; form = new Form("form") ; form.add(new TextField&lt;String&gt;("firstNumber", new Model(numb.setfNumber()))); form.add(new TextField&lt;String&gt;("secondNumber",new Model(numb.setsNumber()))); add(form);` </code></pre> <p>and i have a class that has 3 string fields and getters and setters and sii that much i have understood last comment explained some things maybe some one know how to fix this.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload