Just a correction, that t:add is not just unnecessary, but it will be ignored if you specify the beanModel explicitly:
> A comma-seperated list of property names to be added to the > org.apache.tapestry5.beaneditor.BeanModel. Cells for added columns will be > blank unless a cell override is provided. This parameter is only used when > a default model is created automatically. http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Grid.html On Wed, Jun 29, 2016 at 5:57 PM, Chris Poulsen <mailingl...@nesluop.dk> wrote: > I'm guessing that something in the sorting part attempts to pull out the > value from your passed data source (possibly coerced from a collection). > > The thing is that your data source does not contain the property (as it is > synthetic) and you do not really pull the value from the data source ever, > but from the "getMyColumn3" getter instead. The sorting stuff that attempts > to extract the value for comparison has no way of knowing how to retrieve > the value as the conduit is null. > > In order to provide the grid with the means to extract the value for > "myColumn3" you should provide a conduit (can be done by creating a > BeanModel and adding your column(s) with proper conduits. Judging from your > example you can specify the data type as text (or string or what ever it is > called in DataTypeConstants). > > Then the override (p:myColumn3Cell) and the t:add="....." is not > necessary.. You can keep the override if you need to. > > -- > Chris > > On Wed, Jun 29, 2016 at 12:04 PM, Davide Vecchi <d...@amc.dk> wrote: > > > I changed my plan of finding out what causes this difference between > 5.3.7 > > and 5.3.8. Instead I will go with some re-design, using some suggestions > I > > got here. > > > > However I am still very interested in knowing whether my way of defining > > these t:add columns (pasted below) in general has something wrong or not > so > > right or not Tapestry-friendly. If it does, I might try to rectify that > to > > see if that helps. > > > > The column is defined like this: > > > > - In the page template, one param of the grid tag is > > > > t:add="prop:gridAdd" > > > > - In the page Java code, there is the corresponding > > > > public String getGridAdd() { > > return " myColumn1, myColumn2, myColumn3, myColumn4"; > > } > > > > where let's say that "myColumn3" is the column whose sorting fails. > > > > - In the page template, within the t:grid tag there is the definition of > > the customized content of that column: > > > > <p: myColumn3Cell>${ myColumn3}</p: myColumn3Cell> > > > > - In the page Java code, there is the method returning the value for that > > column: > > > > public String getMyColumn3() > > { > > return aStringThatIsNeverNull; > > } > > > > Thanks in advance for any possible feedback or hint or any related > thought. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- Dmitry Gusev AnjLab Team http://anjlab.com