src/main/java/org/efaps/ui/wicket/models/objects/AbstractUIObject.java
protected void initialize(final UUID _commandUUID,
                              final String _openerId)
        throws CacheReloadException
    {
        this.openerId = _openerId;
        if (_commandUUID != null) {
            final AbstractCommand command = getCommand(_commandUUID);
            this.cmdUUID = command.getUUID();
            setMode(command.getTargetMode());
            this.target = command.getTarget();
            this.submit = command.isSubmit();
            if (command.getTargetSearch() != null && !(this instanceof UIMenuItem)) {
                this.callingCmdUUID = this.cmdUUID;
                this.cmdUUID = command.getTargetSearch().getDefaultCommand().getUUID();
                setMode(TargetMode.SEARCH);
                if (command.hasEvents(EventType.UI_COMMAND_EXECUTE)) {
                    this.submit = true;
                }
            }
        }
    }
protected void initialize(final UUID _commandUUID,
                              final String _openerId)
        throws CacheReloadException
    {
        this.openerId = _openerId;
        if (_commandUUID != null) {
            final AbstractCommand command = getCommand(_commandUUID);
            this.cmdUUID = command.getUUID();
            setMode(command.getTargetMode());
            this.target = command.getTarget();
            this.submit = command.isSubmit();
            if (command.getTargetSearch() != null && !(this instanceof UIMenuItem)) {
                this.callingCmdUUID = this.cmdUUID;
                this.cmdUUID = command.getTargetSearch().getDefaultCommand().getUUID();
                setMode(TargetMode.SEARCH);
                if (command.hasEvents(EventType.UI_COMMAND_EXECUTE)) {
                    this.submit = true;
                }
            }
        }
    }
Method initializes the model.

@param _commandUUID UUID for this Model
@param _openerId id of the opener
@throws CacheReloadException on error