CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Accordion and Dropdown

by assapan » 14 Mar 2016 19:57

Hi,
i build runtime a frame containing different component related to application parameters .
parameters are grouped in sections , so parameters are grouped in a cggroupbox without problem so far , to void necessity to scroll i wanted to group them in accordiontab instead of groupbox , there i face a problem with dropdowns , they display the accordiontab caption instead of the selected option in dropdown.

here is cggroupbox version , you can see at tema , hot-sneaks is displayed
Image

now with accordion version, accordion tab caption is displayed instead of hot-sneaks
Image

but the component works fine
Image

do you have any idea of what can cause the problem ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 15 Mar 2016 10:48

Hi assapan,

I have never seen this before...
How are you creating the controls?

Maybe you can reproduce it in simple testcase?

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 15 Mar 2016 11:31

Hi alexander,
First of all , sorry i told you lies , component is a comboboxex not a dropdown .

I tried to reproduce it but there is so many others components involved in this frame ....

maybe we could do it with remote session using a ticket , are you available today ?
Last edited by assapan on 15 Mar 2016 11:52, edited 1 time in total.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 15 Mar 2016 11:45

Hi assapan,

Let's schedule the remote session time by email.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 16 Mar 2016 18:41

So first of all i want to thank CGDevtools for the professionalism of the support Image


Second the end of the story was i was creating a frame in between disable and enable ajaxresponse
Code: Select all
function CreeFrame(FrameClass: TFrameClass; WebApp: TIWApplication; Owner: TComponent; Parent: TWinControl; Name: String; Align: TAlign = alNone): TIWCGJQFrame;
var
  NewName: string;
begin
  NewName := CGFindUniqueComponentName(Owner, Name);

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

  Result := FrameClass.Create(Owner);

  Result.Name := NewName;
  Result.Parent := Parent;
  if Align <> alNone then
    Result.Align := Align;

  if WebApp.CallBackProcessing then
    CGCallBackEnableAjaxResponse;
end;

function CreeFrame(FrameClass: TFrameClass; WebApp: TIWApplication; Owner: TComponent; Parent: TIWCGJQRegion;Align: TAlign = alClient;CommandToProcess:Integer=0): TIWCGJQFrame;
begin
  Result := CreeFrame(FrameClass, WebApp, Owner, TWinControl(Parent), 'Frame',Align);
  Result.ProcessCommand(CommandToProcess);
end;


But i was creating components in processcommand which was not protected !!!!!
here is what have to be done
Code: Select all
function CreeFrame(FrameClass: TFrameClass; WebApp: TIWApplication; Owner: TComponent; Parent: TIWCGJQRegion;Align: TAlign = alClient;CommandToProcess:Integer=0): TIWCGJQFrame;
begin
  Result := CreeFrame(FrameClass, WebApp, Owner, TWinControl(Parent), 'Frame',Align);

  if CGIsCallBackProcessing then
  begin
    // SINCE THE FRAME IS GOING TO BE RENDERED BY AJAX, DON'T NEED TO GENERATE AJAX RESPONSE.
    CGCallBackDisableAjaxResponse;
  end;
  try
    Result.ProcessCommand(CommandToProcess);
  finally
    if WebApp.CallBackProcessing then
      CGCallBackEnableAjaxResponse;
  end;

end;
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France


Return to JQAccordion

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.