Announcement

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

    #16
    OK, we're out of speculations.. can you please simplify this down to a test case - shouldn't take very long given that you've got the viewState string, grid, DataSource and fields.

    Comment


      #17
      We've just made a change internally to get rid of the whitespace in the serialized view state info - should be much smaller now (available in the next nightly build)

      Thanks
      Isomorphic Software

      Comment


        #18
        Your product is awesome!!!

        I am having the same issue described in this thread: column size ok, hidden columns ok, column order not taken into account. Though for me, I only see the issue with grids using a datasource. Non-datasource grids are ok.

        Before I prepare an example, I would simply like to know if there has been any further investigation/development on your side. The thread seems to have dropped off in December.
        I am using GWT 2.2 with SGWT 2.4.
        (firefox 3.6.17, chrome 11.0.696.6, and IE6)

        Thank you

        Comment


          #19
          We did find and fix a similar issue where order was specifically not being applied with a filterEditor present. Can you try the latest nightly (from smartclient.com/builds) and let us know if this resolves the problem for you as well?

          Comment


            #20
            I am still seeing the problem. I even disabled the filterEditor.
            I will test a bit more and post an example case shortly.
            Thank you

            Comment


              #21
              Resolved. My problem seems to have come from using
              setUseAllDataSourceFields(true)

              Glad I did not waste your time.

              Thanks

              Comment


                #22
                Jay or Isomorphic,

                Did anything come of this? I am encountering the same problem, everything about the state is restored except the column order. I updated to the 7/19 nightly but encountered the same issue. If there are any clues as to what the triggering issue might be that would save me some time when boiling down a test case.

                Thanks,
                John

                Comment


                  #23
                  Other than making sure you call setViewState() after setDataSource() and setFields(), we don't have a cause in mind and no one has provided a test case.

                  Comment


                    #24
                    OK, Thanks. I will put together a test case and will either post the test case or the solution as the case may be.

                    Comment


                      #25
                      Notes from when I had the problem:
                      Are you hiding any columns via the datasource configuration?
                      have you set showDetails?
                      Are you creating/setting the ListGridFields? Maybe there is a conflict?
                      cheers

                      Comment


                        #26
                        Thanks Lextra. Yes, I do have a number of fields coming from the datasource that are configured as hidden. I had assumed that doing as much configuration as possible in the datasource was a best practice. It sounds like it may not be. I will eliminate the hidden setting and see if that clears the problem.
                        Thanks!

                        Comment


                          #27
                          It appears that the setting setUseAllDataSourceFields(true) is incompatible with setViewState(). Removing setUseAllDataSourceFields(true) resulted in the column ordering being restored properly. I don't recall why I had this setting included; all my fields come from the datasource and some are specified as hidden in the datasource.

                          Thank you Isomorphic and lextra for your comments.

                          Regards,
                          John

                          Comment


                            #28
                            Isomorphic - should setUseAllDataSourceFields(true) be incompatible with setViewState()? In our app we allow grid settings to be saved and restored on all grids, and in some cases we also use setUseAllDataSourceFields(true). I've confirmed what johnb discovered, that in the cases where we use setUseAllDataSourceFields(true) the column order is not restored.

                            Comment


                              #29
                              I confirm also that setUseAllDataSourceFields(true) is incompatible with setViewState() in Smart GWT 3.0.

                              Thanks for sharing your findings, I think that maybe there should be a cookbook topic with workarounds for known issues like this one.

                              Comment


                                #30
                                SmartClient Version: v10.0p_2015-02-09/Pro Deployment (built 2015-02-09)

                                I have run into this problem where all but column order is changed by calling setViewState.

                                I have a listgrid with the following DataSource, and if I setUseAllDataSourceFields(true) then the order of the columns is not changed by setViewState.

                                If I remove setUseAllDataSourceFields(true) then it works.

                                Problem is that I need setUseAllDataSourceFields(true) because some fields have OptionDataSources and CellFormatters.

                                Code:
                                <DataSource  
                                    ID="estimate_functionPoint_functionPoint"  
                                    serverConstructor="it.forecast.server.servlets.estimate.functionPoint.FunctionPointServlet">
                                    <fields>  
                                        <field name="functionPointId"   type="sequence"      hidden="true"            primaryKey="true"              />
                                        <field name="projectId"         type="integer"       hidden="true"                                           />
                                        <field name="title"             type="text"          title="Title"	required="true"  length="100" width="33%" />
                                        <field name="description"       type="text"          title="Description"                       length="3000" />
                                        <field name="team"				type="integer"       title="Team"			  width="110" 					/>
                                        <field name="subjectMatterExpert" type="text"		 title="Subject Matter Expert"				length="255" />
                                        <field name="reference" 		type="text"          title="Reference"							length="255" />
                                        <field name="type"              type="enum"          title="Type"             required="true"  width="65"     >
                                        	<valueMap>  
                                				<value>EI</value>
                                				<value>EO</value>
                                				<value>EQ</value>
                                				<value>ILF</value>
                                				<value>EIF</value>
                                			</valueMap>
                                		</field>
                                        <field name="complexity"        type="enum"          title="Complexity"       required="true"  width="85"     >
                                			<valueMap>  
                                				<value>LOW</value>
                                				<value>AVG</value>
                                				<value>HIGH</value>
                                			</valueMap>
                                		</field>
                                        <field name="count"             type="integer"       title="Count"            required="true"  length="4" 	width="75"  />
                                        <field name="functionPoint"     type="integer"       title="Function Points"                   			   	width="115" />
                                        <field name="effortRate"		type="integer"		title="Effort Rate"                    					width="75"  />
                                        <field name="hours"             type="integer"       title="Hours"                              			width="75"  />
                                        <field name="customerType"      type="integer"       title="Type"             required="true"	 			width="100"	/>
                                        <field name="cost"              type="float"       title="Cost"                               				width="75"  />
                                        <field name="milestone"         type="integer"       title="Milestone"													/>
                                        <field name="tag"               type="integer"       title="Tags"                                          	width="200" />
                                        <field name="historical"		type="boolean"		title="Historical"		canEdit="false"								/>
                                        <field name="configure"			type="icon"			title=""				canEdit="false"								/>
                                        <field name="copyAction"		type="icon"			title=""				canEdit="false"								/>
                                    </fields>
                                </DataSource>
                                Example of the viewState im applying:
                                Code:
                                ({field:[{name:\"title\",width:79},
                                {name:\"team\",width:81},
                                {name:\"subjectMatterExpert\",width:194},
                                {name:\"description\",width:127},
                                {name:\"reference\",width:115},
                                {name:\"type\",width:77},
                                {name:\"complexity\",width:123},
                                {name:\"count\",width:91},
                                {name:\"functionPoint\",width:156},
                                {name:\"effortRate\",width:124},
                                {name:\"hours\",width:90},
                                {name:\"customerType\",width:111},
                                {name:\"cost\",width:79},
                                {name:\"milestone\",width:114},
                                {name:\"tag\",width:77},
                                {name:\"historical\",autoFitWidth:true,width:86},
                                {name:\"configure\",autoFitWidth:true,width:20},
                                {name:\"copyAction\",autoFitWidth:true,width:20}]})

                                Comment

                                Working...
                                X