[jira] [Updated] (ISIS-996) Not possible to "replace" components in Wicket viewer (workaround is to use "add")

2019-01-06 Thread Dan Haywood (JIRA)


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

Dan Haywood updated ISIS-996:
-
Fix Version/s: (was: 2.7.0)
   1.20.0

> Not possible to "replace" components in Wicket viewer (workaround is to use 
> "add")
> --
>
> Key: ISIS-996
> URL: https://issues.apache.org/jira/browse/ISIS-996
> Project: Isis
>  Issue Type: Bug
>  Components: Core: Viewer: Wicket
>Affects Versions: viewer-wicket-1.7.0
>Reporter: Dan Haywood
>Priority: Minor
> Fix For: 1.20.0
>
>
> As per http://isis.markmail.org/thread/x3k2www3m2wfsgtv
> To recreate:
> - copy ReferencePanelFactory to ReferencePanelFactory2
> in (subclass of) IsisWicketApplication, add:
> {code}
> @com.google.inject.Singleton
> public static class MyComponentFactoryRegistrar extends 
> ComponentFactoryRegistrarDefault {
> @Override
> public void addComponentFactories(ComponentFactoryList 
> componentFactories) {
> super.addComponentFactories(componentFactories);
> componentFactories.replace(new ReferencePanelFactory2());
> }
> }
> {code}
> and
> {code}
> final Module overrides = new AbstractModule() {
> @Override
> protected void configure() {
>  ...
> bind(ComponentFactoryRegistrar.class).
> to(MyComponentFactoryRegistrar.class);
> }
> };
> {code}
> the issue is that "replace" ends up replacing all component factories of type 
> ComponentType.SCALAR_NAME_AND_VALUE, whereas it should instead just replace 
> the one for ReferencePanelFactory.
> The workaround is easy enough: call "add" (which puts new factory at 
> beginning of list) rather than "replace".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-996) Not possible to replace components in Wicket viewer (workaround is to use add)

2015-03-12 Thread Dan Haywood (JIRA)

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

Dan Haywood updated ISIS-996:
-
Fix Version/s: (was: core-1.9.0)
   core-1.10.0

 Not possible to replace components in Wicket viewer (workaround is to use 
 add)
 --

 Key: ISIS-996
 URL: https://issues.apache.org/jira/browse/ISIS-996
 Project: Isis
  Issue Type: Bug
  Components: Core: Viewer: Wicket
Affects Versions: viewer-wicket-1.7.0
Reporter: Dan Haywood
Assignee: Dan Haywood
Priority: Minor
 Fix For: core-1.10.0


 As per http://isis.markmail.org/thread/x3k2www3m2wfsgtv
 To recreate:
 - copy ReferencePanelFactory to ReferencePanelFactory2
 in (subclass of) IsisWicketApplication, add:
 {code}
 @com.google.inject.Singleton
 public static class MyComponentFactoryRegistrar extends 
 ComponentFactoryRegistrarDefault {
 @Override
 public void addComponentFactories(ComponentFactoryList 
 componentFactories) {
 super.addComponentFactories(componentFactories);
 componentFactories.replace(new ReferencePanelFactory2());
 }
 }
 {code}
 and
 {code}
 final Module overrides = new AbstractModule() {
 @Override
 protected void configure() {
  ...
 bind(ComponentFactoryRegistrar.class).
 to(MyComponentFactoryRegistrar.class);
 }
 };
 {code}
 the issue is that replace ends up replacing all component factories of type 
 ComponentType.SCALAR_NAME_AND_VALUE, whereas it should instead just replace 
 the one for ReferencePanelFactory.
 The workaround is easy enough: call add (which puts new factory at 
 beginning of list) rather than replace.



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