cancel
Showing results for 
Search instead for 
Did you mean: 

Tabbed PropertySheet component

dhalupa
Champ on-the-rise
Champ on-the-rise
Hi there,

I would like to inform you that there is an extension of PropertySheetControl which enables PropertySheetItems to be renedered in tabs available. The layout itself is configurable through config file. For example, to acheive that cm:content type properties are shown in two distinct tabs you would put the following snippet to your web-client-config-custom file
<config evaluator="node-type" condition="content">
      <tab-panels>
         <!– tab-panel element also supports attributes label-id and description-id which
            should contain localized messages keys –>
         <tab-panel id="tab1" label="Test tab1" description="Test tab1">
            <!– name attribute should match property or association name of property-sheet component which is matched by enclosing evaluator –>
            <property name="name" />
            <property name="mimetype" />
            <property name="encoding" />
         </tab-panel>
         <tab-panel id="tab2" label="Test tab2" description="Test tab2">
            <property name="title" />
            <property name="description" />
            <property name="author" />
            <property name="size" />
         </tab-panel>
      </tab-panels>
   </config>
The extension, amp file and small installation guide are hosted on AlfrescoForge ( http://forge.alfresco.com/projects/tabbedpropsheet/ ). Hope that it will be usefull, and any suggestions and help is more than welcome

Kind regards,

Denis
20 REPLIES 20

tcordova
Champ in-the-making
Champ in-the-making
Another quick question…

I have a custom aspect with custom properties that I'm trying to display on one of the tabs.  Here's the aspect definition:


<aspects>
  <aspect name="dsa:approvalCycleDetails">
    <title>DSA Approval Cycle Details</title>
    <parent>cm:content</parent>
    <properties>
      <property name="dsa:status">
        <title>Current Status</title>
        <type>d:text</type>
        <constraints>
          <constraint ref="dsac:docStatus" />
        </constraints>
      </property>
    </properties>
  </aspect>
</aspects>

and here's the property sheet definition:


<config evaluator="aspect-name" condition="dsa:approvalCycleDetails">
  <tab-panels>
    <tab-panel id="tab1" label="General" description="General Properties that are common to all content types.">
      <property name="name" />
      <property name="title" />
      <property name="description" />
      <property name="author" />
      <property name="size" />
      <property name="mimetype" />
      <property name="encoding" />
    </tab-panel>
    <tab-panel id="tab2" label="Audit Info" description="Audit Properties">
      <property name="encoding" />
      <property name="dsa:status" />
      <property name="mimetype" />
      <property name="creator" />
      <property name="created" />
      <property name="modifier" />
      <property name="modified" />
    </tab-panel>
  </tab-panels>
</config>

the dsa:status property is the one I'm concerned about, as it doesn't show up at all.

Any idea what I may be doing wrong?

Thanks,

Tom

tcordova
Champ in-the-making
Champ in-the-making
Ok…  I just figured this one out…  I didn't realize you have to have a property sheet defined in order for the properties to be available.  So I've changed my web-client-config-custom.xml to this:


   <config evaluator="aspect-name" condition="dsa:approvalCycleDetails">
      <property-sheet>
         <show-property name="dsa:status" />
      </property-sheet>
      
      <tab-panels>
         <!– tab-panel element also supports attributes label-id and description-id which
            should contain localized messages keys –>
         <tab-panel id="tab1" label="General" description="General Properties that are common to all content types.">
            <!– name attibute should match property or association name of property-sheet component –>
            <property name="name" />
            <property name="title" />
            <property name="description" />
            <property name="author" />
            <property name="size" />
            <property name="mimetype" />
            <property name="encoding" />
         </tab-panel>
         <tab-panel id="tab2" label="Audit Info" description="Audit Properties that are common to all content types.">
            <property name="dsa:status" />
            <property name="mimetype" />
            <property name="creator" />
            <property name="created" />
            <property name="modifier" />
            <property name="modified" />
         </tab-panel>
      </tab-panels>
   </config>


and now it works!

jayjayecl
Confirmed Champ
Confirmed Champ
I can't get it work on Alfresco 3.1.
Having a look at a content details page, there is no Exception or error, there is just no difference with the basic Alfresco UI.

I'll have a look into the sources

jayjayecl
Confirmed Champ
Confirmed Champ
It worked by adding, in faces-config-custom.xml, the overriding of PropertySheet :

<component>
      <component-type>org.alfresco.faces.PropertySheet</component-type>
      <component-class>hr.virtus.component.property.UITabbedPropertySheet</component-class>
   </component>

dhalupa
Champ on-the-rise
Champ on-the-rise
I believe it was written in the installation instructions that faces-config-custom has to be edited..
If you decide to further develop it and you are willing to share the code, please let me know and I will add you to the forge project

Kind regards,

Denis

jayjayecl
Confirmed Champ
Confirmed Champ
OUps, sorry for not having read the instructions.
Usually, whan I find an amp file, I just think this is the whole of it and that I know perfectly how to install it.
Obviously I'm wrong Smiley Wink

One question still : why haven't you put the faces-config-custom in the amp file ?

If I go further on this project (Im pretty sur I will), I'll keep this topic updated and we'll maybe go on on the forge project.

Many thanks

dhalupa
Champ on-the-rise
Champ on-the-rise
OUps, sorry for not having read the instructions.
One question still : why haven't you put the faces-config-custom in the amp file ?

The reason is the fact that faces-config-custom is not module specific and if I packaged it within amp it might override someones changes.

br,

Denis

jayjayecl
Confirmed Champ
Confirmed Champ
Absolutely right, sorry.

I'm trying to adapt it to my custom Workflow.
Well done by the way.

dhalupa
Champ on-the-rise
Champ on-the-rise
Thanks, hope you'll get use of it..

btw..

<commercial-break>
if you do a lot of highly custom development on Alfresco, you might want to try Jibe framework. It boosted my performance in comparison to JSF. http://forge.alfresco.com/projects/jibe/
</commercial-break>

jayjayecl
Confirmed Champ
Confirmed Champ
Yeah, I think I'll have a look into it.
But right now I'm working for a huge customer, with already designed specifications etc …