3 Replies Latest reply: Jan 15, 2013 1:18 AM by 967104 RSS

    Showing Dimension counts for record results.

    Hoque
      Hi experts,


      In my application, I want to show dimension counts for record results. Support results contains 50 records, Out of 50 records, with Color=Red has 15 records. Therefore I want to display the Red Color results as -

      Color:
      Red (15)
      Silver(5)

      Like wise for other dimensions as well. As per the Endeca documentations, I guess "Drs" parameter is there to achieve it. If this is true then can you guys explain how the required functionality can be achieved using endea_jspref application . Or using presentation api, what kind of code should be written.

      Any input/ideas will be highly appreciated.

      Regards,
      Hoque
        • 1. Re: Showing Dimension counts for record results.
          SunilN
          Hi Hoque,

          If you are using java then below code will be help you
          You need to get refinement list for a dimension by

          DimValList refs = dimension.getRefinements();

          then

          for (int k=0; k < refs.size(); k++)
          {

               DimVal ref = refs.getDimValue(k);
               PropertyMap pmap = ref.getProperties();
               String dimesionstats = "";
               if (pmap.get("DGraph.Bins") != null )
          {
                    dimesionstats = " ("+pmap.get("DGraph.Bins")+")";
          }
          }

          Note: Please Enable Compute refinement Statistics for the dimension from developer studio.

          Thanks,
          Sunil
          • 2. Re: Showing Dimension counts for record results.
            Hoque
            Hi Sunil,

            Thank you boss!!! for your valuable inputs..



            Regards,
            Hoque
            • 3. Re: Showing Dimension counts for record results.
              967104
              Hi,
              in my code level i used like below to display num of records
              if you use RefinementMenu cartridge(in jsp RefinementMenu.jsp) you will get refinements in that content.

              <c:forEach items="${content.refinements}" var="refinement">
              <li>
              <dsp:include page="/renderNavLink.jsp">
              <dsp:param name="navAction" value="${refinement}"/>
              <dsp:param name="text" value="${refinement.label} (${refinement.count}) "/>
              </dsp:include>
              </li>
              </c:forEach>

              in above ${refinement.label} :: means the lable name(color:red,silver) and
              (${refinement.count}) :: means the no of records it has( red(10), silver(12))
              in renderlink.jsp i used to render content or navigation based on your click(red or silver)

              i think so it may help you from endeca Stuff.

              Regards
              Y.V.L