|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.injector.DefaultPageInjector
public class DefaultPageInjector
This is the default DomUI page injector. It is responsible for providing (injecting) values into
page setters where required. This default version only accepts the @UIUrlParameter
annotation
and uses it to inject either URL parameter values or entities loaded from an URL parameter into
the page. This can be extended to add extra methods to inject values into a page, for instance using
Spring (NO! NO! Use something good instead of this piece of shit!), Guice, Pico/Nanocontainer or
whatever.
Constructor Summary | |
---|---|
DefaultPageInjector()
|
Method Summary | |
---|---|
protected PropertyInjector |
calculateInjector(PropertyInfo pi)
Tries to find an injector to inject a value for the specified property. |
protected to.etc.domui.injector.PageInjector |
calculatePageInjector(java.lang.Class<? extends UrlPage> page)
Fully recalculates the page injectors to use for the specified page. |
protected PropertyInjector |
calculatePropertyInjector(PropertyInfo pi,
java.lang.reflect.Method annotatedMethod)
|
protected PropertyInjector |
createEntityInjector(PropertyInfo pi,
java.lang.String name,
boolean mandatory,
java.lang.Class<?> entityType)
|
protected PropertyInjector |
createParameterInjector(PropertyInfo pi,
java.lang.String name,
boolean mandatory)
|
protected PropertyInjector |
createUrlAnnotationConnector(PropertyInfo pi,
UIUrlParameter upp)
|
void |
injectPageValues(UrlPage page,
RequestContextImpl ctx,
PageParameters papa)
This scans the page for properties that are to be injected. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPageInjector()
Method Detail |
---|
@Nullable protected PropertyInjector calculateInjector(PropertyInfo pi)
pi
-
protected PropertyInjector calculatePropertyInjector(PropertyInfo pi, java.lang.reflect.Method annotatedMethod)
protected PropertyInjector createUrlAnnotationConnector(PropertyInfo pi, UIUrlParameter upp)
protected PropertyInjector createParameterInjector(PropertyInfo pi, java.lang.String name, boolean mandatory)
protected PropertyInjector createEntityInjector(PropertyInfo pi, java.lang.String name, boolean mandatory, java.lang.Class<?> entityType)
protected to.etc.domui.injector.PageInjector calculatePageInjector(java.lang.Class<? extends UrlPage> page)
page
-
public void injectPageValues(UrlPage page, RequestContextImpl ctx, PageParameters papa) throws java.lang.Exception
injectPageValues
in interface IPageInjector
page
- ctx
- papa
-
java.lang.Exception
IPageInjector.injectPageValues(to.etc.domui.dom.html.UrlPage, to.etc.domui.server.RequestContextImpl, to.etc.domui.state.PageParameters)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |