Hi Tobias,

I don't think this is a good idea.

My concerns:
- The usage of String for className. It could break after refactoring in
the "microservice" project. I.e. loosely typed and hard to maintain
- The knowledge about the sub-component (microservice, as you call it) in
the parent/main project. The parent project should not know about its
replaceable components.

IMO it should be the other way around - the modules should register them
into the application.
There are several attempts for such plugin based solutions. Recently a user
asked for help with wicket-spring injector to be able to use Spring child
contexts. OSGi integrations also try to accomplish the same.

Do you have a use case for this functionality or you try to implement
something generic that could be used by everyone ?


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Mar 7, 2016 at 4:43 PM, Tobias Soloschenko <
[email protected]> wrote:

> Hi all,
>
> I just want to discuss some changes to support web fragments. So if you
> dynamically place in some jars into the lib folder the web application
> would show some features provided by this modules.
>
> In a link for example the approach would be look like this:
>
> @Override
>
> public void onClick(){setResponsePage(
> "wicket.microservices.service1.MicroservicePage1");}
>
> @Override
>
> protected void
> onConfigure(){setVisible(Application.get().isComponentAvailable(
> "wicket.microservices.service1.MicroservicePage1"));}
>
> So if the module (jar) is available the link would be shown and it would
> set the response page to a page which is available in the module. If not
> the link would be not visible.
>
> For this I would add some methods:
>
> Application.isComponentAvailable(String)
>
> Component.setResponsePage(String)
>
> Component.setResponsePage(String,PageParameters)
>
> This is only an experiment and I would like to know if there are other
> places (e.g. forms, etc.) where we could add some "generic" methods to
> support web fragment behaviors like this.
>
>
> WDYT?
>
>
> kind regards
>
> Tobias
>

Reply via email to