Author: richter
Date: Fri Jan 30 20:39:49 2015
New Revision: 1656112

URL: http://svn.apache.org/r1656112
Log:
Fix read only display of dynctrl

Modified:
    perl/embperl/trunk/Embperl/Form/Control/dynctrl.pm

Modified: perl/embperl/trunk/Embperl/Form/Control/dynctrl.pm
URL: 
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/dynctrl.pm?rev=1656112&r1=1656111&r2=1656112&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/dynctrl.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/dynctrl.pm Fri Jan 30 20:39:49 2015
@@ -121,16 +121,29 @@ sub init_markup
 
 
 
-# ----------------------------------------------------------------------------
-
-sub init_data 
-    {
-    my $self = shift ;
-    my $ctrl = $self -> create_ctrl ($_[0]) ;
-
-    $ctrl -> init_data (@_)  if ($ctrl && $ctrl -> can ('init_data'));
-    }
+# ---------------------------------------------------------------------------
+#
+#   should_init_data - returns true if init_data should be called for this 
control
+#
+
+sub should_init_data
+
+    {
+    my ($self, $req) = @_ ;
+
+    return !$self -> is_disabled ($req) ;
+    }
 
+# ----------------------------------------------------------------------------
+
+sub init_data 
+    {
+    my $self = shift ;
+    my $ctrl = $self -> create_ctrl ($_[0]) ;
+
+    $ctrl -> init_data (@_)  if ($ctrl && $ctrl -> can ('init_data'));
+    }
+
 # ----------------------------------------------------------------------------
 
 sub prepare_fdat 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to