eclipse-ee4j / eclipse-ee4j/krazo

Define SPI for hooking into the view resolution

Open
#127 4 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.