[ 
https://issues.apache.org/jira/browse/WICKET-6112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tobias Soloschenko updated WICKET-6112:
---------------------------------------
    Description: 
It would be very nice to be able to instantiate components in a decoupled way, 
so that jars might be dropped into the web apps lib folder and if they are 
present, the web app show new functionality.

Examples would look like this:

{code}
                String microservicePage = 
"wicket.microservices.service1.MicroservicePage1";
                add(new Link<String>("link")
                {
                        private static final long serialVersionUID = 1L;

                        @Override
                        public void onClick()
                        {
                                setResponsePage(microservicePage);
                        }
                        
                        @Override
                        protected void onConfigure()
                        {
                                
setVisible(Component.isAvailable(microservicePage));
                        }
                });
{code}

or like this

{code}
                String microservicePanel = 
"wicket.microservices.service2.MicroservicePanel2";
                if(Component.isAvailable(microservicePanel)){
                        add(Component.newInstance(microservicePanel,"Yay this 
is a label"));
                }else{
                        add(new EmptyPanel("panel"));
                }
{code}



  was:It would be very nice to be able to instantiate components in a decoupled 
way, so that jars might be dropped into the web apps lib folder and if they are 
present, the web app show new functionality.


> Microservices support (decoupled component usage)
> -------------------------------------------------
>
>                 Key: WICKET-6112
>                 URL: https://issues.apache.org/jira/browse/WICKET-6112
>             Project: Wicket
>          Issue Type: New Feature
>    Affects Versions: 8.0.0-M1
>            Reporter: Tobias Soloschenko
>            Assignee: Tobias Soloschenko
>             Fix For: 8.0.0-M1
>
>         Attachments: 0001-Microservices.patch
>
>
> It would be very nice to be able to instantiate components in a decoupled 
> way, so that jars might be dropped into the web apps lib folder and if they 
> are present, the web app show new functionality.
> Examples would look like this:
> {code}
>               String microservicePage = 
> "wicket.microservices.service1.MicroservicePage1";
>               add(new Link<String>("link")
>               {
>                       private static final long serialVersionUID = 1L;
>                       @Override
>                       public void onClick()
>                       {
>                               setResponsePage(microservicePage);
>                       }
>                       
>                       @Override
>                       protected void onConfigure()
>                       {
>                               
> setVisible(Component.isAvailable(microservicePage));
>                       }
>               });
> {code}
> or like this
> {code}
>               String microservicePanel = 
> "wicket.microservices.service2.MicroservicePanel2";
>               if(Component.isAvailable(microservicePanel)){
>                       add(Component.newInstance(microservicePanel,"Yay this 
> is a label"));
>               }else{
>                       add(new EmptyPanel("panel"));
>               }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to