Form elements disabled cant be enabled in WC

Forum to discuss the Web client version of Servoy.

Form elements disabled cant be enabled in WC

Postby Kahuna » Tue Apr 20, 2010 1:16 pm

I have a form that starts disabled so that nothing gets edited accidentally. I use an EDIT Button to re-enable the elements on the form. This does not work in the Web Client - is this by design or have I missed a trick?
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Form elements disabled cant be enabled in WC

Postby lvostinar » Tue Apr 20, 2010 2:09 pm

What exactly doesn't work ? Can you edit the fields ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Form elements disabled cant be enabled in WC

Postby Kahuna » Tue Apr 20, 2010 2:58 pm

lvostinar wrote:What exactly doesn't work ? Can you edit the fields ?


On onLoad my app sets the form to controller.enabled = false;.

I have a button that (in SM) does controller.enabled = true;

The button does not enable the form in the WC?
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Form elements disabled cant be enabled in WC

Postby lvostinar » Tue Apr 20, 2010 3:03 pm

Kahuna wrote:
lvostinar wrote:What exactly doesn't work ? Can you edit the fields ?


On onLoad my app sets the form to controller.enabled = false;.

I have a button that (in SM) does controller.enabled = true;

The button does not enable the form in the WC?


Maybe the button is disabled ? Is the onAction executed ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Form elements disabled cant be enabled in WC

Postby Kahuna » Tue Apr 20, 2010 3:08 pm

lvostinar wrote:Maybe the button is disabled ? Is the onAction executed ?


Its not disabled in the SC - so don't know why it would be in the web client - not sure how to test that in the webclient? But using a debug-break and running WC from developer it appears that the button is not enabled?

MORE - I just tested setting the button to enabled using elements.but_edit_rec.enabled = true; after the controller.enabled = false; to no avail.
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Form elements disabled cant be enabled in WC

Postby lvostinar » Tue Apr 20, 2010 3:18 pm

Kahuna wrote:
lvostinar wrote:Maybe the button is disabled ? Is the onAction executed ?


Its not disabled in the SC - so don't know why it would be in the web client - not sure how to test that in the webclient? But using a debug-break and running WC from developer it appears that the button is not enabled?

MORE - I just tested setting the button to enabled using elements.but_edit_rec.enabled = true; after the controller.enabled = false; to no avail.


So, can you click on the button and onAction is not executed ? Maybe you can attach a small sample ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Form elements disabled cant be enabled in WC

Postby Kahuna » Mon Jul 18, 2011 2:45 pm

Resurrecting an old post of mine here as I'm still having the same problem with WC not enabling elements on a disabled form??

Here is the story:

Form has
onShow()
Code: Select all
application.output('Before Event - Test Button Enabled; ' +elements.butTest.enabled)
   controller.enabled = false
   elements.butTest.enabled = true
   application.output('After Event - Test Button Enabled; ' +elements.butTest.enabled)

SC works as expected - everything disabled except the button. In WC the button is not enabled?

Guessing I screwed it up somehow, but here is a small solution to show what I mean.

onShow does an app output on the status of the button before and after the code (controller.enabled = false) and the Test button does an app outbut to show the it's actually calling an onAction working (but is'nt in WC).

Appreciate feedback

Ian
You do not have the required permissions to view the files attached to this post.
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Form elements disabled cant be enabled in WC

Postby Kahuna » Thu Jul 21, 2011 6:04 pm

Any chance someone from Servoy could take a look at this please??

Appreciate it.

Ian
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Form elements disabled cant be enabled in WC

Postby jcompagner » Thu Jul 21, 2011 9:01 pm

better is to make a case with that,

Also mixing controller.enabled and then field.enable is a bit weird.

In my view is if you use controller.enabled = false then the complete form just must be disabled until you set that to true again..
Because mixing this is just weird and confusing if you ask me
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Form elements disabled cant be enabled in WC

Postby Kahuna » Fri Jul 22, 2011 10:10 am

jcompagner wrote:better is to make a case with that,

Also mixing controller.enabled and then field.enable is a bit weird.

In my view is if you use controller.enabled = false then the complete form just must be disabled until you set that to true again..
Because mixing this is just weird and confusing if you ask me

Johan - I'll make a case for it but...

I need to have all fields on the form disabled but I need the labels (buttons) enabled to allow the user to move to the next record. If everything is disabled they they are stuck there. We have a form that hosts audit data and after the data has been closed-out the data is no longer editable, therefore we wont allow access to it. But the user needs to be able to go to the next record which may not yet be closed out.

We have worked around it by setting all fields on the form non-editable - but lot more code work for the form, than simply setting controller enabled and then re-enabling what you want!
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Form elements disabled cant be enabled in WC

Postby Harjo » Fri Jul 22, 2011 11:14 am

Is'nt that what controller.readOnly = true for??

that disables editing, but doesn't touch labels & buttons.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Form elements disabled cant be enabled in WC

Postby Kahuna » Fri Jul 22, 2011 4:56 pm

Harjo wrote:Is'nt that what controller.readOnly = true for??

that disables editing, but doesn't touch labels & buttons.
In web client it seems to disable the button too Harjo
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Form elements disabled cant be enabled in WC

Postby jcompagner » Fri Jul 22, 2011 5:20 pm

so readonly = true disabled buttons in the web?
that sounds like a bug to me, create a case.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 7 guests

cron