Page 1 of 1

Redisplay Issues

PostPosted: 16 Jan 2015 04:07
by zsleo
I have a problem that I unable to resolve.
I have published the app at http://dev-apd[dot]mednet[dot]com[dot]au
Username: demo
Password: demo1234
NOTE: This server is not well resourced and is slow…

When you log in there are many Location/Person appointment books presented in a - each appointment book (TIWCGJQScheduler) is a presented in it’s own TIWCGJQCarouselOptions. ItemsCustom.
All works fine until I display another frame (click one of the buttons at the top) and then go back to the Appointment Book.
When the Appointment frame is redisplayed the following issues occur:
1. The size of the TIWCGJQScheduler(s) do not display correctly
a. The content of each TIWCGJQScheduler is not displayed
b. Ctrl-F5 rectifies the display
c. Everything works okay
d. After this first generally, but not always, selecting one of the other frames and returning to Appointment Book everything is displayed correctly.
The same code (copied from the CGD demo app) is called for all instances:

Code: Select all
procedure TiwfrmMain.ShowFrame(ip_F: smallint);
var
  FrameClass: TIWCGFrameClass;
begin
  iwcgdbtn3.Visible := not (ip_F in [0, 1]);

  case ip_F of
    1:
      FrameClass := TiwcgjqfrmApptBook;
    2:
      FrameClass := TiwcgjqfrmApptTemplates;
    3:
      FrameClass := TiwcgjqfrmProvider;
    4:
      FrameClass := TiwcgjqfrmILocation;
    5:
      FrameClass := TiwcgjqfrmProvLoc;
    6:
      FrameClass := TiwcgjqfrmApptSchedules;
    7:
      FrameClass := TiwcgjqfrmApptTemplates;

  else
    FrameClass := TiwcgjqfrmLogin;
  end;

  if Assigned(FrameClass) then
    CreateNewFrame(FrameClass);

  FrameComp.ProcessCommand(0, nil);

  if WebApplication.CallBackProcessing then
  begin
    CGCallBackEnableAjaxResponse;
    try
      RenderRegionAsync(CGJQContainer, rramLazyLoadMethod, True);
    Except
    end;
  end;

end;

function TiwfrmMain.CreateNewFrame(AFrameClass: TIWCGFrameClass): TFrame;
var
  NewName: string;
begin

  NewName := CGFindUniqueComponentName(Self, 'Frame');

  if Assigned(FrameComp) and (FrameComp.ClassType <> AFrameClass) then
    FreeAndNil(FFrameComp);

  if CGIsCallBackProcessing then
  begin
    // SINCE THE FRAME IS GOING TO BE RENDERED BY AJAX, DON'T NEED TO GENERATE AJAX RESPONSE.
    CGCallBackDisableAjaxResponse;
  end;

  if not Assigned(FrameComp) then
  begin
    FFrameComp := AFrameClass.Create(Self);
    FrameComp.Name := NewName;
    FrameComp.Parent := CGJQContainer;
    FrameComp.Align := alClient;
  end;

  Result := FrameComp;
end;


02.jpg
01.jpg


TIA

Re: Redisplay Issues

PostPosted: 16 Jan 2015 10:16
by Alexander Bulei
Hi zsleo,

1. Check for javascript errors in browser console.
2. Can you reproduce this problem in simple testcase?

Best Regards.

Re: Redisplay Issues

PostPosted: 16 Jan 2015 23:56
by zsleo
Here is a screen capture of the console for JS.


I will try to create a simple demo otherwise I will request you remote connect..

TIA

Re: Redisplay Issues

PostPosted: 19 Jan 2015 15:48
by Alexander Bulei
Hi zsleo,

Well, this mean there is no javascript errors...

I will try to create a simple demo otherwise I will request you remote connect..


Ok, waiting...

Best Regards.

Re: Redisplay Issues

PostPosted: 20 Jan 2015 01:19
by zsleo
Hi,

I have replaced the buttons with a horizontal menu (which I was going to do anyway) an the problem has gone away.

FYI when I roll back my code to the buttons version the issue reappears.

Creating a simple demonstration was taking bit of time - which I am short of at the moment. I will come back to this when I get some time or you can do a remote session with the buttons version if you want. Up to you...

Regards

Re: Redisplay Issues

PostPosted: 20 Jan 2015 11:05
by Alexander Bulei
Hi zsleo,

Ping us with id & pw of teamviewer when you will ready.

Best Regards.