Page 1 of 1

Tabs not displayed while adding custom entity

Posted: Sat Jun 21, 2014 9:53 am
by gowthamgutha
I have a custom entity for which I have several fields. It looks something like this..

Code: Select all

class MyEntity
{
    @Id
    @GeneratedValue()
    @Column(name = "ID")
    @AdminPresentation(friendlyName = "MYID", visibility = VisibilityEnum.HIDDEN_ALL)
    protected Long id;
   
    @Column(name = "sample")
    @AdminPresentation(friendlyName = "sample_column", excluded=true, visibility=VisibilityEnum.FORM_HIDDEN)
    protected String sample;

    @Column(name = "simple")
    @AdminPresentation(friendlyName = "simple_col", order = Presentation.FieldOrder.SIMPLE,
        group = Presentation.Group.Name.General, groupOrder = Presentation.Group.Order.General,
        prominent = true, gridOrder = 4)
    protected String simple;
   
    @Column(name = "ANOTHER_COL", nullable=false)
    @AdminPresentation(friendlyName = "another_col", requiredOverride = RequiredOverride.NOT_REQUIRED,
        tab = Presentation.Tab.Name.NEXT_TAB, tabOrder = Presentation.Tab.Order.NEXT_TAB,
        group = Presentation.Group.Name.NEXT_GROUP, groupOrder = Presentation.Group.Order.NEXT_GROUP)
    protected String anotherCol;

// ...
 }


The problem here is that, only general tab is being displayed but not other tabs 'while adding i.e. while clicking Add MyEntity'. However, while I am modifying them from the existing ones by clicking them via the grid, I am seeing all those tabs.

Now, How do I display them. I am getting the following kind of error.

Code: Select all

Error resolving template "fields/filter/media", template might not exist or might not be accessible by any of the configured Template Resolvers (components/partials/listGridHeaderFilter:21)

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "fields/filter/media", template might not exist or might not be accessible by any of the configured Template Resolvers (components/partials/listGridHeaderFilter:21)
   at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:245)
   at org.thymeleaf.standard.fragment.StandardFragment.extractFragment(StandardFragment.java:201)
   at org.thymeleaf.standard.processor.attr.AbstractStandardFragmentHandlingAttrProcessor.computeFragment(AbstractStandardFragmentHandlingAttrProcessor.java:71)
   at org.thymeleaf.processor.attr.AbstractFragmentHandlingAttrProcessor.processAttribute(AbstractFragmentHandlingAttrProcessor.java:62)
   at org.thymeleaf.processor.attr.AbstractAttrProcessor.doProcess(AbstractAttrProcessor.java:87)
   at org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212)
   at org.thymeleaf.dom.Node.applyNextProcessor(Node.java:1016)
   at org.thymeleaf.dom.Node.processNode(Node.java:971)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
   at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
   at org.thymeleaf.dom.Node.processNode(Node.java:990)
   at org.thymeleaf.dom.Document.process(Document.java:93)
   at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1155)
   at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
   at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
   at org.thymeleaf.spring3.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
   at org.thymeleaf.spring3.view.ThymeleafView.render(ThymeleafView.java:190)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
   at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
   at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:643)
   at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.broadleafcommerce.openadmin.web.compatibility.JSCompatibilityRequestFilter.doFilterInternal(JSCompatibilityRequestFilter.java:40)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.broadleafcommerce.openadmin.security.AdminSandBoxFilter.doFilterInternal(AdminSandBoxFilter.java:82)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.broadleafcommerce.common.web.util.PrecompressedArtifactFilter.doFilter(PrecompressedArtifactFilter.java:89)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
   at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:91)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.broadleafcommerce.common.security.handler.CsrfFilter.doFilter(CsrfFilter.java:85)
   at org.broadleafcommerce.openadmin.web.filter.AdminCsrfFilter.doFilter(AdminCsrfFilter.java:57)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   at org.broadleafcommerce.openadmin.web.filter.BroadleafAdminRequestFilter.doFilterInternal(BroadleafAdminRequestFilter.java:62)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:180)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
   at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
   at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
   at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
   at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
   at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1302)
   at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1302)
   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:448)
   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
   at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
   at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
   at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1067)
   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:377)
   at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
   at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1001)
   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
   at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
   at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
   at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
   at org.eclipse.jetty.server.Server.handle(Server.java:360)
   at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
   at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
   at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
   at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:622)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
   at java.lang.Thread.run(Unknown Source)

Re: Tabs not displayed while adding custom entity

Posted: Sat Jun 21, 2014 8:38 pm
by RapidTransit
Looks as though you have something marked prominent, so its being added to the list grid but BLC (Maybe Commercial Version has it?) is looking to add a filter that doesn't exist for Media type.

Re: Tabs not displayed while adding custom entity

Posted: Mon Jun 23, 2014 11:30 am
by phillipuniverse
This is a bug, could you please open this at https://github.com/BroadleafCommerce/Br ... rce/issues? The problem is that you have a prominent field of SupportedFieldType.MEDIA and we do not have a filter template defined for that field type. We probably will still not have the implementation of the filter template for that (or just have it be a string) but regardless it should not cause the exception that you are seeing.

You could also get around this in your own project by adding a file at this path in your admin project: /WEB-INF/templates/admin/fields/filter/media.html.