[CLOSED] Portlet - Sequential load

Page 2 of 2 FirstFirst 12
  1. #11
    Quote Originally Posted by Daniil View Post
    I am getting a compiler error on this line:
    Dim cs As String = Connection.ConnectionString(Request.ServerVariable s("SERVER_NAME"))
    Can I remove it?

    Then a compiler error occurs here:
    Dim Title As String = Null2String(dr("Title"))
    Compiler Error Message: BC30451: 'Null2String' is not declared. It may be inaccessible due to its protection level.
    Where is the Null2String defined?

    Yes, please remove statement related to connection string.

    To get rid of next compiler errors replace statements which uses Null2String and Null2Integer with IIF statements with ISDBNull check like below.

     Dim Title As String = IIf(IsDBNull(dr("Title")), "", dr("Title"))
                Dim PageURL As String = IIf(IsDBNull(dr("PageURL")), "", dr("PageURL"))
                Dim Summary As String = IIf(IsDBNull(dr("Summary")), "", dr("Summary"))
                Dim Description As String = IIf(IsDBNull(dr("Description")), "", dr("Description"))
                Dim Height As Integer = IIf(IsDBNull(dr("Height")), 0, dr("Height"))

    ~Thank you
  2. #12
    Ok. Now I am getting:
    Exception Details: System.FormatException: Input string was not in a correct format.
    Line 88:  AnchorLayoutTemp = FindControl(String.Format("AnchorLayoutPortal{0}_{ 1}", PortalIndex, ColumnIndex))
  3. #13
    Quote Originally Posted by Daniil View Post
    Ok. Now I am getting:
    Exception Details: System.FormatException: Input string was not in a correct format.
    Line 88:  AnchorLayoutTemp = FindControl(String.Format("AnchorLayoutPortal{0}_{ 1}", PortalIndex, ColumnIndex))

    I don't know how single space came in between "{1}". Use below statement (just removed space).
    AnchorLayoutTemp = FindControl(String.Format("AnchorLayoutPortal{0}_{1}", PortalIndex, ColumnIndex))
    I have tested the same code locally and able to run without any compiler errors. If you still get any compiler error, it would be some simple code formatting issue similar to above one. Please correct them and provide solution.

    ~ Thank you
    Last edited by iansriley; Jan 17, 2014 at 5:55 AM.
  4. #14
    Now I was able to run the sample.

    Some notes first:

    1. This should not be called during initial Page_Load:
    PortletTemp.LoadContent(al)
    It should be called during a DirectEvent/DirectMethod only.

    These settings are enough to auto load a Panel's content.
    panel.AutoLoad.Url = "Dummy.aspx"
    panel.AutoLoad.Mode = LoadMode.IFrame
    2. As for a PostBack click, when the CreateAllPortals method is executed as a DirectMethod, then the only thing in your code which affects to client is
    PortletTemp.LoadContent(al)
    You can look a DirectMethod call's response to understand better what I mean.

    Could you, please, clarify what is the purpose of the PostBack button? Should it re-render and reload all the portlets according to the WidgetsList.xml? Or should it just reload the Portlets with the last settings which they use initially?
  5. #15
    Hi Daniil,

    Thank you for your valuable notes and suggestions. Nice to hear that, you were able to run the sample provided. I just want to know one more thing, Are you able to load all widgets sequentially on click of post back button? If yes, please do mention the code changes you did?

    Purpose of "Postback" Or "Direct Method" button:
    Yes, we do have both scenarios you mentioned
    1. In my site's Home page, among many tabs "Sales" Tab is one which should load all widgets with company sales information. In this case there would not be any input from UI side to load widgets. So on Sales tab click, all widgets should be loaded. One global refresh button which will reload (should go to server and run stored procedures to fetch latest data) all widgets as per the xml file data.
    2. There is another scenario where user input will be considered to load widgets. In this scenario, widgets will wait to load until user selects a customer. Let me explain this scenario in detail. As mentioned in first scenario, among many tab panels in home page, there is one more tab panel "Customer Search Dashboard", whose first control is a type ahead combobox. this combobox will help user to filter customers based on the letters typed in. When user starts typing in this combobox, all customer names will populate under this combobox. Then user will select one customer record among all the filtered list of customers. For example, if user types "the" in customer type ahead combobox, then let's say filtered populated list is

    a. The 11 street
    b. The sancta maria
    c. The gold coast and etc.,
    If user selects "The sancta maria" customer record, one direct method will trigger which will fetch data only for "The sancta maria" customer and loads all widgets with this particular customer data.

    We are now very close to my exact scenario. Hoping for a quick and permanent solution.

    ~ Thank you
    Last edited by iansriley; Jan 17, 2014 at 7:14 AM.
  6. #16
    Quote Originally Posted by iansriley View Post
    Are you able to load all widgets sequentially on click of post back button?
    No, only the first row is re-loaded and I tried to explain why.

    Quote Originally Posted by iansriley View Post
    Purpose of "Postback" Or "Direct Method" button:
    Yes, we do have both scenarios you mentioned
    1. In my site's Home page, among many tabs "Sales" Tab is one which should load all widgets with company sales information. In this case there would not be any input from UI side to load widgets. So on Sales tab click, all widgets should be loaded. One global refresh button which will reload (should go to server and run stored procedures to fetch latest data) all widgets as per the xml file data.
    If you need to reload everything what about a hard ASP.NET PostBack which would reload the page entirely?

    Quote Originally Posted by iansriley View Post
    2. There is another scenario where user input will be considered to load widgets. In this scenario, widgets will wait to load until user selects a customer. Let me explain this scenario in detail. As mentioned in first scenario, among many tab panels in home page, there is one more tab panel "Customer Search Dashboard", whose first control is a type ahead combobox. this combobox will help user to filter customers based on the letters typed in. When user starts typing in this combobox, all customer names will populate under this combobox. Then user will select one customer record among all the filtered list of customers. For example, if user types "the" in customer type ahead combobox, then let's say filtered populated list is
    a. The 11 street
    b. The sancta maria
    c. The gold coast and etc.,
    If user selects "The sancta maria" customer record, one direct method will trigger which will fetch data only for "The sancta maria" customer and loads all widgets with this particular customer data.
    Well, the requirement is more or less for me, but I don't understand what exactly problem you are facing with implementing that requirement.
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: Jul 23, 2013, 8:08 AM
  2. [CLOSED] How to set Portlet height based on auto load url page
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 22, 2011, 4:07 PM
  3. Sequential ajax calls
    By costab in forum 1.x Help
    Replies: 1
    Last Post: May 21, 2011, 11:51 AM
  4. Replies: 4
    Last Post: Apr 08, 2010, 8:05 PM
  5. Replies: 0
    Last Post: Mar 03, 2010, 9:51 AM

Posting Permissions