1 Reply Latest reply on Nov 26, 2009 8:31 AM by Lukas Krejci

    <c:simple-property> within <c:list-property> supported?

    Amit Bhayani Newbie

      Hi Guys,

      I have following defined in rhq-plugin.xml

      <c:list-property
       name="SbbAttachments">
       <c:simple-property
       name="SbbAttachment" />
       </c:list-property>


      But when page renders I get
      2009-11-26 18:22:50,870 INFO [org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl] Processed AV:[localhost][148][full] - need full=[false] in (61)ms
      2009-11-26 18:23:15,287 ERROR [facelets.viewhandler] Error Rendering View[/rhq/resource/operation/resourceOperationHistoryDetails.xhtml]
      java.lang.IllegalStateException: Only maps of simple properties are supported.
       at org.rhq.core.gui.configuration.AbstractPropertyBagUIComponentTreeFactory.validateMapDefinition(AbstractPropertyBagUIComponentTreeFactory.java:668)
       at org.rhq.core.gui.configuration.AbstractPropertyBagUIComponentTreeFactory.addListMemberMapProperties(AbstractPropertyBagUIComponentTreeFactory.java:490)
       at org.rhq.core.gui.configuration.AbstractPropertyBagUIComponentTreeFactory.addListProperty(AbstractPropertyBagUIComponentTreeFactory.java:466)
       at org.rhq.core.gui.configuration.AbstractPropertyBagUIComponentTreeFactory.addProperty(AbstractPropertyBagUIComponentTreeFactory.java:284)
       at org.rhq.core.gui.configuration.AbstractPropertyBagUIComponentTreeFactory.createUIComponentTree(AbstractPropertyBagUIComponentTreeFactory.java:168)
       at org.rhq.core.gui.configuration.ConfigRenderer.addNonGroupedProperties(ConfigRenderer.java:408)
       at org.rhq.core.gui.configuration.ConfigRenderer.addConfiguration(ConfigRenderer.java:398)
       at org.rhq.core.gui.configuration.ConfigRenderer.addChildComponents(ConfigRenderer.java:255)
       at org.rhq.core.gui.configuration.ConfigRenderer.encodeBegin(ConfigRenderer.java:162)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
       at org.rhq.enterprise.gui.common.framework.FaceletRedirectionViewHandler.renderView(FaceletRedirectionViewHandler.java:64)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
       at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.rhq.enterprise.gui.legacy.WebUserTrackingFilter.doFilter(WebUserTrackingFilter.java:47)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:129)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.rhq.enterprise.gui.common.upload.MultipartFilter.doFilter(MultipartFilter.java:63)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
       at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)


      I am using RHQ 1.4.0-SNAPSHOT

      Is it necessary to declare <c:map-property> within list first?



        • 1. Re: <c:simple-property> within <c:list-property> supported?
          Lukas Krejci Apprentice

          Hello,

          while nothing in the configuration model or the xsd schema disallows your construct (and in many cases such constructs make sense), our UI code currently is only able to render lists of maps (as tables).
          So you're right that for the config to show correctly in the RHQ UI, you need to add an intermediate map between the list and the simple property to make it a table:

          <c:list-property name="SbbAttachments">
           <c:map-property name="SbbAttachment">
           <c:simple-property name="SbbAttachmentValue" />
           </c:map-property>
          </c:list-property>