This project is read-only.

List, Detail, Search Improvements

Jan 20, 2010 at 3:06 PM

Dear Radim

I have checked result application and have founded place to improve result application.
so, if we override OnListToDisplay method in "BaseEntityController" class :


<font size="2" color="#0000ff"><font size="2" color="#0000ff">


</font></font><font size="2" color="#0000ff">



override void OnListToDisplay() {



      List<PropertyInfo> itemsToShow = GetEntityPropertiesToshowOnlist();
Model.ListModel.ItemsToDisplay = Facade.GetBySearch(Model.SearchParam).Select(
                            i => new ItemToDisplay() {
ID = i.ID,           Description = i.ToDisplay(),
                                     Items = itemsToShow.Select(
item =>new HeaderDescription() { HeaderName = item.Name, Value = item.GetValue(i, null) as string} as IHeaderDescription


<font size="2"><font size="2">


</font></font><font size="2">



                            })  as IItemToDisplay);



    <font size="2" color="#0000ff"><font size="2" color="#0000ff">


</font></font><font size="2" color="#0000ff">



List<PropertyInfo> GetEntityPropertiesToshowOnlist()


<font size="2">

we could generate list model automatically, with possibility to override


  method on "special" controller side (when we need this.

In additional Edit form could be generated automatically too:


Jan 20, 2010 at 6:32 PM

Hi Nocher

That is really good suggestion! I like it!!! Why? No more strings :) and that means easier maintanance...
We have another interesting solution to this, which should be embeded in the next release. (I'll append the description here than)

Nocher, thank you for that note, tremendous. Great that you've spent some time to write it down.

Enjoy Catharsis.

Radim Köhler

PS: For other readers, I guess that the above note is broken in the matter of the HTML generated by codeplex system. So be patient to find the content