Appearance
@DefaultView
The @DefaultView annotation marks an entity as the default landing view when a user navigates to the application root.
Usage
java
@DefaultView
@SquizyEntity(displayFormat = "${reference} - ${name}")
@Entity
public class Product { /* ... */ }When a user navigates to the application root, they are redirected to the Product entity view.
Priority
When multiple entities are annotated with @DefaultView, the order attribute determines which one takes precedence (lower value = higher priority):
java
@DefaultView(order = 1)
@SquizyEntity
@Entity
public class Dashboard { /* ... */ }
@DefaultView(order = 2)
@SquizyEntity
@Entity
public class Product { /* ... */ }The default order is 0.
Since not all users have access to all entities, Squizy uses the priority order to find the first entity the user can access. If the user lacks permission for the highest-priority entity, the next one in order is tried, and so on. This guarantees that every user lands on a view they are authorized to see, regardless of their role.