CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

JQDialog and HTML Template used on IWAppform

by Blackwellsimon » 17 Oct 2016 02:57

Hi,

I am having a problem with the JQDialog when IWEdits or JQEdits are used on the dialog (as in the Login Dialog demo). If there is a HTML template linked to the IWAppform layout manager, the IWEdits all return empty, even though values have been captured. If you remove the HTML or just rename it then everything works as expected and you can use the values entered in to the IWEdits on the JQDialog.

There does seem to be a small difference on the scripts added when then the IWAppform is loaded in the browser.

With a template applied
Code: Select all
$(function(){$("#DLGENTRY").dialog({buttons:[{id:"DLGENTRY_0",text:"Accept",click:function (){   var url = "&ajaxevent=JQDialogOptions.Buttons.Items[0].OnClick";   executeAjaxEvent(url,DLGENTRYIWCL,"DLGENTRY.DoAjaxRequest",true,null,true); } },{id:"DLGENTRY_1",text:"Cancel",click:function (){   var url = "&ajaxevent=JQDialogOptions.Buttons.Items[1].OnClick";   executeAjaxEvent(url,DLGENTRYIWCL,"DLGENTRY.DoAjaxRequest",true,null,true); } }],width:385,height:225,title:"<span id=\"DLGENTRY_TITLETEXT\" >Dialog Entry<\/span>",autoOpen:false,open:function (event, ui){$('input[name="DLGENTRY_VISIBLE"]').val(true);AddChangedControl("DLGENTRY_VISIBLE");CGIWUpdateRects(this);},close:function (event, ui){$('input[name="DLGENTRY_VISIBLE"]').val(false);AddChangedControl("DLGENTRY_VISIBLE");}});$("#DLGENTRY").parent().css({"position":"absolute"});});
var DLGENTRYIWCL = null;


function InitIWCLObjects() {
DLGENTRYIWCL = NewIWCL(IWCLForm,"DLGENTRY",false);
if (DLGENTRYIWCL) {DLGENTRYIWCL.OnCGResize = function(ARect) {this.SetRect(ARect); if (CGTriggerEvent) {  ARect.Width = $(this).width();  ARect.Height = $(this).height(); } return true; }}


With no template applied
Code: Select all
function InitIWCLObjects() {
$(function(){$("#DLGENTRY").dialog({buttons:[{id:"DLGENTRY_0",text:"Accept",click:function (){   var url = "&ajaxevent=JQDialogOptions.Buttons.Items[0].OnClick";   executeAjaxEvent(url,DLGENTRYIWCL,"DLGENTRY.DoAjaxRequest",true,null,true); } },{id:"DLGENTRY_1",text:"Cancel",click:function (){   var url = "&ajaxevent=JQDialogOptions.Buttons.Items[1].OnClick";   executeAjaxEvent(url,DLGENTRYIWCL,"DLGENTRY.DoAjaxRequest",true,null,true); } }],width:385,height:225,title:"<span id=\"DLGENTRY_TITLETEXT\" >Dialog Entry<\/span>",autoOpen:false,open:function (event, ui){$('input[name="DLGENTRY_VISIBLE"]').val(true);AddChangedControl("DLGENTRY_VISIBLE");CGIWUpdateRects(this);},close:function (event, ui){$('input[name="DLGENTRY_VISIBLE"]').val(false);AddChangedControl("DLGENTRY_VISIBLE");}});$("#DLGENTRY").parent().css({"position":"absolute"});});

DLGENTRYIWCL = NewIWCL(IWCLForm,"DLGENTRY",false);
var parDLGENTRY = $("#DLGENTRY").parent(); parDLGENTRY.hidden = parDLGENTRY.css("display") == "none"; if (parDLGENTRY.hidden) parDLGENTRY.css("display","block");
DLGENTRYIWCL = NewIWCL(IWCLForm,"DLGENTRY",false);
if (DLGENTRYIWCL) {DLGENTRYIWCL.BorderWidthPixels = 0;}
if (DLGENTRYIWCL) {DLGENTRYIWCL.OnCGResize = function(ARect) {this.SetRect(ARect); if (CGTriggerEvent) {  ARect.Width = $(this).width();  ARect.Height = $(this).height(); } return true; }}


Anyone noticed this problem before and have a solution

Thanks
Simon

CGDevtools: 3.0.0.0 also tried 3.0.0.65 but same thing
Intraweb 12.2.32
Blackwellsimon
 
Posts: 10
Joined: 07 Jul 2016 05:06

by Blackwellsimon » 17 Oct 2016 03:18

Nothing like posting a reply to your own question...

The only way I can get things to work is before the dialog is made visible is to clear out the layout manager being used

Code: Select all
self.layoutmgr := nil


then when the form is hidden (visible := false ) is to reply the template

Code: Select all
self.layoutmgr := iwtemplate


Would be good to know why the layout manager is mucking things up.

Simon
Blackwellsimon
 
Posts: 10
Joined: 07 Jul 2016 05:06

by Jorge Sousa » 17 Oct 2016 14:27

Hello

Would be good to know why the layout manager is mucking things up.


Please submit a test case, we have no idea what your template is.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Blackwellsimon » 17 Oct 2016 17:40

Hi Jorge,

Attached is a demo example with the basic HTML template attached.

Thanks
Simon
You do not have the required permissions to view the files attached to this post.
Blackwellsimon
 
Posts: 10
Joined: 07 Jul 2016 05:06


Return to JQDialog

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.