Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need a ListEditor</p> <p>It depends of how you want to present them in your actual view, but the same idea apply:</p> <pre><code>public class BillingPeriodListEditor implements isEditor&lt;ListEditor&lt;BillingPeriod,BillingPeriodEditor&gt;&gt;, HasRequestContext{ private class BillingPeriodEditorSource extends EditorSource&lt;BillingPeriodEditor&gt;{ @Override public EmailsItemEditor create(final int index) { // called each time u add or retrive new object on the list // of the @ManyToOne or @ManyToMany } @Override public void dispose(EmailsItemEditor subEditor) { // called each time you remove the object from the list } @Override public void setIndex(EmailsItemEditor editor, int index) { // i would suggest track the index of the subeditor. } } private ListEditor&lt;BillingPeriod, BillingPeriodEditor&gt; listEditor = ListEditor.of(new BillingPeriodEditorSource ()); // on add new one ... // apply or request factory // you must implement the HasRequestContext to // call the create.(Proxy.class) public void createNewBillingPeriod(){ // create a new one then add to the list listEditor.getList().add(...) } } public class BillingPeriodEditor implements Editor&lt;BillingPeriod&gt;{ // edit you BillingPeriod object } </code></pre> <p>Then in you actual editor edit as is in the path Example getBillingPeriods();</p> <pre><code>BillingPeriodListEditor billingPeriods = new BillingPeriodListEditor (); // latter on the clickhandler billingPeriods.createNewBillingPeriod() </code></pre> <p>You are done now.</p>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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