Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

displayField not working correctly in my SelectItem dropdowns

$
0
0
Dropdowns in my applications are displaying their "valueField" data when the page loads, rather than the correct displayField data. If the user clicks on the dropdowns, it populates with the correct displayField text.

Also, there is output from dropdowns displaying in my Firebug console. The Firebug output stops if I comment out the "displayField" parameter of the dropdowns.

The attachments for this thread include screenshots of the error, and how the text should look, and the Firebug output.


Please help. Thanks!

==============

*SmartClient:
SmartClient Version: v10.0p_2015-02-13/LGPL Deployment (built 2015-02-13)

*Browser:
Firefox 36.0.1:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

*Code snippet:

I can send a zip of the stripped-down application if needed, but the dropdowns look pretty standard to me. For example:

Code:

        this.billToCustomerInfoDForm = isc.DynamicForm.create({
            parent: this,
            name: "billToCustomerInfoDForm",
            validateForm: true,
            margin: 4,
            dataSource: isc.EASDataSources.CMR.customerBillTo,
            autoFetchData: false,
            colWidths: ["0%", "*"],
            itemHoverWidth: 300,
            fields: [
                {type: "header",
                    defaultValue: "Basic Customer Information",
                    align: "center"
                },
                {name: "CUSTOMER_GROUP",
                    title: "Customer Group",
                    titleStyle: "formTitleRequired",
//                    //isProtected: true,
                    tabIndex: 500,
                    prompt: "Customer Group",
                    editorType: "SelectItem",
                    autoFetchData: false,
                    width: 200,
                    wrapTitle: false,
                    optionDataSource: isc.EASDataSources.CMR.customerGroupsDS,
                    displayField: "CUSTOMER_GROUP_LBL",
                    valueField: "CUSTOMER_GROUP_VAL",
                    defaultValue: "999",
                    validators: [{type: "requiredIfFormValidates"}],
                    pickListWidth: 500,
                    pickListFields: [
                        {name: "CUSTOMER_GROUP_VAL", title: "ID", width: 30},
                        {name: "CUSTOMER_GROUP_LBL", title: "Name"}
                    ]
                },
            ]
        });


Attached Images
File Type: gif dropdown_fields_onload.gif (50.3 KB)
File Type: gif correct_dd_text.gif (33.5 KB)
File Type: gif firebug_dropdown_output.gif (58.5 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles