枚举属性未显示在" SmartEdit内容"选项卡中

2020-09-14 12:02发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好团队,

我需要您的帮助来显示smartedit中的Enum属性。 我有一个名为FrwHomePageImageBannerComponent的组件,该组件具有一个enum属性,并且扩展了FrwImageComponent。 替代文本

下的items.xml的详细信息

我可以在smartedit中看到此componentType,并且在将组件拖放到内容插槽中时,它会显示内容向导,在该向导中,我可以看到Parent类FrwImageComponent的所有属性,但不能看到组件的enum属性! 您能告诉我如何使此Enum属性可见吗?

替代文本

(46.3 kB)

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好团队,

我需要您的帮助来显示smartedit中的Enum属性。 我有一个名为FrwHomePageImageBannerComponent的组件,该组件具有一个enum属性,并且扩展了FrwImageComponent。 替代文本

下的items.xml的详细信息

我可以在smartedit中看到此componentType,并且在将组件拖放到内容插槽中时,它会显示内容向导,在该向导中,我可以看到Parent类FrwImageComponent的所有属性,但不能看到组件的enum属性! 您能告诉我如何使此Enum属性可见吗?

替代文本

(46.3 kB)
付费偷看设置
发送
3条回答
xfwsx85
1楼-- · 2020-09-14 12:49

如果在item.xml中将enum声明为dynamic到true,则在CmsStructureEnumTypeComponentTypeAttributePopulator中为EnumConstants返回null。 这就是optionData列表为空的原因。 因此,此刻我已将动态Enum属性更改为false,因为此Enum是常数,不需要添加任何新值。

当dynamic属性为true时,它会导致Hybris枚举,而如果它为false,则会导致Java枚举。

问题已排序!

谢谢

大道至简
2楼-- · 2020-09-14 12:47

我遇到了同样的问题。 我有一个动态的枚举,在smartedit中看不到。

  1. 创建了谓词

  2. 创建了ComponentTypeAttributePopulator

  3. 创建了AttributeContentConverter

,它还可以用于动态枚举。

奄奄一息的小鱼
3楼-- · 2020-09-14 12:42

如您的评论所述,我尝试实现此动态枚举,但遇到此错误。

错误[hybrisHTTP36] [] [] [RestHandlerExceptionResolver] java.lang.IllegalArgumentException:com.chanel.hybris.core.enums.CarousalWidthEnum不是java.lang.Class.enumConstantDirectory(Class.java:3344 ),位于com.chanel.hybris.facades.predicate.attributeconverters.DynamicEnumAttributeContentConverter.convertDataToModel(DynamicEnumAttributeContentConverter.java:54)的java.lang.Enum.valueOf(Enum.java:232)处,网址为de.hybris.platform.cmsfacades.cmsitems。 在de.hybris.platform.cmsfacades.cmsitems.converter.DefaultCMSItemConverter.lambda $ 30(DefaultCMSItemConverter.java:610)在de.hybris.platform.cmsfacades.common.function上的converter.DefaultCMSItemConverter.lambda $ 10(DefaultCMSItemConverter.java:438)。 在de.hybris.platform.cmsfacades.common.function.ChainFunction.lambda $ 0(ChainFunction.java:43)处的Functions.lambda $ 0(Functions.java:42)在de.hybris.platform.cmsfacades.cmsitems.converter.DefaultCMSItemConverter。 位于de.hybris.platform.cmsfacades.cm的lambda $ 15(DefaultCMSItemConverter.java:636) sitems.converter.DefaultCMSItemConverter.lambda $ 4(DefaultCMSItemConverter.java:202)at java.util.stream.ForEachOps $ ForEachOp $ OfRef.accept(ForEachOps.java:184)at java.util.stream.ReferencePipeline $ 2 $ 1.accept(ReferencePipeline .java:175)处java.util.ArrayList $ ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)处java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)处java.util.stream.AbstractPipeline.wrapAndCopyInto( java.util.stream.ForEachOps $ ForEachOp.evaluateSequential(ForEachOps $ ForEachOp $ OfRef.evaluateSequential(ForEachOps.java:174)处的AbstractPipeline.java:471) .stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)at de.hybris.platform.cmsfacades.cmsitems.converter.DefaultCMSItemConverter.convertAndValidate(DefaultCMSItemConverter.java :187),位于de.hybris.platform.cmsfacades.cmsitems.converter.DefaultCMSItemConverter.lambda $ 3( 位于de.hybris.platform.cmsfacades.common.validator.impl.DefaultValidatableService.execute(DefaultValidatableService.java:38)处的DefaultCMSItemConverter.java:165)位于de.hybris.platform.cmsfacades.cmsitems.converter.DefaultCMSItemConverter.convert(DefaultCMSItemConverter。 java:165)at de.hybris.platform.cmsfacades.cmsitems.impl.DefaultCMSItemFacade.convertAndPopulate(DefaultCMSItemFacade.java:269)at de.hybris.cmsfacades.cmsitems.impl.DefaultCMSItemFacade.lambda $ 11(DefaultCMSItemFacadejava: )at de.hybris.platform.cmsfacades.cmsitems.impl.DefaultCMSItemFacade.lambda $ 4(DefaultCMSItemFacade.java:213)的org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) .cms2.common.service.impl.DefaultSessionSearchRestrictionDisabler $ 1.execute(DefaultSessionSearchRestrictionDisabler.java:43)位于de.hybris.platform.servicelayer.session.impl.DefaultSessionService.executeInLocalView(DefaultSessionService.java:89)位于de.hybris.platform。 位于de.hybris.platform.cmsfacades.cmsitems.impl.DefaultCMSItemFacade.saveItem(DefaultCMSItemFacade.java:207)上的cms2.common.service.impl.DefaultSessionSearchRestrictionDisabler.execute(DefaultSessionSearchRestrictionDisabler.java:35)在de.hybris.platform.cm 位于de.hybris.platform.cmswebservices.cmsitems.controller.CMSItemController.updateCMSItem(CMSItemController.java:194)的cmsitems.impl.DefaultCMSItemFacade.updateItem(DefaultCMSItemFacade.java:174)位于de.hybris.platform.cmswebservices.cmsitems.controller。 CMSItemController $$ FastClassBySpringCGLIB $$ 92c5591d.invoke()在org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)在org.springframework.aop.framework.CglibAopProxy $ CglibMethodInvocation.invokeJoinpoint。 )在org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)上的org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) )在org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)在org.springframework.aop.framework.CglibAopProxy $ DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)在de.hybris.platform.cmswebservices处。 cmsitems.controller.CMSItemController $$ EnhancerBySpringCGLIB $$ db0c9bd1.updateCMSItem()位于sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)位于sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)位于sun.reflect.Delegating (org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)上的java.lang.reflect.Method.invoke(Method.java:498)上的(DelegatingMethodAccessorImpl.java:43)。 位于org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)的web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) g.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)位于org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)位于 org.springframework.web.servlet上的org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)在org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)处。 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)位于org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:883)位于DispatcherServlet.doService(DispatcherServlet.java:901) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)处的.servlet.http.HttpServlet.service(HttpServlet.java:653)javax.servlet.http.HttpServlet.service(HttpServlet.java:731处) ),网址为org.apache.catalina。 org.apache.catalina上的core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)(位于org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java)的core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 52)在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)在de.hybris.platform.servicelayer.web .AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:301)在de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain $ StatisticsGatewayFilter.doFilter(AbstractPlatformFilterChain.java:390)在de.hybris.platform.servicelayer.web。$ .doFilter(AbstractPlatformFilterChain.java:271)位于de.hybris.platform.servicelayer.web.WebAppMediaFilter.doFilter(WebAppMediaFilter.java:140)位于de.hybris.platform.servicelayer.web.AbstractPlatformFilter org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:317)上的Chain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:271)在de.hybris.platform.webservicescommons.oauth2.HybrisOauth2UserFilter.doFilter(HybrisOauth2UserFilter.doFilter org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)上的.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)在org.springframework.security.web上 org.springframework的.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)在org.springframework org.springframework.security.web.authentication.AnonymousAuthenticationFilter上的.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)在org.springframework.security.web.authentication.AnonymousAuthenticationFilter org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)的org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170的.doFilter(AnonymousAuthenticationFilter.java:111) )的org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)的org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)的org.springframework.security。 org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProce上的web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331) org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)上的ssingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176) 64)位于org.springframework.security.web.Filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)位于org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)位于org.springframework.security.web org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)上的.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)在org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter (FilterChainProxy.java:331)在org.springframework.security处(org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)在org.springframework.security处。 org.springframework.security.web.FilterChainProxy $ VirtualFilterChain上的org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)处的web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:331)。 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)位于org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)位于do.hybris .platform.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:271)位于de.hybris.platform.cmswebservices.filter.RestSessionDataInjectionFilter.doFilter(RestSessionDataInjectionFilter.java:76)位于de.hybris.platform.servicelayer.web .hybris.platform.servicelayer.web.TenantActivationFilter.doFilter(TenantActivationFilter.java:88)的.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:271)在de.hybris.plat form.servicelayer.web.AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:271)在de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:44)在de.hybris.platform.servicelayer.web。 de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.processStandardFilterChain(AbstractPlatformFilterChain.java:201)处的AbstractPlatformFilterChain $ InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:271)在de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain(process。 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)的org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)的org.springframework.web.filter的java:179) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)的.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263) 位于org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain)上de.hybris.platform.webservicescommons.filter.SessionHidingFilter.doFilter(SessionHidingFilter.java:41)上的lina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)。 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)处de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:310)处org.apache.catalina.java org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)处的.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) )在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)在org.apache.catalina.valves.ErrorReportValve。 在org.apache.cat中调用(ErrorReportValve.java:103) org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683)的alina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 962)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler .process(AbstractProtocol.java:637)位于org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:318)位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)处的java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)在java.lang.Thread.run( Thread.java:748)

请让我知道解决方案。

一周热门 更多>