The first tip ( bounded=true) was successful. Now approaching the second one.
Thanks, Dan On Feb 24, 2017 3:01 PM, "Dan Haywood" <[email protected]> wrote: > You need to tell the framework how to get hold of those objects. > > Look at @DomainObject(autoCompleteRepository=...), OR > @DomainObject(bounded=true) on the referenced type, or supporting > choicesNXxx() or autoCompleteNXxx() methods fir the relevant actions. > > HTH, > Dan > > On Fri, 24 Feb 2017, 18:30 L Eder, <[email protected]> wrote: > > > Hi members: > > > > Could someone point me out in the below source code what is wrong or > > missing? > > > > I want to depict: > > Scenario 1-----* Components > > > > The problem is I am unable to see a drop-down list of scenarios in the > > Component's create UI. It is only read '(none)' there. > > > > The same symptom is seen in Scenario UI, after i click the Add > > (Component) action. > > > > Thanks, Eder > > > > Component.java > > " > > public class Component implements Comparable<Component> { > > > > ... > > // region > scenario (reference property) > > private Scenario scenario; > > > > @Column(allowsNull = "true", name="scenario_id") > > public Scenario getScenario(){ > > return scenario; > > } > > > > public void setScenario(final Scenario scenario){ > > this.scenario = scenario; > > } > > > > // endregion > > ... > > " > > > > Scenario.java > > " > > // ////////////////////////////////////// > > // Components (collection), > > // Add (action), Remove (action) > > // ////////////////////////////////////// > > > > @Getter @Setter > > @Persistent(mappedBy = "scenario", dependentElement = "true") > > private SortedSet<Component> components = new TreeSet<Component>(); > > > > @Action(semantics = SemanticsOf.IDEMPOTENT) > > public Component add( > > final Component component) { > > return componentRepo.findByDescription(description); > > } > > " > > >
