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

    Problem with DetailViewer display of enum value

    We are having what appears to be a problem with the display of a field value of type enum in the DetailViewer. This is with SmartClient 7.0 released.
    The DetailViewer in question is bound to a datasource where the relevant data field is defined as
            <field name="type" title="type" type="enum" >
    When the value of the "type" field is "complex", it is displayed correctly. If the value is "set" then the following string is displayed in the type field:

    function (_1, _2) {this[_1]=_2;this.dataChanged();}

    which looks like a fragment of SmartCllent code.
    I've checked the values returned from the server and they are indeed the strings "complex" or "set". When I examine the data for the DetailViewer (using the programmers console) when it is displaying the strange string, the type field contains the exact string "set" as the value.
    Other enumerated fields which do not include the possible value "set" also seem to display correctly in the same DetailViewer.

    That's the implementation of Array.set().

    Can you show the data you're returning or providing to this DetailViewer - any possibility you are accidentally using Arrays where you mean to use Objects (like having [] instead of {} in your code somewhere)?


      The data is coming into the DetailViewer from a drag/drop from a ListGrid. I don't see any involvement of an Array here and if you drag a different row with the value "complex" for the type column, then it is displayed correctly in the DetailViewer.

      Here is a snippet of the data coming into the ListGrid:

                  {dayportId:"CCOL.32803", objectName:"Znf_AN1",
                   description:"Zinc finger, AN1-type; InterPro Domain", metatype:"ComponentCollection",
                  {dayportId:"CCOL.32804", objectName:"NUDIX_hydrolase_NudL_CS",
                   description:"NUDIX hydrolase, NudL, conserved site; InterPro Conserved_site", metatype:"ComponentCollection",
      whereas this data (from the same listgrid) gets displayed OK in the DetailViewer:
                   objectName:"Insulin/Insulin/Insulin Ra/Insulin Ra/Insulin Rb/Insulin Rb", description:"Insulin/Insulin/Insulin Ra/Insulin Ra/Insulin Rb/Insulin Rb",
                   metatype:"ComponentCollection", type:"complex"},
                  {dayportId:"CCOL.54591", objectName:"TNF/TNF R/TRADD/MADD/cIAP/RIP/TRAF2/RAIDD",
                   description:"TNF/TNF R/TRADD/MADD/cIAP/RIP/TRAF2/RAIDD", metatype:"ComponentCollection",


        And here is the data contents for the DetailViewer when it is displaying the strange string:
        Evaluator: result of '' (0ms):
        {dayportId: "CCOL.32765",
        objectName: "UBQ-activ_enz_E1-like",
        description: "Ubiquitin-activating enzyme, E1-like; In..."[53],
        metatype: "ComponentCollection",
        type: "set",
        _selection_85: false}


          OK, we see a possible cause. Can you please revise your field definition to:

                  <field name="type" title="type" type="enum" >
                          <value ID="complex">complex</value>
                          <value ID="mixture">mixture</value>
                          <value ID="set">set</value>
                          <value ID="covalent">covalent</value>
          .. and let us know if this corrects the issue?


            I can reproduce this bug simply by using the javascript console to set the "type" field of the data object for this detail viewer to have the value "set" and doing a redisplay of that detail viewer. If I change the value to anything else, the value gets displayed correctly.


              Sorry, our replies crossed.
              Making that change to the field definition fixes the display issue.


                OK, the underlying issue has been fixed as well. If you encounter it again, the same workaround (making the valueMap an explicit stored/displayed mapping) will fix it.


                  OK, thanks for the help.