Hi,

no problem - I thought if setResponsePage(String) is internally checking if the 
String isAssignableFrom the class passed into the other methods this would be 
ok - but no problem with it - was only a suggestion.

kind regards

Tobias

> Am 08.03.2016 um 13:42 schrieb Martijn Dashorst <[email protected]>:
> 
> Count me too in the camp of "rather not". Using String-based coupling
> is something I loathe. If I wanted that, I'd use PHP.
> 
> Like Martin said, use registration or CDI or some other technology to
> achieve this. Adding setResponsePage(String) is the wrong direction.
> 
> Martijn
> 
>> On Tue, Mar 8, 2016 at 9:15 AM, Martin Grigorov <[email protected]> wrote:
>> 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
> 
> 
> 
> -- 
> Become a Wicket expert, learn from the best: http://wicketinaction.com

Reply via email to