Getting dlg to work in webclient

Forum to discuss the Web client version of Servoy.

Getting dlg to work in webclient

Postby alb » Sat Jul 04, 2009 2:01 pm

I know there are differences between the SC and WC :) - in that the WC keeps going while the SC 'waits' for a dlg to return.
I have read at efw posts but am still confused.......I have the following global function that works perfectly in the SC:

function deleteRecord()
{
application.beep()
var answer = plugins.dialogs.showWarningDialog('Alert','Do you want to delete this record?','Yes','No')
if(answer == "Yes")
{
currentcontroller.deleteRecord()
}
}

Its very neat and I can call it from every form to trap unwanted deletes.......so how do I do the same thing in the WC?

Thanks
Al
alb
 
Posts: 148
Joined: Sun Aug 13, 2006 4:40 am

Re: Getting dlg to work in webclient

Postby alb » Sat Jul 04, 2009 2:08 pm

ok
looks like its more serious than that ....I cant use the plugin dialog in the WC :(
Shame cos it was really small and neat.
So I'll have to design a form to similaute it....
alb
 
Posts: 148
Joined: Sun Aug 13, 2006 4:40 am

Re: Getting dlg to work in webclient

Postby alb » Sat Jul 04, 2009 2:30 pm

Hey isnt it great when you find your *own answer. For anyone else who is looking this waht I cam up with that works in SC AND WC:


3 functions
1. Opens the dlg form, which has 2 buttons; yes and no
2. Yes button deletes record and closes dlg
3. No button closes dlg


function deleteRecord()
{
currentcontroller.deleteRecord()
application.closeFormDialog()
}

function show_dlg_Delete()
{
application.beep()
application.showFormInDialog(forms.dlg_Delete,'','','','','Warning',false,false,'Warning',true)
}

function hide_dlg_Delete()
{
application.closeFormDialog()
}
alb
 
Posts: 148
Joined: Sun Aug 13, 2006 4:40 am


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 5 guests