public Object doRemoteCommand(String strCommand, Map<String, Object> properties) throws RemoteException, DBException
    {
    	int iRecordCount = m_vRecordList.getRecordCount();
    	int iOldMasterSlave = this.setMasterSlave(RecordOwner.SLAVE | RecordOwner.MASTER);
    	Record record = this.getMainRecord();
    	if (properties != null)
    		if (Boolean.TRUE.equals(properties.get(MenuConstants.CLONE)))
    			if (record.getClass().getName().equals(properties.get(DBParams.RECORD)))
		{
			try {
				record = (Record)record.clone();
				this.addRecord(record);
			} catch (CloneNotSupportedException e) {
				e.printStackTrace();
			}
			record.readSameRecord(this.getMainRecord(), false, false);
		}
    	Object objReturn = record.doRemoteCommand(strCommand, properties);
    	this.setMasterSlave(iOldMasterSlave);
    	if (record != this.getMainRecord())
    	{
    		record.free();
    		while (m_vRecordList.getRecordCount() > iRecordCount)
    		{	// Close all except the main record
    			m_vRecordList.getRecordAt(m_vRecordList.getRecordCount() - 1).free();
    		}
    	}
    	if (!Boolean.FALSE.equals(objReturn))
    		return objReturn;
        return super.doRemoteCommand(strCommand, properties);
    }
public Object doRemoteCommand ( String strCommand , Map < String , Object > properties ) throws RemoteException , DBException { int iRecordCount = m_vRecordList . getRecordCount ( ) ; int iOldMasterSlave = this . setMasterSlave ( RecordOwner . SLAVE | RecordOwner . MASTER ) ; Record record = this . getMainRecord ( ) ; if ( properties != null ) if ( Boolean . TRUE . equals ( properties . get ( MenuConstants . CLONE ) ) ) if ( record . getClass ( ) . getName ( ) . equals ( properties . get ( DBParams . RECORD ) ) ) { try { record = ( Record ) record . clone ( ) ; this . addRecord ( record ) ; } catch ( CloneNotSupportedException e ) { e . printStackTrace ( ) ; } record . readSameRecord ( this . getMainRecord ( ) , false , false ) ; } Object objReturn = record . doRemoteCommand ( strCommand , properties ) ; this . setMasterSlave ( iOldMasterSlave ) ; if ( record != this . getMainRecord ( ) ) { record . free ( ) ; while ( m_vRecordList . getRecordCount ( ) > iRecordCount ) { m_vRecordList . getRecordAt ( m_vRecordList . getRecordCount ( ) - 1 ) . free ( ) ; } } if ( ! Boolean . FALSE . equals ( objReturn ) ) return objReturn ; return super . doRemoteCommand ( strCommand , properties ) ; }
Process the command.
Step 1 - Process the command if possible and return true if processed.
Step 2 - If I can't process, pass to all children (with me as the source).
Step 3 - If children didn't process, pass to parent (with me as the source).
Note: Never pass to a parent or child that matches the source (to avoid an endless loop).
@param strCommand The command to process.
@param sourceSField The source screen field (to avoid echos).
@param bUseSameWindow If this command creates a new screen, create in a new window?
@return true if success.