eclipse-ee4j / eclipse-ee4j/krazo
Define SPI for hooking into the view resolution
- Dominant language
- Java
- Stars
- 55
- Forks
- 25
- Avg merge
- 3h 25m
- Merged PRs (30d)
- 3
Description
This issue is about starting some first discussions about defining a SPI for hooking into the view resolution. This idea was brought up by @jslsolucoes as part of #126.
The idea is to have something like:
```java
public interface ViewResolver {
Viewable resolve(ViewResolverContext ctx);
}
public interface ViewResolverContext {
Object getControllerResult();
ResourceInfo getResourceInfo();
// ....
}
```
This would for example allow to automatically derive the view name from the controller class/method name. Of course in this case the default implementation should be moved into an implementation of that interface. This will also require to add some kind of ordering or a chain like processing so that custom implementation can access the result of the default algorithm.
Feel free to share your thoughts.
Contributor guide
Assessment
This issue has not been assessed yet.