1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    58
    Vote Rating
    0
    johnstontrav is on a distinguished road

      0  

    Post 1:m association tables

    1:m association tables


    Hi ext'ers!

    Im looking for some ideas on how to handle add/edit forms for 1:many and many:many tables?

    Note the joiner table has fields aswell that need to be filled out, for example:

    [bundles]
    id
    name

    [products]
    id
    name

    [bundles_products]
    id
    bundle_id
    product_id
    price
    start_date
    end_date

    I hope that make sense. Any ideas would be great!!!!

    Thanks
    Trav.

  2. #2
    Ext User
    Join Date
    Apr 2008
    Posts
    418
    Vote Rating
    0
    pokerking400 is on a distinguished road

      0  

    Default


    Table design is wrong...

    Product

    Bundle

    bundle_products should only have two columns
    product_id
    bundle_id


    You can have a view with combination of those two but not a table..

    I am also working on master/detail edit forms...long way to go ...

  3. #3
    Sencha User
    Join Date
    Mar 2008
    Posts
    58
    Vote Rating
    0
    johnstontrav is on a distinguished road

      0  

    Default


    Quote Originally Posted by pokerking400 View Post
    Table design is wrong...

    Product

    Bundle

    bundle_products should only have two columns
    product_id
    bundle_id


    You can have a view with combination of those two but not a table..

    I am also working on master/detail edit forms...long way to go ...
    Hi pokerking400,

    i disagree with you regarding table design. How would you handle (design) an association between 2 tables that exist for a defined period of time?

    In this case the joiner table will need start_date and end_date fields as well as the id fields.

    Im happy to be proven wrong here, but the issue regarding screen design still exists.

    Cheers,
    Trav.

  4. #4
    Ext User
    Join Date
    Apr 2008
    Posts
    418
    Vote Rating
    0
    pokerking400 is on a distinguished road

      0  

    Default


    Price is part of product not the bundle product. Anyway table design is not the issue you are asking here.

    I am also working on master/detail form , so far i am stuck in layout... i am working on dynamic form concept. You can always design manually anyform by specifiying fixed size...but i am trying to create one single form for all types of objects.

    No many to many though...

    It only covers one to one and one to many.

    later,

  5. #5
    Ext User
    Join Date
    Nov 2007
    Posts
    11
    Vote Rating
    0
    thewebguy is on a distinguished road

      0  

    Default


    Quote Originally Posted by pokerking400 View Post
    Price is part of product not the bundle product. Anyway table design is not the issue you are asking here.

    I am also working on master/detail form , so far i am stuck in layout... i am working on dynamic form concept. You can always design manually anyform by specifiying fixed size...but i am trying to create one single form for all types of objects.

    No many to many though...

    It only covers one to one and one to many.

    later,
    No, what he's saying is the price and the dates are properties of the Product Bundle. Price has no concept solely in the context of a product, nor a bundle. If you have a drinks table, and a sizes table, for example:

    [drinks]
    id
    name

    [sizes]
    id
    name

    [drink_sizes]
    drink_id
    size_id
    price

    You can't put a price on just a coke, and you can't put a price on a large, but you can put a price on a large coke.

    Anyway, what I normally do is, for a one-many I simply include a grid in the form that contain many entities belonging to that single entity. If the relationship contains more properties, simply include that as part of adding entities to the form.

    For a many-many, usually you'd have two forms, each with their own mutual editor grids. In your example, I'd have a product form which has a 'select bundles to link' grid, where you chose the bundles, and for each specify a start date, end date, and price for that link. And in the bundle form, you have a 'select products to link' editor grid that has pretty much the same, only for products.

  6. #6

  7. #7
    Ext User
    Join Date
    Apr 2008
    Posts
    418
    Vote Rating
    0
    pokerking400 is on a distinguished road

      0  

    Default


    i am taking a conventional approach to edit any grid data. Popup full fledged edit form. It will be used also adding record.

    All other gadgets can be added once basic admin is done. Mine is coming along. Will take another month before i complete the grid editing. I am slow. hahahaha.

  8. #8
    Ext User
    Join Date
    Apr 2008
    Posts
    418
    Vote Rating
    0
    pokerking400 is on a distinguished road

      0  

    Default


    hey Mj ...

    how do i position this window?

    It goes over browser...any idea?.

    Thanks


    Code:
     var win = new Ext.Window({
    								id:'metaform-win'
    								,width:700
    								,height:600
    								,layout:'fit'
    								,closable:true
    								,maximizable:true
    								,title:'Ext.ux.XForm'
    								,items:{
    									 xtype:'metaform'
    									,loadurl:'/admin/'+this.objectname+'/view/ss/id/1/meta/1'
    									,url:'/admin/'+'test'
    									,buttons:[
    								{
    									text:'Submit'
    											,handler:function() {
    										Ext.getCmp('metaform-win').items.get(0).getForm().submit();
    										}
    								},
    								{
    										text:'Cancel'
    											,handler:function() {
    											Ext.getCmp('metaform-win').close();
    										}
    								},]
    							}
    						});
    					win.show();

  9. #9
    Ext User
    Join Date
    Apr 2008
    Posts
    418
    Vote Rating
    0
    pokerking400 is on a distinguished road

      0  

    Default


    anyone?

  10. #10
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    try specifying x and y.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."