StrataFrame Forum

Listview error in 1.65 web app

http://forum.strataframe.net/Topic14392.aspx

By Mark Dowlearn - 2/14/2008

 Hello -

I'm just starting a web app in 1.65 and was doing some 'fooling around'.  Inserted a listview into a page, and after setting the population settings using a registered BO, received a design time error message that "an unhandled exception has occurred.  MicroFour.StrataFrame.UI.Web.WebListViewPopulationColumnCollection must have items of type MicroFour.StrataFrame.UI.Web.WebListViewPopulationColumn."  There was more, but in essense it was saying that instead of getting the type it was expecting, it was getting a populationcolumn of type System.Web.UI.HtmlControls.HtmlGenericControl.

The project built successfully, but yield the following error at runtime:

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: MicroFour.StrataFrame.UI.Web.WebListViewPopulationColumnCollection must have items of type 'MicroFour.StrataFrame.UI.Web.WebListViewPopulationColumn'. 'microfour.strataframe.ui.web.weblistviewpopulationcolumn' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

Source Error:

Line 33BigGrinisplayFieldNames="cSiteName|" MethodToExecute="FillAll;">
Line 34:<FormatColumns>
Line 35:<microfour.strataframe.ui.web.weblistviewpopulationcolumn columnalignment="Left" 
Line 36:columnheader="Site Name" columnwidth="120pc" formatstring="{0}" 
Line 37: headeralignment="Left" populationtype="FormattedString"></microfour.strataframe.ui.web.weblistviewpopulationcolumn>
Thanks in advance ....
By Trent L. Taylor - 2/15/2008

Mark,

It appears that there is a pipe sign after the DisplayFieldNames, which should not be there.  You might check your display member settings as well as the values supplied for each column.  I know that the 1.6.5 beta ListView works as I created one in the past few days (though there could always be something that manifests itself under certain circumstances).  Check your display column values and if it still doesn't work, then we can dig a little deeper.

By Mark Dowlearn - 2/15/2008

Trent -

You're right -- there does appear to be a pipe there.  However, this is not something I added -- looks like it's being automatically generated when using the PopulationDataSourceSettings during design time.

In any case, I took it out manually, and I still have the same error.  

In addition, I'm experiencing some anomalies when I try to open previous solutions -

  • SF TagPrefixes not registered on projects created earlier
  • inability to bind to WebBusinessBindingSource when using some (not all) devExpress list controls.

Also -- where is the global.asax file?  I tried opening a previous project that was created as a "web site", and it has the global.asax file where I set the DataSource settings. 

When I created this newest project, it was done as a web application -- and there's no global.asax file in it.

Help, I'm confused and under a deadline!  w00t

m

By Mark Dowlearn - 2/15/2008

Here's a screenshot of the design time error I'm getting on the listview control ....
By Trent L. Taylor - 2/15/2008

  • SF TagPrefixes not registered on projects created earlier
  • Hmmm....I am not sure about this.  All previous projects that I had setup seem to have them.  There could be something else going on here.  I will have to look into this some more.

    inability to bind to WebBusinessBindingSource when using some (not all) devExpress list controls.

    Yeah, we already know about this.  Generally this relates to some of their grid type controls and it depends on what you are trying to do.  I have a note to look at this before the 1.6.5 final build, but I haven't setup a sample or scenario yet in which this fails.  You are welcome to create a sample using the StrataFrameSample database (or whatever works best for you) to reproduce the issue so that we can better understand what you are running into.

    Also -- where is the global.asax file?  I tried opening a previous project that was created as a "web site", and it has the global.asax file where I set the DataSource settings. 

    Apparently this template has always left this out.  I will add it to the template for the next update, but the reason it was probably never reported as there really isn't much that needs to be done.  Just manually create a new "Global Application Class."  Once added, open it up and add your data source connections in the Application_Start method:

    MicroFour.StrataFrame.Data.Databasics.DataSources.Add(New SqlDataSourceItem("","My Connection String"))

    Help, I'm confused and under a deadline!

    I think that this is just the nature of development....I have two separate project deadlines I am trying to hit as also.  I am sure that you live the 7 day a week 10+ hour days life as well Smile

    Here's a screenshot of the design time error I'm getting on the listview control ....

    This looks like another applicaiton template issue.  You can fix this by either adding a Register tag at the top of each page....or adding the below code in the web.config file.  You will want to add this to the <pages></pages> section:

    <controls>
                <add tagPrefix="SFWeb" namespace="MicroFour.StrataFrame.UI.Web" assembly="MicroFour StrataFrame UI, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7"/>
                <add tagPrefix="SFWeb" namespace="MicroFour.StrataFrame.UI.Web" assembly="MicroFour StrataFrame Business, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7"/>
                <add tagPrefix="SFWeb" namespace="MicroFour.StrataFrame.UI.Web" assembly="MicroFour StrataFrame Base, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7"/>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
              </controls>

    You will then want to delete the tag in your aspx page that probably has a definition of MicroFour.StrataFrame.UI.Web and a tag prefix of cc1, otherwise it will try to "double-dip" when creating the columns and give you an error.  I reproduced this and will fix the template.  But just add these tags to your web.config file and it should get you going.

    By Mark Dowlearn - 2/15/2008

    Trent -

    Your suggestions are on the mark and I'm up and running.  One note -- the pipe after the field name is still being generated by the PopulationDataSourceSettings designer, but it doesnt' appear to impede anything.  So it's not the culprit ....

    I did see where my earlier web.config had the PrefixTag entries in it and the new one didn't.  So that was definitely the problem.

    The devExpress ASPxGridView generates an error ("Error Rendering Control"), but the ASPxDataView seems to work ok thus far.  I understand this is something you have addressed yet -- just thought you might like to know ....

    Thanks again for your help!

    Gratefully,

    m

    By Mark Dowlearn - 2/15/2008

    Trent -

    FYI, on further testing, it looks like the problem with the devExpress ASPxGridView (and the standard GridView, for that matter) is with GUIDs.  Also, the standard Gridview indicates that the WebBusinessBindingSource does not support paging.  Is this correct?

    Mark

    By Trent L. Taylor - 2/15/2008

    Also, the standard Gridview indicates that the WebBusinessBindingSource does not support paging.  Is this correct?

    Correct.  If you want paging, do this through the BO by creating a Fill method that pages through the records.  For example, you could create a Fill method called FillNext100 and have it take into account the primary key or whichever root value you want to use.  This is how we use paging...having this automated is probably not going to happen any time soon as this will require a significant implementation to support all of these different controls.  But you can do it manually right now.