Navigation to editor withoutid=new should open editor to create new entity.
http://localhost:8080/#main/1/orders/edit
Navigation to editor withid=new should open editor to create new entity.
http://localhost:8080/#main/1/orders/edit?id=new - opens editor and creates new entity. Parameter id is presented in UrlParamsChangedEvent
Navigation to editor with serialized id=zbx4n93r8vefpnd86w051s0nn should open editor and load entity with given id:
Do not show the id parameter for a non-persistent entity at all. The framework considers the state of non-persistent entity always as new. Id in these entities has always new value, and it is not possible to navigate to a specific entity. So editor for non-persistent should handle navigation itself.
Changes
It was decided to do not show the id=new parameter at all.
QA
Create a demo project. Create browser and editor for some entity. Define route for them (doc).
Then check the following behavior:
Try to create new entity instance. Editor should be opened for creation without id=new parameter.
Try to navigate to the editor by link (copy it from address bar). Editor should be opened for creation.
Subscribe to UrlParamsChangedEvent in the editor screen. Try to navigate to the editor with id=new parameter in the URL. Event should be fired and id parameter should present in params of the event.
Try to edit some instance of the entity. Editor should be opened for editing and id parameter should present in the URL.
Description
What should be done
Navigation to editor without
id=new
should open editor to create new entity.Navigation to editor with
id=new
should open editor to create new entity.http://localhost:8080/#main/1/orders/edit?id=new
- opens editor and creates new entity. Parameterid
is presented inUrlParamsChangedEvent
Navigation to editor with serialized
id=zbx4n93r8vefpnd86w051s0nn
should open editor and load entity with given id:Do not show the id parameter for a non-persistent entity at all. The framework considers the state of non-persistent entity always as new. Id in these entities has always new value, and it is not possible to navigate to a specific entity. So editor for non-persistent should handle navigation itself.
Changes
It was decided to do not show the
id=new
parameter at all.QA
Create a demo project. Create browser and editor for some entity. Define route for them (doc).
Then check the following behavior:
id=new
parameter.id=new
parameter in the URL. Event should be fired and id parameter should present in params of the event.