I am trying to set default value for dropdown with create action in EntityCombinedScreen
What drop-down? Please explain your problem.
When I click the create button, set default value to lookupfield which are available in lookupfield options in Entity Combined Screen.
@Inject
private LookupField myField;
protected void enableEditControls(boolean creating) {
super(creating);
if (creating) {
myField.setValue(someValue);
}
}
But better initialize the new entity:
@Override
protected void initNewItem(Entity item) {
MyEntity entity = (MyEntity) item;
entity.setSomething(someValue);
}