« Return to Thread: Help dynamic selects

Help dynamic selects

by Juancevi :: Rate this Message:

Reply to Author | View in Thread

Hello, my name is John I am from Argentina, I am newbie at trails, I have nested combos mark the link
http://www.nabble.com/Enum-in-search-tt18317768.html#a18319874
but I can not be that I'm doing wrong.


Region---

  @OneToMany(mappedBy = "region", cascade = CascadeType.ALL)
  @JoinColumn(name = "region_id")
  @Collection(child = false , allowRemove=false)
  public List<Pais> getPaises() {
    return paises;
  }


Pais---

  @OneToMany(mappedBy = "pais", cascade = CascadeType.ALL)
  @JoinColumn(name = "pais_id")
  @Collection(child = true)
  public List<Provincia> getProvincias() {
    return provincias;
  }


Provincia---

  @ManyToOne
  @Transient
  @InitialValue("pais.region")
  public Region getRegion() {
    return region;
  }


  @ManyToOne
  @PossibleValues("region.paises")
  public Pais getPais() {
    return pais;
  }


I want when choosing a region, only to drain the countries of that region, but this I do not works.

Any help thank you very much!

 « Return to Thread: Help dynamic selects