ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Heintz (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OFBIZ-4487) enable definition for position on sortfield
Date Mon, 07 Nov 2011 21:26:52 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Olivier Heintz updated OFBIZ-4487:
----------------------------------

    Attachment: sortFieldPosition2.patch

Erwan,

It's correct that it's not the same ouput.
in case one there is no field with position="1" so it's put in first column

It's exactly the same without the patch without extend
if you test with
    <form name="FindExamples" type="single" target="FindExample" default-entity-name="Example">
        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't
there then with all fields empty no query will be done --></field>
        <field name="exampleId" title="${uiLabelMap.ExampleExampleId}"><text-find/></field>
        <field name="exampleName" title="${uiLabelMap.CommonName}"><text-find/></field>
        <field name="exampleTypeId" title="${uiLabelMap.CommonType}">
            <drop-down allow-empty="true" current-description="">
                <entity-options description="${description}" key-field-name="exampleTypeId"
entity-name="ExampleType">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" position="2">
            <drop-down allow-empty="true" current-description="">
                <entity-options description="${description}" key-field-name="statusId"
entity-name="ExampleStatusItem"/>
            </drop-down>
        </field>
        <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit
button-type="button" image-location="/images/icons/magnifier.png"/></field>
        <sort-order>
            <field-group>
                <sort-field name="exampleId"/>
                <sort-field name="exampleName"/>
            </field-group>
            <field-group>
                <sort-field name="exampleTypeId"/>
                <sort-field name="statusId"/>
            </field-group>
            <sort-field name="searchButton"/>
        </sort-order>
    </form>

you will see.

But there is still a other problem with the proposed patch
the defaut position in sort field (if there is nothing, it's 1) override the position which
is given in field.
It's not correct, it should override only if value is given for position in sortfield.

so, with the new patch all seem correct for me.
                
> enable definition for position on sortfield
> -------------------------------------------
>
>                 Key: OFBIZ-4487
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4487
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: youssef khaye
>         Attachments: OFBIZ-4487-1.png, OFBIZ-4487-2.png, sortFieldPosition-exampleForms.patch,
sortFieldPosition.patch, sortFieldPosition2.patch
>
>
> in some cases, form extending another one, it may be convenient to be able to define
field position on the sort field element.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message