How to set default values for a screen in V7


In 6.x , the document include a part for assigning initial values.


But seems it is outdated.
Fox example,In CUBA 7 ,the screen use StandardEditor, there is no initNewItem method.

Finally ,i figure out the problem using the setEntityToEdit method.

For assigning initial value ,is there a document in V7 ?

I think i found the description for assigning initial values.

1 Like

Use InitEntityEvent in StandardEditor and MasterDetailScreen:

protected void onInitEntity(InitEntityEvent<Foo> event) {
1 Like

Hi, Yuriy

Thanks a lot.

The examples of initializing data in screens will be moved from the documentation to the Guides shortly.