Mike,

Not sure if it would have to be done in a way that you can specify which pages to inject stuff into. Maybe based on the Page interface-/ implementation classname. Otherwise you end up with all kinds of objects in page classes that do not want them. Although, I am not sure if this would be pose a problem or not. It would if you for example hat 2 different page classes that the project is split into, and they have the same property name with the same interface, but require different implementations. Does that make sense?

MARK


Not ideal, for sure.  I think part B of my proposal is much better --
an application.page file that has normal page-file semantics to
inject/add whatever is needed across all pages:

application.page file:
<page-specification>

  <inject property="fooService" object="service:mymodule.fooService"/>

</page-specification>

Then any page that wanted the FooService could just do:

public abstract MyPage extends BasePage {
  [...]

  public abstract FooService getFooService();

  [...]
}

The same would apply for properties/etc.  Seems useful, and the use
could be checked at compile time.

Think I might have a go at this.  Never really looked at the bowels of
tap, so this is all new to me.  Anyone have any pointers of where to
start?

-Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to