Author: richter
Date: Mon Feb  2 07:43:01 2015
New Revision: 1656396

URL: http://svn.apache.org/r1656396
Log:
Allow to change url of selectdyn control

Modified:
    perl/embperl/trunk/Embperl/Form/Control/selectdyn.pm
    perl/embperl/trunk/Embperl/Form/ControlMultValue.pm
    perl/embperl/trunk/Embperl/Form/DataSource.pm

Modified: perl/embperl/trunk/Embperl/Form/Control/selectdyn.pm
URL: 
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/selectdyn.pm?rev=1656396&r1=1656395&r2=1656396&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/selectdyn.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/selectdyn.pm Mon Feb  2 07:43:01 
2015
@@ -134,6 +134,8 @@ if ($datasrc)
         
         my ($constrain, $without_constrain) = $datasource -> 
get_constrain_value ($req, $self) ;
         $datasrc .= '&constrain=' . $epreq->Escape ($constrain,6) . 
'&without_constrain=' . ($without_constrain?1:0) if ($constrain) ;
+        
+        ($self -> {url_from}, $self -> {url_to}) = $datasource -> 
get_url_modifier ($req, $self) ;
         }
     }
 
@@ -160,6 +162,8 @@ type="text" _ef_attach="ef_selectdyn"
 [$if $self -> {showurl_append}  $]_ef_show_url_append="[+ $self -> 
{showurl_append} +]" [$endif$] 
 [$if $self -> {popupurl}        $]_ef_popup_url="[+ $self -> {popupurl} +]" 
[$endif$] 
 [$if $self -> {datasrcurl}      $]_ef_datasrc_url="[+ $self -> {datasrcurl} 
+]" [$endif$] 
+[$if $self -> {url_from}        $]_ef_url_from="[+ $self -> {url_from} +]" 
[$endif$] 
+[$if $self -> {url_to}          $]_ef_url_to="[+ $self -> {url_to} +]" 
[$endif$] 
 [$if $append                    $]_ef_datasrc_url_append="[+ $append +]" 
[$endif$] 
 [$if $datasrc                   $]_ef_datasrc_nam="[+ $datasrc +]" [$endif$] 
 [$if $self -> {datasrctermmax}  $]_ef_datasrc_term_max="[+ $self -> 
{datasrctermmax} +]" [$endif$] 

Modified: perl/embperl/trunk/Embperl/Form/ControlMultValue.pm
URL: 
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/ControlMultValue.pm?rev=1656396&r1=1656395&r2=1656396&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/ControlMultValue.pm (original)
+++ perl/embperl/trunk/Embperl/Form/ControlMultValue.pm Mon Feb  2 07:43:01 2015
@@ -39,6 +39,7 @@ sub init
         {
         my $name = $self -> {datasrc} ;
         $name =~ s/[#\/].+$// ;
+        $name =~ s/^.+?\.// ;
         my $form = $self -> form ;
         my $packages = $form -> get_datasrc_packages ;
         $self -> {datasrcobj} = $form -> new_object ($packages, $name, $self, 
{ datarsc => $self -> {datasrc}}) ;

Modified: perl/embperl/trunk/Embperl/Form/DataSource.pm
URL: 
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/DataSource.pm?rev=1656396&r1=1656395&r2=1656396&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/DataSource.pm (original)
+++ perl/embperl/trunk/Embperl/Form/DataSource.pm Mon Feb  2 07:43:01 2015
@@ -75,6 +75,45 @@ sub constrain_attrs
 
 # ---------------------------------------------------------------------------
 #
+#   get_constrain_value - returns the constrain value that is need for a
+#                         search or undef if there is no constrain
+#
+#   in  $req        request data
+#       $ctrl       control that will display the value
+#   ret $constrain          contrain value if any
+#       $without_contrain   true if also values that have no contrain value
+#                           are part of the resultset
+#
+
+sub get_constrain_value
+
+    {
+    my ($self, $req, $ctrl) = @_ ;
+
+    return ;
+    }
+    
+
+# ---------------------------------------------------------------------------
+#
+#   get_url_modifier - returns modifier for url for requesting datasrc values 
(selectdyn)
+#
+#   in  $req        request data
+#       $ctrl       control that will display the value
+#   ret $search
+#       $replace
+#
+
+sub get_url_modifier
+
+    {
+    my ($self, $req, $ctrl) = @_ ;
+
+    return ;
+    }
+    
+# ---------------------------------------------------------------------------
+#
 #   sorttype - returns information how to sort this datasource values for 
displaying
 #
 



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscr...@perl.apache.org
For additional commands, e-mail: embperl-cvs-h...@perl.apache.org

Reply via email to