In switching the Page Flow runtime off of the XMLBean config
document and onto POJOs, I ran into one issue that is worth
discussing. The default templated URL formatter class set as the
default value in the beehive-netui-config.xsd doesn't exist:
org.apache.beehive.netui.core.urls.DefaultTemplatedURLFormatter
and seems like it should be replaced with:
org.apache.beehive.netui.pageflow.internal.DefaultTemplatedURLFormatter
With this replacement in the XSD and the same fix in
o.a.b.n.u.c.b.UrlConfig, the
PageFlowContextListener.getTemplatedURLFormatter() method will always
run and create an URL formatter. Then, it seems like these lines in
PageFlowContextListener:
// if there's no TemplatedURLFormatter in the config file,
use our default impl.
if ( formatter == null )
{
formatter = new DefaultTemplatedURLFormatter();
}
can disappear and be replaced with:
assert formatter != null;
because the default URL formatter class name is always available from
the UrlConfig object and the "defaultness" is coded in exactly one
place -- UrlConfig.
Thoughts? If this solution is workable for everyone, I'll update
the patch in BEEHIVE-904.
Eddie