@BrixPresenter – generate presenter impl and lifecycle wiring.@UiView – generate a _UiView subclass and DI bindings.@BrixComponent – generate component initializer for router registration.@BrixRoute – map presenter to a route; supports custom routing provider.@BrixSlot / @RegisterSlots – declare and supply slots.@ListenFor, @PathParameter, @QueryParameter, @FragmentParameter – wire events and routing state.@OnReveal, @OnBeforeReveal, @OnActivated, @OnDeactivated, @OnStateChanged, @OnRemove.@UiHandler on presenter methods, @Handlers on view fields.@BrixTask for startup tasks, @Global for shared core beans. @BrixPresenter
@BrixRoute("todos")
@BrixSlot(BrixSlots.BRIX_BODY_SLOT)
@BrixComponent(presenter = TodosPresenter.class)
public class TodosPresenter extends Presenter<TodosView> {
@PathParameter("id") String todoId;
@ListenFor(TodoCreated.class)
void onTodoCreated(TodoCreated event) { view.add(event.todo()); }
@Override
protected void onRevealed() {
view.show(todoId);
}
}
@UiView
public class TodosView extends BrixView<Element, TodosHandlers>
implements TodosPresenter.TodosView {
@Handlers TodosHandlers handlers;
public void show(String id) { /* ... */ }
}
META-INF/services for router registration.