Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possibile errors in IWBootStrap Library
#1
Good afternoon.
I write for possible errors on the Bootstrap library.
I have attached an example project.
1)
I have an iwbsinputform with iwbsfile and an iwbsbutton inside it. I put the ButtonType property btsubmit. The onsubmit event with this code is associated with the iwbsinputform:

if aRequest.Files.Count> 0 then
begin
FileUpload: = THttpFile (aRequest.Files [aRequest.Files.Count - 1]). FileName;
WebApplication.ShowMessage ('File upload name:' + FileUpload);
end
else
WebApplication.ShowMessage ('No file selected');

After executing this code I get the error 404 - Not found. I think it's two to the rewriting of the iwbsrestserver.pas unit and the change in the management of callbacks in Intraweb 15.1.4.
2) In the iwbsradiobutton component the OnAsyncClick event does not fire and the Checked property when it changed is always False if I try to read it from code.

3) HiddenInput

I have a callback registered in the form
WebApplication.RegisterCallBack ('CalcolateValue', CalcolateValue);

In a CalcolateValue procedure:
js: = Format ('addHiddenInput ("% s",% s);', ['Test_Input', 'Test ()']);
WebApplication.CallBackResponse.AddJavaScriptToExecute (js);

the javascript function is defined as follows:

with JavaScript do
begin
Add ('function addHiddenInput (aName, aValue) {');
Add ('var frm = $ (getSubmitForm ());');
Add ('if (! Frm.length) return false;');
Add ('var hid = frm.find ("input [name =" + aName + ""] ");');
Add ('if (! Hid.length) {');
Add ('hid = $ ("<input type =" hidden "name =" + aName + ""> ");');
Add ('frm.append (hid);');
Add ('}');
Add ('hid.val (aValue);');
Add ('AddChangedControl (aName);');
Add ('}');
Add ('');
Add ('function Test ()');
Add ('{');
Add ('return 5;');
Add ('}');
end;

In a button in the scriptevents property I have
ajaxCall ("CalcolateValue", "& CallBack = 1", false);

and in the AsyncCLick event I have:
  Value: = EventParams.Values ['Test_Input'];
  WebApplication.ShowMessage (Value);

When I run ajaxcall the callback is executed but then in the button in the AsyncClick event the Value returned is always empty and not 5 as it should be. (In the same button is it possible to return the value of the variable through the callbak?)
(I use intraweb 15.1.4 and iwbootstrap 3.4.1)
Thanks for your help

Andrea


Attached Files Thumbnail(s)
   

.zip   Example.zip (Size: 54.88 KB / Downloads: 9)
Reply


Messages In This Thread
Possibile errors in IWBootStrap Library - by Anto90 - 09-09-2019, 01:14 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)