This discussion is archived
2 Replies Latest reply: Mar 29, 2013 2:53 PM by 999710 RSS

newbie looks for tabview sample with datasources as 1:n relation

999710 Newbie
Currently Being Moderated
hi all,

i'm newbie to javaFax2 and just studying different samples for tabview..i proceeded so far i can load one mysql-datatable in tabview..
but how to show a subtable at selection of one orw in maintable ?

the goal is to show and edit data in a one-to-many relation,i.e. customers and orders, or in my speciqal case,
products and their physical attributes

i get trouble to refer mousevent : at many samples netbeans3.0 tells, there is no MouseEvent implementation !?
what to import ?

please tell about ...
  • 1. Re: newbie looks for tabview sample with datasources as 1:n relation
    James_D Guru
    Currently Being Moderated
    996707 wrote:
    hi all,

    i'm newbie to javaFax2 and just studying different samples for tabview..i proceeded so far i can load one mysql-datatable in tabview..
    I'm assuming you mean TableView
    but how to show a subtable at selection of one orw in maintable ?

    the goal is to show and edit data in a one-to-many relation,i.e. customers and orders, or in my speciqal case,
    products and their physical attributes
    There are a couple of ways you can approach this. If you are coding to JavaFX 8, you could possibly use the new TreeTableView control. I haven't used that, and the documentation is not (yet) complete for it.

    The other approach is to define two tables, one for products, and one for physical attributes. Update the itemsProperty of the physical attributes table when the selectedItemProperty of the products table's selectionModel changes. A similar question was posted in {thread:id=2516138}

    >
    i get trouble to refer mousevent : at many samples netbeans3.0 tells, there is no MouseEvent implementation !?
    what to import ?
    javafx.scene.input.MouseEvent
  • 2. Re: newbie looks for tabview sample with datasources as 1:n relation
    999710 Newbie
    Currently Being Moderated
    sorry,that i answer late..

    thank you very much, that helped me to read any value from any cell of a tableview,
    now i will be able to visualize any subtable or a special form and so far !

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points