AnsweredAssumed Answered

Displaying image in content properties page

Question asked by sal on Nov 13, 2006
Latest reply on Nov 14, 2006 by gavinc
Hi all,

we are processing scanned documents with part of their text parsed via OCR.

In the edit properties page for scanned content we are trying to show the scanned in image to provide visual feedback to users entering/validating the OCR results.

We thought of using the SpaceIconPickerGenerator but we can't figure out how the SpaceIconPickerGenerator resolves to actual images.

We did the following:

Added an aspect (works OK)

   <aspects>
      <aspect name="ch:ocrDoc">
         <title>OCR test</title>
         <properties>
            <property name="ch:ocrText1">
               <type>d:text</type>
            </property>
            <property name="ch:ocrImage1">
               <type>d:text</type>
            </property>
         </properties>
      </aspect>
   </aspects>


Added an evaluator for the property sheet
Get "No icons found" in the page
and
WARN  [common.renderer.ImagePickerRadioRenderer] Failed to retrieve icons: javax.faces.el.PropertyNotFoundException: Bean: org.alfresco.web.bean.content.EditContentPropertiesDialog, property: icons


   <config evaluator="aspect-name" condition="ch:ocrDoc">
      <property-sheet>
         <show-property name="ch:ocrText1" />
         <show-property name="ch:ocrImage1" show-in-view-mode="true"
            display-label-id="icon"
            component-generator="SpaceIconPickerGenerator"
            ignore-if-missing="false" />
      </property-sheet>
   </config>


   <config evaluator="string-compare" condition="???? icons">
      <icons>
         <icon name="ch-icon-default" path="/images/icons/space-icon-default.gif" />
         <icon name="ch-icon-star" path="/images/icons/space-icon-star.gif" />
         <icon name="ch-icon-doc" path="/images/icons/space-icon-doc.gif" />
      </icons>
   </config>

Outcomes