Announcement

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

    optionDataSource not showing displayField

    I have a ListGrid with using a dataSource called "InterventionDS":

    Code:
    <DataSource
        ID="InterventionDS"
        serverType="generic"
    >
        <fields>
            <field name="drug" title="drug" type="text" required="true"  />
            <field name="drugName" title="drug name" type="text" hidden="true" />
    ...
    The drug field points to a drug table that has many records so I use the technique of creating a second field "drugName" as the displayField for "drug".

    Code:
    var grid = isc.ListGrid.create({
       dataSource: "InterventionDS",
       autoFetchDisplayMap: false,
       fields: [{name: "drug", width: 125, 
                 displayField: "drugName",
    	editorType: "ComboBox",
                 editorProperties: {							   showPickListOnKeypress: false,				   pickListCriteria: {metatype: "Drug"},
    	   getPickListFilterCriteria: function() {
    	        return {metatype: "Drug", name: this.getValue()};
    	   },
    	   optionDataSource: "genericNameSearch",
    	   valueField: "id",
    	   displayField: "name"}
     }, ...],
    ...
    When the gird is populated the names appear correctly. When I am editing the grid they do not. The valueField displays instead of the displayField. This is true for both creating a new record in the grid and for updating an existing record. Any record that is edited loses it's displayField mapping.

    When a new record is created and or updated on the server, the full record is always returned including the drugName.

    Do I have this set up properly? Also, what is the interaction between the ListGrid.displayField (drugName) and PickList.displayField (name)?

    Finally, is there a way using the ComboBox to do successive name completion so that every character typed further reduces the picklist?

    Thanks,
    pf

    #2
    Correction. The displayValue is only lost during edit update not during editNew()

    Comment


      #3
      We'll take a look but before we do can you confirm what exact version you're using? This is an area that has some somewhat recent fixes. If you haven't already it may be worth testing against the latest nightly build to see if the issue is already resolved.

      Thanks
      Isomorphic Software

      Comment


        #4
        I'm way back on rel 7.

        -pf

        Comment


          #5
          We'd suggest an upgrade to 8.1.
          In fact, we have an active 8.1 bugfix release branch with nightly builds available here http://www.smartclient.com/builds/SmartClient/8.1. This is a bug-fix only branch meaning the only changes from the official 8.1 release are bug fixes and it is considered stable.

          There have been numerous fixes since the 7.0 release and the framework is written to be backwards compatible so the upgrade process should be painless.

          It is likely this issue has been fixed since 7.0. If you do continue to see it against the latest 8.1 nightly we should be able to get it resolved in a nightly build and get you a fix pretty rapidly.

          Also, in case the upgrade doesn't fix it - the snippets included in your original post may be enough for us to reproduce the problem, however it's always best if you can show us a simple runnable test case that reproduces the issue. This ensures the problem is not caused by some other, seemingly unrelated part of your application code.

          Comment


            #6
            I am doing the upgrade to the most recent nightly build (8.1 10-25) but ran into a problem. Some of the skin components do not display properly. Specifically ListGrid headers, menu buttons, treegrid seem to be missing thier skin. Things like tabs and regular buttons display fine. It's as though part of the skin did not load.

            I'm seeing this in the log.
            === 2011-10-25 17:07:04,984 [ad-1] INFO ConfigLoader - Attempting to load framework.properties from CLASSPATH
            === 2011-10-25 17:07:05,046 [ad-1] INFO ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/Tomcat_6_0/webapps/ctp/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties
            === 2011-10-25 17:07:05,046 [ad-1] INFO ConfigLoader - Attempting to load project.properties from CLASSPATH
            === 2011-10-25 17:07:05,046 [ad-1] INFO ConfigLoader - Unable to locate project.properties in CLASSPATH
            === 2011-10-25 17:07:05,046 [ad-1] INFO ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/C:/Tomcat_6_0/webapps/ctp/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties
            === 2011-10-25 17:07:05,046 [ad-1] INFO ConfigLoader - Attempting to load server.properties from CLASSPATH
            === 2011-10-25 17:07:05,046 [ad-1] INFO ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/C:/Tomcat_6_0/webapps/ctp/WEB-INF/classes/server.properties

            ******************************
            (more log stuff below) The logging format seems to go haywire at isc.Application.create(
            *********************************

            === 2011-10-25 17:07:08,578 [80-2] INFO Download - Returning 304: Not modified on conditional get of: C:\Tomcat_6_0\webapps\ctp\isomorphic\system\modules\ISC_Forms.js
            === 2011-10-25 17:07:08,671 [80-1] INFO Download - Returning 304: Not modified on conditional get of: C:\Tomcat_6_0\webapps\ctp\isomorphic\system\modules\ISC_DataBinding.js
            === 2011-10-25 17:07:08,781 [80-2] INFO Download - Returning 304: Not modified on conditional get of: C:\Tomcat_6_0\webapps\ctp\isomorphic\skins\Enterprise\load_skin.js
            === 2011-10-25 17:07:09,015 [80-2] INFO RequestContext - URL: '/ctp/isomorphic/IDACall', User-Agent: 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; chromeframe/15.0.874.102; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)': MSIE with Accept-Encoding header, ready for compressed JS
            === 2011-10-25 17:07:09,031 [80-2] DEBUG XML - Parsed XML from (in memory stream): 0ms
            === 2011-10-25 17:07:09,031 [80-2] DEBUG XML - Parsed XML from C:\Tomcat_6_0\webapps\ctp\isomorphic\system\schema\List.ds.xml: 0ms
            === 2011-10-25 17:07:09,031 [80-2] DEBUG RPCManager - Processing 1 requests.
            === 2011-10-25 17:07:09,031 [80-2] DEBUG RPCManager - Request #1 (RPCRequest) data: {
            appID:"ctp",
            className:"loginHandler",
            methodName:"checkStatus",
            arguments:[
            null
            ],
            is_ISC_RPC_DMI:true
            }
            === 2011-10-25 17:07:09,031 [80-2] INFO IDACall - Performing 1 operation(s)
            === 2011-10-25 17:07:09,046 [80-2] DEBUG XML - Parsed XML from C:\Tomcat_6_0\webapps\ctp\shared\app\ctp.app.xml: 15ms
            === 2011-10-25 17:07:09,046 [80-2] DEBUG XML - Parsed XML from C:\Tomcat_6_0\webapps\ctp\isomorphic\system\schema\Method.ds.xml: 0ms
            === 2011-10-25 17:07:09,046 [80-2] DEBUG RPCDMI - appConfig: isc.Application.create({
            rpcBindings:[
            {
            ID:"loginHandler",
            className:"com.nofone.port.shared.dmi.LoginDMI",
            visibleMethods:[
            {
            name:"login"
            },
            {
            name:"checkStatus"
            },
            {
            name:"logout"
            }
            ]
            },
            {
            ID:"poCacheHandler",
            className:"com.nofone.port.shared.dmi.POCacheDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"initializeCache"
            },
            {
            name:"getLifeScienceObjects"
            },
            {
            name:"getObjectFinderFields"
            },
            {
            name:"getDefaultDataSource"
            },
            {
            name:"noOp"
            }
            ]
            },
            {
            ID:"reportHandler",
            className:"com.nofone.port.shared.dmi.ReportGeneratorDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"writeReport"
            },
            {
            name:"add"
            },
            {
            name:"fetch"
            },
            {
            name:"addVariant"
            }
            ]
            },
            {
            ID:"biomarkerHandler",
            className:"com.nofone.port.shared.dmi.BiomarkerTreeDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"add"
            },
            {
            name:"update"
            },
            {
            name:"fetch"
            },
            {
            name:"remove"
            },
            {
            name:"moveDiseaseMarker"
            }
            ]
            },
            {
            ID:"taskHandler",
            className:"com.nofone.port.shared.dmi.TaskDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"fetch"
            },
            {
            name:"getUserTasks"
            }
            ]
            },
            {
            ID:"persistentObjectHandler",
            className:"com.nofone.port.shared.dmi.PersistentObjectDMIFactory",
            lookupStyle:"factory",
            visibleMethods:[
            {
            name:"add"
            },
            {
            name:"fetch"
            },
            {
            name:"fetchRows"
            },
            {
            name:"update"
            },
            {
            name:"remove"
            },
            {
            name:"getValueMap"
            },
            {
            name:"findByPrimaryKey"
            },
            {
            name:"getDefaultEditFields"
            },
            {
            name:"getAllEditFields"
            }
            ]
            },
            {
            ID:"searchHandler",
            className:"com.nofone.port.shared.dmi.SearchDMI",
            visibleMethods:[
            {
            name:"add"
            },
            {
            name:"fetch"
            },
            {
            name:"update"
            },
            {
            name:"remove"
            },
            {
            name:"save"
            },
            {
            name:"saveSearches"
            },
            {
            name:"getDisplayString"
            },
            {
            name:"getSearchFields"
            },
            {
            name:"getColumnOptions"
            },
            {
            name:"getFilterDataSourceFields"
            },
            {
            name:"getSearchOperators"
            },
            {
            name:"initializeSearchManager"
            },
            {
            name:"executeSearch"
            },
            {
            name:"getSearchColumns"
            },
            {
            name:"setSearchColumns"
            },
            {
            name:"getCriteria"
            },
            {
            name:"searchByName"
            }
            ]
            },
            {
            ID:"showObjectHandler",
            className:"com.nofone.port.shared.dmi.ShowObjectDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"getObjectData"
            }
            ]
            },
            {
            ID:"patientCaseHandler",
            className:"com.nofone.port.shared.dmi.PatientCaseDMI",
            visibleMethods:[
            {
            name:"fetch"
            },
            {
            name:"add"
            },
            {
            name:"update"
            },
            {
            name:"remove"
            },
            {
            name:"newCaseNumber"
            },
            {
            name:"getCaseById"
            },
            {
            name:"getUserPatients"
            }
            ]
            },
            {
            ID:"caseTeamHandler",
            className:"com.nofone.port.shared.dmi.CaseTeamDMI",
            visibleMethods:[
            {
            name:"fetch"
            },
            {
            name:"add"
            },
            {
            name:"remove"
            }
            ]
            },
            {
            ID:"discussionHandler",
            className:"com.nofone.port.shared.dmi.DiscussionThreadDMIFactory",
            lookupStyle:"factory",
            visibleMethods:[
            {
            name:"fetch"
            },
            {
            name:"add"
            },
            {
            name:"update"
            },
            {
            name:"remove"
            },
            {
            name:"addAttachments"
            },
            {
            name:"getAttachments"
            }
            ]
            },
            {
            ID:"fileHandler",
            className:"com.nofone.port.shared.dmi.DocumentFileDMIFactory",
            lookupStyle:"factory",
            visibleMethods:[
            {
            name:"fetch"
            },
            {
            name:"add"
            },
            {
            name:"remove"
            }
            ]
            },
            {
            ID:"exportHandler",
            className:"com.nofone.port.shared.dmi.ExportDMI",
            visibleMethods:[
            {
            name:"exportResults"
            }
            ]
            },
            {
            ID:"testLabHandler",
            className:"com.nofone.port.shared.dmi.TestLabDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"add"
            },
            {
            name:"update"
            },
            {
            name:"fetch"
            },
            {
            name:"remove"
            }
            ]
            },
            {
            ID:"sampleHandler",
            className:"com.nofone.port.shared.dmi.SampleDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"add"
            },
            {
            name:"update"
            },
            {
            name:"fetch"
            },
            {
            name:"remove"
            }
            ]
            },
            {
            ID:"roleFeatureHandler",
            className:"com.nofone.port.shared.dmi.RoleFeatureDMI",
            lookupStyle:"new",
            visibleMethods:[
            {
            name:"updateFeatures"
            },
            {
            name:"fetch"
            }
            ]
            }
            ]
            })

            Comment


              #7
              The only jars I copied over were the bare minimum.

              isc.jakarta-oro
              isomorphic_assembly
              isomorphic_core_rpc

              Also coped over the tagLib, log4J properteis, server.properties and reconstructed the web.xml.

              Did I miss something?

              -paul

              Comment


                #8
                As a rule you should copy the full set of server jars across (go through the full process as detailed here:http://www.smartclient.com/docs/8.1/...up..iscInstall) rather than attempting to do a partial replacement of an earlier version's set of jars.

                Also of course you need to update the client side libraries by copying the isomorphic directory across to your deployment.

                In terms of skinning, if you are using a customized skin, you should be able to apply it to the new build. If you are using one of the shipped skins, you can continue to do so (we'd recommend using the new version).

                If you continue to see skinning problems, one possibility may be that you are seeing stale versions of the skin media due to having expires headers set such that the browser is not issuing fetch requests. You can check if this is the case by clearing your browser cache and reloading the page.
                Take a look at the docs on caching resources for more on this: http://www.smartclient.com/docs/8.1/...group..caching

                Comment


                  #9
                  Clearing the browser cache did the trick.

                  thanks
                  pf

                  Comment


                    #10
                    SmartGwt

                    In smartgwt using optiondatasource , the displayField value is not displaying in DetaiViewer while viewing but its displaying in the Grid.



                    Thanks,
                    Sathya.

                    Comment

                    Working...
                    X