Yes Jacques, you are right. I enabled the sorting only on columns where it
was working.
The others, being somehow calculated, are either not affected by the sort or
will result into an empty table when sorted.
-Bruno

2009/1/24 Jacques Le Roux <jacques.le.r...@les7arts.com>

> +1 (is this not possible on amounts, because they are calculated fields and
> not simply read from EE ?)
>
> Jacques
>
> From: "Bruno Busco" <bruno.bu...@gmail.com>
>
>  I have limited this change to those two screens to hear if we are all OK
>> with this pattern.
>> If yes I will go further trying to have all tables with the same sort
>> column
>> feature enabled (and the header-row-style="header-row-2").
>>
>> WDYT?
>>
>>
>> 2009/1/23 <bus...@apache.org>
>>
>>  Author: buscob
>>> Date: Fri Jan 23 12:34:40 2009
>>> New Revision: 737176
>>>
>>> URL: http://svn.apache.org/viewvc?rev=737176&view=rev
>>> Log:
>>> Enabled column sorting on FindInvoice and FindAgreements screens
>>>
>>> Modified:
>>>
>>>
>>>  
>>> ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml
>>>
>>>
>>>  
>>> ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
>>>
>>> Modified:
>>>
>>> ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml?rev=737176&r1=737175&r2=737176&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml
>>> (original)
>>> +++
>>>
>>> ofbiz/trunk/applications/accounting/webapp/accounting/agreement/AgreementForms.xml
>>> Fri Jan 23 12:34:40 2009
>>> @@ -50,27 +50,34 @@
>>>    </form>
>>>
>>>    <form name="ListAgreements" list-name="listIt" target="" title=""
>>> type="list" paginate-target="FindAgreement"
>>> -        odd-row-style="alternate-row" default-table-style="basic-table
>>> hover-bar">
>>> +        odd-row-style="alternate-row" default-table-style="basic-table
>>> hover-bar" header-row-style="header-row-2">
>>>        <actions>
>>> -          <set field="entityName" value="Agreement"/>
>>> -          <service service-name="performFind" result-map-name="result"
>>> result-map-list-name="listIt">
>>> -            <field-map field-name="inputFields"
>>> env-name="requestParameters"/>
>>> -            <field-map field-name="entityName" env-name="entityName"/>
>>> -          </service>
>>> +            <set field="entityName" value="Agreement"/>
>>> +            <service service-name="performFind" result-map-name="result"
>>> result-map-list-name="listIt">
>>> +                <field-map field-name="inputFields"
>>> env-name="requestParameters"/>
>>> +                <field-map field-name="entityName"
>>> env-name="entityName"/>
>>> +                <field-map field-name="orderBy"
>>> from-field="parameters.sortField"/>
>>> +            </service>
>>>        </actions>
>>>        <auto-fields-entity entity-name="Agreement"
>>> default-field-type="display"/>
>>> -        <field name="agreementId" title="${uiLabelMap.CommonEdit}"
>>> widget-style="buttontext">
>>> +        <field name="agreementId" title="${uiLabelMap.CommonEdit}"
>>> widget-style="buttontext" sort-field="true">
>>>            <hyperlink also-hidden="false" description="${agreementId}"
>>> target="EditAgreement?agreementId=${agreementId}"/>
>>>        </field>
>>> +        <field name="productId" sort-field="true"></field>
>>> +        <field name="partyIdFrom" sort-field="true"></field>
>>> +        <field name="partyIdTo" sort-field="true"></field>
>>>        <field name="roleTypeIdFrom"
>>> title="${uiLabelMap.AccountingRoleTypeIdFrom}"><hidden/></field>
>>> -        <field name="roleTypeIdTo"
>>> title="${uiLabelMap.AccountingRoleTypeIdTo}">
>>> +        <field name="roleTypeIdTo"
>>> title="${uiLabelMap.AccountingRoleTypeIdTo}" sort-field="true">
>>>            <display-entity entity-name="RoleType"
>>> key-field-name="roleTypeId"/>
>>>        </field>
>>> -        <field name="agreementTypeId"
>>> title="${uiLabelMap.AccountingAgreementTypeId}">
>>> +        <field name="agreementTypeId"
>>> title="${uiLabelMap.AccountingAgreementTypeId}" sort-field="true">
>>>            <display-entity entity-name="AgreementType"/>
>>>        </field>
>>> +        <field name="fromDate" sort-field="true"></field>
>>> +        <field name="thruDate" sort-field="true"></field>
>>>        <field name="agreementDate"
>>> title="${uiLabelMap.AccountingAgreementDate}"><hidden/></field>
>>>        <field name="textData"
>>> title="${uiLabelMap.AccountingTextData}"><hidden/></field>
>>> +        <field name="description" sort-field="true"></field>
>>>        <field name="cancelLink" title="${uiLabelMap.CommonEmptyHeader}"
>>> widget-style="buttontext">
>>>            <hyperlink target="cancelAgreement?agreementId=${agreementId}"
>>> description="${uiLabelMap.CommonCancel}" also-hidden="false"/>
>>>        </field>
>>>
>>> Modified:
>>>
>>> ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml?rev=737176&r1=737175&r2=737176&view=diff
>>>
>>>
>>> ==============================================================================
>>> ---
>>>
>>> ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
>>> (original)
>>> +++
>>>
>>> ofbiz/trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
>>> Fri Jan 23 12:34:40 2009
>>> @@ -46,12 +46,12 @@
>>>    </form>
>>>
>>>    <form name="ListInvoices" type="list" separate-columns="true"
>>> title="Invoice List" list-name="listIt" target=""
>>> default-entity-name="Invoice" paginate-target="findInvoices"
>>> -        odd-row-style="alternate-row" default-table-style="basic-table
>>> hover-bar">
>>> +        odd-row-style="alternate-row" header-row-style="header-row-2"
>>> default-table-style="basic-table hover-bar">
>>>        <actions>
>>>            <service service-name="performFind" result-map-name="result"
>>> result-map-list-name="listIt">
>>>                <field-map field-name="inputFields"
>>> env-name="parameters"/>
>>>                <field-map field-name="entityName" value="Invoice"/>
>>> -                <field-map field-name="orderBy" value="invoiceDate
>>> DESC"/>
>>> +                <field-map field-name="orderBy"
>>> from-field="parameters.sortField"/>
>>>            </service>
>>>        </actions>
>>>        <row-actions>
>>> @@ -69,14 +69,14 @@
>>>            <set field="total"
>>>
>>> value="${bsh:return(org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId));}"/>
>>>        </row-actions>
>>>
>>> -        <field name="invoiceId" widget-style="buttontext">
>>> +        <field name="invoiceId" widget-style="buttontext"
>>> sort-field="true">
>>>            <hyperlink description="${invoiceId}"
>>> target="invoiceOverview?invoiceId=${invoiceId}"/>
>>>        </field>
>>> -        <field name="invoiceTypeId"><display-entity
>>> entity-name="InvoiceType" description="${description}"/></field>
>>> -        <field name="invoiceDate"><display type="date"/></field>
>>> -        <field name="statusId"><display-entity entity-name="StatusItem"
>>> description="${description}"/></field>
>>> -        <field name="description"><display/></field>
>>> -        <field name="partyIdFrom">
>>> +        <field name="invoiceTypeId" sort-field="true"><display-entity
>>> entity-name="InvoiceType" description="${description}"/></field>
>>> +        <field name="invoiceDate" sort-field="true"><display
>>> type="date"/></field>
>>> +        <field name="statusId" sort-field="true"><display-entity
>>> entity-name="StatusItem" description="${description}"/></field>
>>> +        <field name="description" sort-field="true"><display/></field>
>>> +        <field name="partyIdFrom" sort-field="true">
>>>            <hyperlink
>>> target="/partymgr/control/PartyFinancialHistory?partyId=${partyIdFrom}"
>>> target-type="inter-app" description="${partyNameResultFrom.fullName}
>>> [${partyIdFrom}]"/>
>>>        </field>
>>>        <field name="partyIdTo" parameter-name="partyId">
>>>
>>>
>>>
>>>
>>
>

Reply via email to