[jira] [Comment Edited] (ISIS-1705) Addon module isis-module-settings is not working after upgrade to Isis 1.15.0
[ https://issues.apache.org/jira/browse/ISIS-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16143600#comment-16143600 ] Vladimir Nisevic edited comment on ISIS-1705 at 8/28/17 10:24 AM: -- Hi Dan, I have done some analysis and found next behaviour in the *org.apache.isis.viewer.wicket.ui.components.entity.fieldset.PropertyGroup* you filter out the properties which are hidden... {code} private ImmutableList getObjectAssociations( final List properties, final ObjectAdapter adapter) { // // previously we filtered out any invisible properties. // However, the inline prompt/don't redirect logic introduced in 1.15.0 means that we keep the same page, // and it may be that individual properties start out as invisible but then become visible later. // // therefore the responsibility of determining whether an individual property's component should be visible // or not moves to ScalarPanelAbstract2#onConfigure(...) // return FluentIterable.from(properties) .filter(new Predicate() { @Override public boolean apply(final PropertyLayoutData propertyLayoutData) { return propertyLayoutData.getMetadataError() == null; } }) .transform(new Function() { @Override public ObjectAssociation apply(final PropertyLayoutData propertyLayoutData) { ObjectSpecification adapterSpecification = adapter.getSpecification(); try { // this shouldn't happen, but has been reported (https://issues.apache.org/jira/browse/ISIS-1574), // suggesting that in some cases the GridService can get it wrong. This is therefore a hack... return adapterSpecification.getAssociation(propertyLayoutData.getId()); } catch (ObjectSpecificationException e) { return null; } } }) .filter(new Predicate() { @Override public boolean apply(@Nullable final ObjectAssociation objectAssociation) { if(objectAssociation == null) { return false; } final HiddenFacet facet = objectAssociation.getFacet(HiddenFacet.class); if(facet != null && !facet.isNoop()) { // static invisible. if(facet.where() == Where.EVERYWHERE || facet.where() == Where.OBJECT_FORMS) { return false; } } return true; } }) .toList(); } {code} but in the case of *org.isisaddons.module.settings.dom.SettingAbstract* , in property e.g. *getValueAsInt()* decision of hidden is done by supporting method {code} @Property( hidden = Where.ALL_TABLES ) public Integer getValueAsInt() { return parseValueAsInt(); } public boolean hideValueAsInt() { return typeIsNot(SettingType.INT); } {code} this is not honoured by the filter method above and therefore all *getValueAsXxx* are still there and evaluated when building the GUI. Not sure if I am on right path... BR,Vladimir was (Author: niv): Hi Dan, I have done some analysis and found next behaviour in the *org.apache.isis.viewer.wicket.ui.components.entity.fieldset.PropertyGroup* you filter out the properties which are hidden... {code} private ImmutableList getObjectAssociations( final List properties, final ObjectAdapter adapter) { // // previously we filtered out any invisible properties. // However, the inline prompt/don't redirect logic introduced in 1.15.0 means that we keep the same page, // and it may be that individual properties start out as invisible but then become visible later. // // therefore the responsibility of determining whether an individual property's component should be visible // or not moves to ScalarPanelAbstract2#onConfigure(...) // return FluentIterable.from(properties) .filter(new Predicate() { @Override public boolean apply(final PropertyLayoutData propertyLayoutData) { return propertyLayoutData.getMetadataError() == null; } }) .transform(new Function () { @Override public ObjectAssociation apply(final PropertyLayoutData propertyLayoutData) { ObjectSpecification adapterSpecification =
[jira] [Updated] (ISIS-1705) Addon module isis-module-settings is not working after upgrade to Isis 1.15.0
[ https://issues.apache.org/jira/browse/ISIS-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Nisevic updated ISIS-1705: --- Description: Here the mail thread describing the issue: https://www.mail-archive.com/users@isis.apache.org/msg05286.html h1. How to reproduce * Integrate addon with simpleapp * Try to create an Application Settings "New String" Exception {code} 07:45:49,678 [RequestCycleExtraqtp942986815-17 WARN ] Handling the following exception org.apache.wicket.WicketRuntimeException: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at org.apache.wicket.ajax.markup.html.form.AjaxButton$1@302b1c47 on component [IndicatingAjaxButton [Component id = okButton]] threw an exception at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:524) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at