title: How can I define writable computed observables in Dukescript?
body: <p>I'm trying to replicate <a href="https://knockoutjs.com/documentation/computed-writable.html" rel="nofollow noreferrer">the example 1</a> on Dukescript, the example consists on modifying the <strong>generated full name</strong> and automatically modify the <strong>first name</strong> and <strong>last name</strong> fields on the data model.</p>
  
  <p>This is my code so far</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div&gt;First name: &lt;span data-bind="text: firstName, valueUpdate: input"&gt;&lt;/span&gt;&lt;/div&gt;
  &lt;div&gt;Last name: &lt;span data-bind="text: lastName, valueUpdate: input"&gt;&lt;/span&gt;&lt;/div&gt;
  &lt;div class="heading"&gt;Hello, &lt;input data-bind="textInput: fullName, valueUpdate: afterkeydown,event: { keyup: fullName() }
  "/&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>package org.javapro.dukescript;
  
  import net.java.html.json.Model;
  import net.java.html.json.ComputedProperty;
  import net.java.html.json.Property;
  import net.java.html.json.Function;
  import java.util.regex.Pattern;
  
  
  @Model (targetId="",className = "WritableComputed", properties = {
      @Property (name = "firstName", type=String.class)
     ,@Property (name = "lastName", type=String.class)
  })
  class MyClass {
  
    @ComputedProperty static String fullName(String firstName, String lastName) {
      return firstName + " " + lastName;
    }
  
    @Function
    static void fullName(WritableComputed model, String value) {
      int lastSpacePos = value.lastIndexOf(" ");
              // Ignore values with no space character
              if (lastSpacePos &gt; 0) {
                // Update "firstName"
                  model.setFirstName(value.substring(0, lastSpacePos)); 
                // Update "lastName"
                  model.setLastName(value.substring(lastSpacePos + 1)); 
              }
    }
  
    public static void main(String args[]){
      WritableComputed wc = new WritableComputed("hello","world");
      wc.applyBindings();
    }
  }
  </code></pre>
  
  <p>The problem is that the text field only renders a js function</p>
  
  <blockquote>
    <p>function(c,k){var e=b.ko4j;e&amp;&amp;d.java_lang_Class(!1).toJS(d.org_netbeans_html_ko4j_$JsCallbacks$(!1)._VM().org_1netbeans_1html_1ko4j_1Knockout$call$ILjava_1lang_1Object_12Ljava_1lang_1Object_12__Ljava_lang_Object_2Lorg_netbeans_html_ko4j_Knockout_2ILjava_lang_Object_2Ljava_lang_Object_2(e,a,c,k))}</p>
  </blockquote>
  
  <p>Thank you in advance.</p>