cancel
Showing results for 
Search instead for 
Did you mean: 

Viewing (managing) Aspect on line

fabernate
Champ in-the-making
Champ in-the-making
Hi

is there a way to view Aspect I created via Java (OpenCmis) on line with Alfresco Explorer ?
and search they which  have some value ?

I created a model that Alfresco load on startup vith some properties and I just want view on line them !

Thanks
21 REPLIES 21

fabernate
Champ in-the-making
Champ in-the-making
Hi Jeff

now it starts, but I still can't see my properties

let's summarize

share-config-custom.xml

<alfresco-config>
   <config evaluator="string-compare" condition="DocumentLibrary">
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="lynx:docType"/>
            <aspect name="lynx:refId" />
         </visible>
         
         <addable>
         </addable>
         
         <removeable>
         </removeable>
      </aspects>
   </config>      
   <config evaluator="aspect" condition="lynx:documentable">
      <forms>
         <form>
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" />
            </field-visibility>
         <appearance>
            <field id="lynx:docType" label-id="prop.lynx_docType" />
            <field id="lynx:refId" label-id="prop.lynx_refId" />
         </appearance>
         </form>
      </forms>
   </config>
   
   <config evaluator="model-type" condition="lynx:documentable">
      <forms>
         <form id="search">
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" force="true" />
            </field-visibility>
         </form>
      </forms>
   </config>
   
   <config evaluator="node-type" condition="lynx:documentable">
      <forms>
         <form>
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" force="true" />
            </field-visibility>
         </form>
      </forms>
</config>

</alfresco-config>


custom-slingshot-application-context

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   
   <bean id="someco.resources"
   class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.web-extension.messages.lynxModel</value>
         </list>
      </property>
   </bean>
</beans>


lynxModel.properties

aspect.lynx_documentable=Document Properties
prop.lynx_docType=Document Type
prop.lynx_refId=ID Number

fabernate
Champ in-the-making
Champ in-the-making
note that I removed the ftl tags, am I right ?

jpotts
World-Class Innovator
World-Class Innovator
That's why they aren't showing up. You must have the appearance tags, like this:
<appearance>
<field id="lynx:docType" label-id="prop.lynx_docType" />
<field id="lynx:refId" label-id="prop.lynx_refId" />
</appearance>

So you must have both the field-visibility section with show elements and the appearance element with field elements, even if you are not overriding the default field controls.

Jeff

fabernate
Champ in-the-making
Champ in-the-making
I m sorry Jeff….again

<alfresco-config>
   <config evaluator="string-compare" condition="DocumentLibrary">
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="lynx:docType"/>
            <aspect name="lynx:refId" />
         </visible>
         
         <addable>
         </addable>
         
         <removeable>
         </removeable>
      </aspects>
   </config>      
   <config evaluator="aspect" condition="lynx:documentable">
      <forms>
         <form>
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" />
            </field-visibility>
         <appearance>
            <field id="lynx:docType" label-id="prop.lynx_docType" />
            <field id="lynx:refId" label-id="prop.lynx_refId" />
         </appearance>
         </form>
      </forms>
   </config>
   
   <config evaluator="model-type" condition="lynx:documentable">
      <forms>
         <form id="search">
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" force="true" />
            </field-visibility>
            <appearance>
               <field id="lynx:docType" label-id="prop.lynx_docType" />
               <field id="lynx:refId" label-id="prop.lynx_refId" />
            </appearance>
         </form>
      </forms>
   </config>
   
   <config evaluator="node-type" condition="lynx:documentable">
      <forms>
         <form>
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" force="true" />
            </field-visibility>
            <appearance>
               <field id="lynx:docType" label-id="prop.lynx_docType" />
               <field id="lynx:refId" label-id="prop.lynx_refId" />
            </appearance>
         </form>
      </forms>
</config>

</alfresco-config>

custom-slingshot-application-context

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

<bean id="someco.resources"
class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.web-extension.messages.lynxModel</value>
</list>
</property>
</bean>
</beans>


lynxModel.properties

aspect.lynx_documentable=Document Properties
prop.lynx_docType=Document Type
prop.lynx_refId=ID Number

Regards

jpotts
World-Class Innovator
World-Class Innovator
You are listing these two aspects in your <aspects> section:
<aspect name="lynx:docType"/>
<aspect name="lynx:refId" />

But then in your form config, you are listing these as if they are properties:
<field-visibility>
<show id="lynx:docType" />
<show id="lynx:refId" />
</field-visibility>
<appearance>
<field id="lynx:docType" label-id="prop.lynx_docType" />
<field id="lynx:refId" label-id="prop.lynx_refId" />
</appearance>

These two properties appear to belong to the lynx:documentable aspect. So your aspects element should look like:
<aspect name="lynx:documentable"/>

So fix that, then add the aspect to a document and see if those properties are displayed.

If they are not, please take a screenshot of the node in the node browser showing that the aspect has been applied to the node and that the properties have values. You can upload your screenshot to imgur.com and then include it here with an [image][/image] tag. Also take a screenshot of the detail page showing the absence of the properties.

Jeff

fabernate
Champ in-the-making
Champ in-the-making
Hi Jeff

I have used a template already present in the system and as you can see my prop appear

[img]http://i.imgur.com/8tewP.jpg[/img]

fabernate
Champ in-the-making
Champ in-the-making
I updated the the file, but it dosn't work anyway

<alfresco-config>
   <config evaluator="string-compare" condition="DocumentLibrary">
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="lynx:documentable"/>
         </visible>
         
         <addable>
         </addable>
         
         <removeable>
         </removeable>
      </aspects>
   </config>      
   <config evaluator="aspect" condition="lynx:documentable">
      <forms>
         <form>
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" />
            </field-visibility>
         <appearance>
            <field id="lynx:docType" label-id="prop.lynx_docType" />
            <field id="lynx:refId" label-id="prop.lynx_refId" />
         </appearance>
         </form>
      </forms>
   </config>
   
   <config evaluator="model-type" condition="lynx:documentable">
      <forms>
         <form id="search">
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" force="true" />
            </field-visibility>
            <appearance>
               <field id="lynx:docType" label-id="prop.lynx_docType" />
               <field id="lynx:refId" label-id="prop.lynx_refId" />
            </appearance>
         </form>
      </forms>
   </config>
   
   <config evaluator="node-type" condition="lynx:documentable">
      <forms>
         <form>
            <field-visibility>
               <show id="lynx:docType" />
               <show id="lynx:refId" force="true" />
            </field-visibility>
            <appearance>
               <field id="lynx:docType" label-id="prop.lynx_docType" />
               <field id="lynx:refId" label-id="prop.lynx_refId" />
            </appearance>
         </form>
      </forms>
   </config>

</alfresco-config>

fabernate
Champ in-the-making
Champ in-the-making
am I missing something else ?

jpotts
World-Class Innovator
World-Class Innovator
That's a screenshot of the Explorer client. But you want these to show up in the Share client, right?

Jeff

fabernate
Champ in-the-making
Champ in-the-making
Yes, I want those properties to show up on the details…
if I have understood what you meant….

what do you mean for 'these' ?

Thanks