{
super.setVisible( visible );
if ( visible )
{
DummyEntry newEntry = wizard.getPrototypeEntry();
IValue editValue = null;
try
{
EventRegistry.suspendEventFireingInCurrentThread();
// remove empty must attributes
// necessary when navigating back, modifying object classes
// and DN and navigation forward again.
String[] oldMust = newEntry.getSubschema().getMustAttributeNames();
for ( int i = 0; i < oldMust.length; i++ )
{
IAttribute attribute = newEntry.getAttribute( oldMust[i] );
if ( attribute != null )
{
IValue[] values = attribute.getValues();
for ( int v = 0; v < values.length; v++ )
{
if ( values[v].isEmpty() )
{
attribute.deleteValue( values[v] );
}
}
if ( attribute.getValueSize() == 0 )
{
newEntry.deleteAttribute( attribute );
}
}
}
// add must attributes
String[] newMust = newEntry.getSubschema().getMustAttributeNames();
for ( int i = 0; i < newMust.length; i++ )
{
if ( newEntry.getAttribute( newMust[i] ) == null )
{
IAttribute att = new Attribute( newEntry, newMust[i] );
newEntry.addAttribute( att );
att.addEmptyValue();
if ( editValue == null )
{
editValue = att.getValues()[0];