Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Automatic validation of Pages in PostConstruct by Context Path #16

@slu-it

Description

@slu-it

In a similar fashion as with @Mapping for PageFragement subclasses we could validate if a Page was initialized for a valid context path / url.

Examples

@ContextPath("/html/index")
public interface LandingPage extends Page {
    // implementation
}
  • If the currently displayed page had the URL http://localhost/html/index and an instance of LandingPage is created there would be no problem since the context path matches the expectation.
  • If the currently displayed page had the URL http://localhost/html/main an exception would be thrown as soon as a LandingPage instance is being created.
  • For page definitions without @ContextPath every URL is valid

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions