You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by Eddie O'Neil <ek...@gmail.com> on 2005/09/01 17:35:54 UTC

beehive-904 issue with URL templating

  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

Re: beehive-904 issue with URL templating

Posted by Eddie O'Neil <ek...@gmail.com>.
  Okay; just updated the patch for this here:

    http://issues.apache.org/jira/secure/ManageAttachments.jspa?id=12314095

Eddie



On 9/1/05, Eddie O'Neil <ek...@gmail.com> wrote:
>   I've got a patch for this that passes NetUI BVTs, but JIRA ssems to
> be napping, so I can't attach it.  If you'd like a copy, feel free to
> ping me directly.
> 
> Eddie
> 
> 
> 
> 
> On 9/1/05, Eddie O'Neil <ek...@gmail.com> wrote:
> >   Cool; I'll change the patch since I've still got this applied to my
> > local sync.  Just easier that way...  :)
> >
> > Eddie
> >
> >
> > On 9/1/05, Carlin Rogers <ca...@gmail.com> wrote:
> > > Hey Eddie,
> > >
> > > Yes, the mistake in the XSD was an oversight on my part. Good catch.
> > >
> > > I also agree that the clean up in PageFlowContextListener makes sense. Do
> > > you want me to make this patch? Thanks for looking at this.
> > >
> > > Carlin
> > >
> > >
> > > On 9/1/05, Eddie O'Neil <ek...@gmail.com> wrote:
> > > >
> > > > 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
> > > >
> > >
> > >
> >
>

Re: beehive-904 issue with URL templating

Posted by Eddie O'Neil <ek...@gmail.com>.
  I've got a patch for this that passes NetUI BVTs, but JIRA ssems to
be napping, so I can't attach it.  If you'd like a copy, feel free to
ping me directly.

Eddie




On 9/1/05, Eddie O'Neil <ek...@gmail.com> wrote:
>   Cool; I'll change the patch since I've still got this applied to my
> local sync.  Just easier that way...  :)
> 
> Eddie
> 
> 
> On 9/1/05, Carlin Rogers <ca...@gmail.com> wrote:
> > Hey Eddie,
> >
> > Yes, the mistake in the XSD was an oversight on my part. Good catch.
> >
> > I also agree that the clean up in PageFlowContextListener makes sense. Do
> > you want me to make this patch? Thanks for looking at this.
> >
> > Carlin
> >
> >
> > On 9/1/05, Eddie O'Neil <ek...@gmail.com> wrote:
> > >
> > > 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
> > >
> >
> >
>

Re: beehive-904 issue with URL templating

Posted by Eddie O'Neil <ek...@gmail.com>.
  Cool; I'll change the patch since I've still got this applied to my
local sync.  Just easier that way...  :)

Eddie


On 9/1/05, Carlin Rogers <ca...@gmail.com> wrote:
> Hey Eddie,
> 
> Yes, the mistake in the XSD was an oversight on my part. Good catch.
> 
> I also agree that the clean up in PageFlowContextListener makes sense. Do
> you want me to make this patch? Thanks for looking at this.
> 
> Carlin
> 
> 
> On 9/1/05, Eddie O'Neil <ek...@gmail.com> wrote:
> >
> > 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
> >
> 
>

Re: beehive-904 issue with URL templating

Posted by Carlin Rogers <ca...@gmail.com>.
Hey Eddie,

Yes, the mistake in the XSD was an oversight on my part. Good catch. 

I also agree that the clean up in PageFlowContextListener makes sense. Do 
you want me to make this patch? Thanks for looking at this.

Carlin


On 9/1/05, Eddie O'Neil <ek...@gmail.com> wrote:
> 
> 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
>