Skip to content

Commit

Permalink
Chinook demo, bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorndarri committed Sep 28, 2024
1 parent 97abcb4 commit 8c450b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public InvoiceLineTablePanel(SwingEntityTableModel tableModel) {
.includeConditionPanel(false)
.includeFilterPanel(false)
.editable(attributes -> attributes.remove(InvoiceLine.INVOICE_FK))
.editComponentFactory(InvoiceLine.TRACK_FK, new TrackComponentFactory()));
.editComponentFactory(InvoiceLine.TRACK_FK, new TrackComponentFactory(InvoiceLine.TRACK_FK)));
table().setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
setPreferredSize(new Dimension(360, 40));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class PlaylistTrackTablePanel extends EntityTablePanel {

public PlaylistTrackTablePanel(SwingEntityTableModel tableModel) {
super(tableModel, new PlaylistTrackEditPanel(tableModel.editModel()), config -> config
.editComponentFactory(PlaylistTrack.TRACK_FK, new TrackComponentFactory())
.editComponentFactory(PlaylistTrack.TRACK_FK, new TrackComponentFactory(PlaylistTrack.TRACK_FK))
// Skip confirmation when deleting
.deleteConfirmer(Confirmer.NONE)
.includeEditControl(false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
*/
package is.codion.framework.demos.chinook.ui;

import is.codion.framework.demos.chinook.domain.Chinook.InvoiceLine;
import is.codion.framework.domain.entity.Entity;
import is.codion.framework.domain.entity.attribute.ForeignKey;
import is.codion.swing.common.ui.component.value.ComponentValue;
import is.codion.swing.framework.model.SwingEntityEditModel;
import is.codion.swing.framework.ui.component.DefaultEntityComponentFactory;
import is.codion.swing.framework.ui.component.EntitySearchField;

final class TrackComponentFactory extends DefaultEntityComponentFactory<Entity, EntitySearchField> {

TrackComponentFactory() {
super(InvoiceLine.TRACK_FK);
TrackComponentFactory(ForeignKey trackForeignKey) {
super(trackForeignKey);
}

@Override
Expand Down

0 comments on commit 8c450b6

Please sign in to comment.