AnsweredAssumed Answered

form id and datalist view

Question asked by acurs on Dec 15, 2011
Latest reply on Jan 3, 2012 by acurs
Hi,
     I need to extend the datalist page to be able to navigate differents views of one datalist.
     I want to display 6 views of the datalist, where they offer different arrange of properties and controls, maybe a different datatable component…
     2 views are editable where the other 4 are view only….
     I've been told that in order to do that I should declare differents form id in the forms config, so this is what I did:


<?xml version="1.0" encoding="UTF-8"?>
<alfresco-config>
   <config evaluator="model-type" condition="pmtdl:WorkplanItem">
      <forms>
         <form>
            <field-visibility>
               <show id="pmtdl:OrderID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:Description" />
               <show id="pmtdl:Teamwork" />
               <show id="pmtdl:Importance" />
               <show id="pmtdl:BaselineStartDate" />
               <show id="pmtdl:BaselineDueDate" />
               <show id="pmtdl:BaselineDuration" />
               <show id="pmtdl:Assignee" />
               <show id="pmtdl:Predecessor" />
            </field-visibility>
         </form>

         <!– –>
         <form id="datagrid_PlanificationScheduleView">
            <field-visibility>
               <show id="pmtdl:OrderID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:Description" />
               `
               <show id="pmtdl:Teamwork" />
               <show id="pmtdl:Importance" />
               <show id="pmtdl:BaselineStartDate" />
               <show id="pmtdl:BaselineDueDate" />
               <show id="pmtdl:BaselineDuration" />
               <show id="pmtdl:Assignee" />
               <show id="pmtdl:Predecessor" />
            </field-visibility>
         </form>

         <form id="datagrid_PlannificationBudgetView">
            <field-visibility>
               <show id="pmtdl:OrderID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:BudgetDescription" />
               `
               <show id="pmtdl:BaselineCost" />
               <show id="pmtdl:Category" />
               <show id="pmtdl:FixedCost" />
               <show id="pmtdl:FixedPrice" />
               <show id="pmtdl:BudgetResponsible" />
               <show id="pmtdl:BudgetApprovedBy" />
            </field-visibility>
         </form>

         <form id="datagrid_ExecutionScheduleView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Semaphore" />
               <show id="pmtdl:Status" />
               <show id="pmtdl:Importance" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:Completion" />
               <show id="pmtdl:RealStartDate" />
               <show id="pmtdl:RealDueDate" />
               <show id="pmtdl:RealDuration" />
               <show id="pmtdl:Assignee" />
               <show id="pmtdl:Deliverables" />
            </field-visibility>
         </form>

         <form id="datagrid_ExecutionBudgetView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:BudgetDescription" />
               `
               <show id="pmtdl:Category" />
               <show id="pmtdl:ActualCost" />
               <show id="pmtdl:ActualRevenue" />
               <show id="pmtdl:PercInvested" />
               <show id="pmtdl:Profitability" />
               <show id="pmtdl:BudgetApprovedBy" />
            </field-visibility>
         </form>


         <form id="datagrid_BaselineFinanceView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:BaselineCost" />
               <show id="pmtdl:BaselineCostsVariance" />
               <show id="pmtdl:ExpectedRevenue" />
               <show id="pmtdl:BaselineRevenue" />
               <show id="pmtdl:BaselineRevenueVariance" />
            </field-visibility>
         </form>

         <form id="datagrid_BaselineScheduleView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:BaselineStartDate" />
               <show id="pmtdl:BaselineStartDateVariance" />
               <show id="pmtdl:BaselineDueDate" />
               <show id="pmtdl:BaselineDueDateVariance" />
               <show id="pmtdl:BaselbaselineDuration" />
               <show id="pmtdl:BaselineDurationVariance" />
            </field-visibility>
         </form>
      </forms>
   </config>


   <config evaluator="node-type" condition="pmtdl:WorkplanItem">
      <forms>
         <form>
            <field-visibility>
               <show id="pmtdl:OrderID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:Description" />
               <show id="pmtdl:Teamwork" />
               <show id="pmtdl:Importance" />
               <show id="pmtdl:BaselineStartDate" />
               <show id="pmtdl:BaselineDueDate" />
               <show id="pmtdl:BaselineDuration" />
               <show id="pmtdl:Assignee" />
               <show id="pmtdl:Predecessor" />
            </field-visibility>
         </form>

         <!– Data Grid view –>
         <form id="datagrid_PlanificationScheduleView">
            <field-visibility>
               <show id="pmtdl:OrderID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:Description" />
               `
               <show id="pmtdl:Teamwork" />
               <show id="pmtdl:Importance" />
               <show id="pmtdl:BaselineStartDate" />
               <show id="pmtdl:BaselineDueDate" />
               <show id="pmtdl:BaselineDuration" />
               <show id="pmtdl:Assignee" />
               <show id="pmtdl:Predecessor" />
            </field-visibility>
         </form>


         <form id="datagrid_PlannificationBudgetView">
            <field-visibility>
               <show id="pmtdl:OrderID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:BudgetDescription" />
               `
               <show id="pmtdl:BaselineCost" />
               <show id="pmtdl:Category" />
               <show id="pmtdl:FixedCost" />
               <show id="pmtdl:FixedPrice" />
               <show id="pmtdl:BudgetResponsible" />
               <show id="pmtdl:BudgetApprovedBy" />
            </field-visibility>
         </form>

         <form id="datagrid_ExecutionScheduleView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Semaphore" />
               <show id="pmtdl:Status" />
               <show id="pmtdl:Importance" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:Completion" />
               <show id="pmtdl:RealStartDate" />
               <show id="pmtdl:RealDueDate" />
               <show id="pmtdl:RealDuration" />
               <show id="pmtdl:Assignee" />
               <show id="pmtdl:Deliverables" />
            </field-visibility>
         </form>

         <form id="datagrid_ExecutionBudgetView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:BudgetDescription" />
               `
               <show id="pmtdl:Category" />
               <show id="pmtdl:ActualCost" />
               <show id="pmtdl:ActualRevenue" />
               <show id="pmtdl:PercInvested" />
               <show id="pmtdl:Profitability" />
               <show id="pmtdl:BudgetApprovedBy" />
            </field-visibility>
         </form>


         <form id="datagrid_BaselineFinanceView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:BaselineCost" />
               <show id="pmtdl:BaselineCostsVariance" />
               <show id="pmtdl:ExpectedRevenue" />
               <show id="pmtdl:BaselineRevenue" />
               <show id="pmtdl:BaselineRevenueVariance" />
            </field-visibility>
         </form>

         <form id="datagrid_BaselineScheduleView">
            <field-visibility>
               <show id="pmtdl:ID" />
               <show id="pmtdl:TaskType" />
               <show id="pmtdl:Name" />
               <show id="pmtdl:BaselineStartDate" />
               <show id="pmtdl:BaselineStartDateVariance" />
               <show id="pmtdl:BaselineDueDate" />
               <show id="pmtdl:BaselineDueDateVariance" />
               <show id="pmtdl:BaselbaselineDuration" />
               <show id="pmtdl:BaselineDurationVariance" />
            </field-visibility>
         </form>
      </forms>
   </config>
</alfresco-config>


After doing that, someone told me that Share always call the default form, and I should modify the form url to call each form id…
Have anyone tried to do this, where should I modify in order to display in the datatable the differents views?
I am thinking to copy the datalist page and customized,  define a region with a list of the views, or a combo box, that when selected one the datatable should render the view with the correspondent id…

If anyone could help me or guide me a little bit I will appreciate it a lot
cheers

Outcomes