Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Problem with ComboBoxItem filter

    Good morning,

    I'm using actually smartclient version 13.0-p20230720 power. I have a problem with an object type that I have been used already with smatclient version 10.0-p20150415.
    The object is a ComboBoxItem which has the ability to filter the content.

    isc.DynamicForm.create({
    ID: "form",
    width: 620,
    colWidths: [190, "*"],
    fields : [{
    name: "itemComb",
    title: "ComboBox",
    displayField: "code",
    valueField: "id",
    addUnknowValues: false,
    formatOnBlur: true,
    formatValue: function (value, record, form, item) {
    var selectedRecord = item.getSelectedRecord();
    if (selectedRecord != null) {
    return selectedRecord.code + " - " + selectedRecord.descr;
    } else {
    return value;
    }
    },
    formatEditorValue: function (value, record, form, item){
    var selectedRecord = item.getSelectedRecord();
    if (selectedRecord != null) {
    return selectedRecord.code + " - " + selectedRecord.descr;
    } else {
    return value;
    }
    },
    sortField: "code",
    pickListWidth: 200,
    pickListFields: [
    {
    name: "code",
    formatCellValue: function (value, record) {
    return record.code + " - " + record.descr;
    }
    }
    ],
    editorType: "ComboBoxItem",
    optionDataSource: "ComboDyn",
    wrapTitle: false,
    width: 200,
    valueMap: {
    43: '00001 - INDICE',
    44: '90000 - 90.000 CODES',
    45: 'A0000 - STANDARD'
    }
    }]
    });

    Datasource is:

    <DataSource
    dropExtraFields="true"
    ID="ComboDyn"
    serverType="generic">
    <fields>
    <field name="id" hidden="true" canEdit="false" required="false" type="text" autoGenerated="true" primaryKey="true"></field>
    <field name="code" canEdit="false" type="text" ></field>
    <field name="descr" canEdit="false" type="text" ></field>
    </fields>
    <serverObject lookupStyle="spring" bean="ComboDynDMI" className="..."/>
    </DataSource>

    In version 10.0-p20150415 this object correctly filter by code instead in version 13.0-p20230720 power the filter works incorrectly for id.
    Could you please help me with this problem.

    Thanks for any help.


    #2
    Hello, thanks for the test code, however, you did not mention what is actually going wrong.

    Please explain the problem in detail.

    Make sure to include client-side logs, server-side logs if applicable, and the server's response.

    Comment


      #3
      I would like in version 13.0-p20230720 power the object filters by code and not by id as it did in my test on version 10.0-p20150415.

      Do I need to change something in the construction of the object?

      Thanks.

      Comment


        #4
        Hello, thanks for the additional context. However, you have still not provided the basic information required, as explained above.

        We do have another level of service, where we can engage with you and figure out whatever the problem is, whether it's a problem with your application code or an actual bug in the SmartClient framework. If that seems appealing, please take a look here:

        https://smartclient.com/services/

        If that's not something that works for you, please take a look at the general posting guidelines (it appears underneath the text entry area, every time you post) as well as what has been reiterated here in our previous posts (#2, above).

        Comment

        Working...
        X