Index: topia/src/java/org/codelutin/topia/ui/swing/ActionEntityPanel.java diff -u topia/src/java/org/codelutin/topia/ui/swing/ActionEntityPanel.java:1.6 topia/src/java/org/codelutin/topia/ui/swing/ActionEntityPanel.java:1.7 --- topia/src/java/org/codelutin/topia/ui/swing/ActionEntityPanel.java:1.6 Wed Sep 22 15:46:30 2004 +++ topia/src/java/org/codelutin/topia/ui/swing/ActionEntityPanel.java Tue Sep 28 10:14:49 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * - * Mise a jour: $Date: 2004/09/22 15:46:30 $ + * Mise a jour: $Date: 2004/09/28 10:14:49 $ * par : $Author: mazelier $ */ @@ -56,7 +56,7 @@ import javax.swing.JPanel; import javax.swing.JTextField; -public class ActionEntityPanel extends JPanel{ // ActionEntityPanel +public class ActionEntityPanel extends TopiaPanel{ // ActionEntityPanel protected TopiaUIContext uicontext = null; protected TopiaPersistenceService ps = null; @@ -90,6 +90,7 @@ initData(); } + // il est important de donner un nom a chacun des composants (utilisation lors de la generation) protected void initUI(){ GridBagLayout layout = new GridBagLayout(); GridBagConstraints constraint = new GridBagConstraints(); @@ -102,6 +103,7 @@ constraint.insets = new Insets(2,2,2,2); lastEntityBox = Box.createVerticalBox(); + lastEntityBox.setName("lastEntityBox"); constraint.gridx=0; add(lastEntityBox, constraint); @@ -109,6 +111,7 @@ // add the combo constraint.gridx=1; searchFieldCombo = new JComboBox(); + searchFieldCombo.setName("searchFieldCombo"); add(searchFieldCombo, constraint); // add the textfield @@ -116,6 +119,7 @@ constraint.weightx=0.1; constraint.ipadx=100; searchText = new JTextField(); + searchText.setName("searchText"); add(searchText, constraint); // add the button Search @@ -123,6 +127,7 @@ constraint.weightx=0.0; constraint.ipadx=10; searchButton = new JButton("Search"); + searchButton.setName("searchButton"); add(searchButton, constraint); // add the linkbutton new @@ -131,6 +136,7 @@ constraint.gridwidth=3; newLinkButton = new JLinkButton("New"); + newLinkButton.setName("newLinkButton"); add(newLinkButton, constraint); } Index: topia/src/java/org/codelutin/topia/ui/swing/TopiaPanelPersistenceDelegate.java diff -u topia/src/java/org/codelutin/topia/ui/swing/TopiaPanelPersistenceDelegate.java:1.1 topia/src/java/org/codelutin/topia/ui/swing/TopiaPanelPersistenceDelegate.java:1.2 --- topia/src/java/org/codelutin/topia/ui/swing/TopiaPanelPersistenceDelegate.java:1.1 Mon Sep 20 15:33:49 2004 +++ topia/src/java/org/codelutin/topia/ui/swing/TopiaPanelPersistenceDelegate.java Tue Sep 28 10:14:49 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * - * Mise a jour: $Date: 2004/09/20 15:33:49 $ + * Mise a jour: $Date: 2004/09/28 10:14:49 $ * par : $Author: mazelier $ */ @@ -39,24 +39,25 @@ protected void initialize(Class type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type, oldInstance, newInstance, out); - // Ignore the children of a JScrollPane. - // Pending(milne) find a better way to do this. +// Ignore the children of a JScrollPane. +// Pending(milne) find a better way to do this. if (oldInstance instanceof javax.swing.JScrollPane) { return; } java.awt.Container oldC = (java.awt.Container)oldInstance; java.awt.Component[] oldChildren = oldC.getComponents(); - java.awt.Container newC = (java.awt.Container)newInstance; - //java.awt.Component[] newChildren = (newC == null) ? new java.awt.Component[0] : newC.getComponents(); +// java.awt.Container newC = (java.awt.Container)newInstance; +// java.awt.Component[] newChildren = (newC == null) ? new java.awt.Component[0] : newC.getComponents(); System.out.println("********** old.size: "+ oldC.getComponents().length); - System.out.println("********** new.size: "+ newC.getComponents().length); + //System.out.println("********** new.size: "+ newC.getComponents().length); for(int i = 0; i < oldChildren.length; i++) { out.writeStatement(new Statement(oldInstance, "add", new Object[]{oldChildren[i]})); } } + } // TopiaPanelPersistenceDelegate