AnsweredAssumed Answered

'hide' form sdk not working:advsearch share-config-custom

Question asked by dhartford on Apr 26, 2011
Latest reply on Apr 28, 2011 by dhartford
Hey all,
Just making sure I'm not crazy, is there only certain scenarios that 'hide' is allowed to work? Alfresco 3.4.d

Intent: For an Advanced Search Form, to hide some of the parent tags (cm:name, cm:createddate,etc) that are showing up even though I didn't declare them.

share-config-custom.xml


<config replace="true" evaluator="string-compare" condition="AdvancedSearch">
      <advanced-search>
         <forms>
<!–  disable default so only our document type shows up:
            <form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
            <form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
–>           
            <form id="mycustomsearch" label="mycustom" description="mycustom">mycustom:document</form>
         </forms>
      </advanced-search>
   </config>


  
<config evaluator="node-type" condition="mycustom:document">
    <forms>
       <form>
          <field-visibility>
<!–  these don't seem to matter
             <show id="cm:title" />
            
             <hide id="cm:name" />
             <hide id="cm:description" />
             <hide id="mimetype" />
             <hide id="cm:author"  />
             <hide id="size"  />
             <hide id="cm:creator"  />
             <hide id="cm:modifier"  />
             <hide id="cm:modified" />
             <show id="cm:created" for-mode="view" />
–>
             <show id="mycustom:fullname" />
       </form>
<!– search form id type, but doesn't seem to help –>
       <form id="search">
          <field-visibility>
<!–  these don't seem to matter
             <show id="cm:title" />
            
             <hide id="cm:name" />
             <hide id="cm:description" />
             <hide id="mimetype" />
             <hide id="cm:author"  />
             <hide id="size"  />
             <hide id="cm:creator"  />
             <hide id="cm:modifier"  />
             <hide id="cm:modified" />
             <show id="cm:created" for-mode="view" />
–>
             <show id="mycustom:fullname" />
       </form>

<!– trying form id from advsearch config –>
       <form id="mycustomsearch">
          <field-visibility>
<!–  these don't seem to matter
             <show id="cm:title" />
            
             <hide id="cm:name" />
             <hide id="cm:description" />
             <hide id="mimetype" />
             <hide id="cm:author"  />
             <hide id="size"  />
             <hide id="cm:creator"  />
             <hide id="cm:modifier"  />
             <hide id="cm:modified" />
             <show id="cm:created" for-mode="view" />
–>
             <show id="mycustom:fullname" />
       </form>

<!– page name is advsearch, trying that –>
       <form id="advsearch">
          <field-visibility>
<!–  these don't seem to matter
             <show id="cm:title" />
            
             <hide id="cm:name" />
             <hide id="cm:description" />
             <hide id="mimetype" />
             <hide id="cm:author"  />
             <hide id="size"  />
             <hide id="cm:creator"  />
             <hide id="cm:modifier"  />
             <hide id="cm:modified" />
             <show id="cm:created" for-mode="view" />
–>
             <show id="mycustom:fullname" />
       </form>




thanks for any help - my usecase is that the Full Name is working fine, but the cm:name that the model inherits from cm:content is visible as a search field causing confusion.

update:  ticket (vote if you having similar issues): http://issues.alfresco.com/jira/browse/ALF-8433


-D

Outcomes