Search in sources :

Example 1 with DataItem

use of com.guigarage.platform.sample.data.DataItem in project dolphin-platform-examples by canoo.

the class DetailController method reload.

@RemotingAction("reload")
public void reload() {
    Long id = model.getId();
    LOGGER.debug("Reload with id {}", id);
    if (id != null) {
        final DataItem item = dataService.find(id);
        model.setName(item.getName());
        model.setDescription(item.getDescription());
    } else {
        model.setName("");
        model.setDescription("");
    }
}
Also used : DataItem(com.guigarage.platform.sample.data.DataItem) RemotingAction(com.canoo.platform.remoting.server.RemotingAction)

Aggregations

RemotingAction (com.canoo.platform.remoting.server.RemotingAction)1 DataItem (com.guigarage.platform.sample.data.DataItem)1