I hope this was clear. For complex objects it does save a lot of time and it
allows me to maintain only one etemplate for both editing and viewing my
objects.
Hi Raphael,
that only helps, if $readonlys[$name] is already an array. If it’s set
you get under php5.2.x even a fatal error.
Where do you use $readonlys[‘ALL’]? I’ve stoped using it, as it also
disables all buttons and I usually need at least a [cancel/close] button.
Ralf
Raphael Alla schrieb:
Hi Ralf and Nathan,
As the $readonlys has additional semantics than simply read only widget,
it may be a good idea to keep the original $readonlys value of the
extension. I therefore suggest the following instead:
if ($readonlys[‘ALL’]) $readonlys[$name][‘ALL’] = true;
This way, we do not lose the original values of the $readonlys array
given to the extension.
Regards
Raphaël
Hi Raphael and Nathan,
just commit an other fix, as Raphales patch (with Nathans
correction),
still broke an existing feature in the tabs widget, which allowed to
switch on and off single tabs by setting $readonlys[$tabs_name] as an
array with the name of the to disabled tab as key and a value which
evaluated true.
I'm now using $readonlys[$name], as in my orginal code, as var
parameter
for the extensions pre_process method.
I set it to true, if $readonlys['__ALL__'] is set (to true), but only
in
that case (to still allow to pass other values to the extension):
// if readonlys[__ALL__] is set, also set readonlys[$name] (but only
then as for extensions (eg. tabs) $readonlys[$name] can be an array!)
if ($readonlys['__ALL__']) $readonlys[$name] = true;
$extra_label =
$this->extensionPreProcess($type,$form_name,$value,$cell,$readonlys[$name]);
That also solves Raphaels feature request, that the extension can set
the readonlys value too.
Ralf
Raphael Alla schrieb:
> I will review and correct if needed. I agree that my patch breaks
the
> initial design to allow the extension to modify the readonly
array. The
> fix should be trivial (let's hope).
>
> On Fri, Sep 19, 2008 at 7:17 PM, Ralf Becker
> <RalfBecker@outdoor-training.de
<mailto:RalfBecker@outdoor-training.de>
<mailto:RalfBecker@outdoor-training.de
<mailto:RalfBecker@outdoor-training.de>>>
> wrote:
>
> Hi Nathan,
>
> thanks for the fix, I was 3 days offline.
>
> Your change is what Raphael did in his patch, I just missed
the fact,
> that the 5 param is passed by reference.
>
> I'm not sure it's ok to dismiss the returned readonly value
from the
> extension. My original code allowed the extension to set the
readonly
> attribute. We'll see if that's a problem.
>
> Ralf
>
> Nathan Gray schrieb:
> > Something went wrong with this, and I don't have the
knowledge to
> > figure it out.
> >
> > My change (r25999) got rid of a fatal error, Fatal error:
Cannot pass
> > parameter 5 by reference in /var/www/perpdevel/etemplate/inc/
> > class.uietemplate.inc.php on line 1007
> >
> > However, when you've got a nextmatch with a button named like
> > "del[$row_cont[id]]", and your nextmatch data function sets
readonly
> > key "del[84]" => 1, the button used to be hidden. Now, the
button is
> > not hidden. This is easily visible (trunk) in the
addressbook and
> > infolog.
> >
> > I think it has something to do with around line 1007 and
passing by
> > reference, but I can't figure out what it wants.
> > Ralf or Raphael, if you guys have any solutions or ideas,
I'm out of
> > them today.
> >
> > Nathan Gray
> > nathan at goarctic dot com
> >
> >
> >
>
> > This SF.Net email is sponsored by the Moblin Your Move
Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK &
win
> great prizes
> > Grand prize is a trip for two to an Open Source event
anywhere in
> the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>>
> > _______________________________________________
> > eGroupWare-developers mailing list
> > eGroupWare-developers@lists.sourceforge.net
<mailto:eGroupWare-developers@lists.sourceforge.net>
> <mailto:eGroupWare-developers@lists.sourceforge.net
<mailto:eGroupWare-developers@lists.sourceforge.net>>
> >
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
>
> --
> Ralf Becker
> eGroupWare Training & Support ==>
http://www.egroupware-support.de
> Outdoor Unlimited Training GmbH [www.outdoor-training.de
<http://www.outdoor-training.de>
> <http://www.outdoor-training.de>]
> Handelsregister HRB Kaiserslautern 3587
> Geschäftsführer Birgit und Ralf Becker
> Leibnizstr. 17, 67663 Kaiserslautern, Germany
> Telefon +49 (0)631 31657-0
>
>
> This SF.Net email is sponsored by the Moblin Your Move
Developer’s
> challenge
> Build the coolest Linux based applications with Moblin SDK &
win
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere
in
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>>
> _______________________________________________
> eGroupWare-developers mailing list
> eGroupWare-developers@lists.sourceforge.net
<mailto:eGroupWare-developers@lists.sourceforge.net>
> <mailto:eGroupWare-developers@lists.sourceforge.net
<mailto:eGroupWare-developers@lists.sourceforge.net>>
>
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
>
>
>
>
> --
> Raphael Alla
> Alphalog Calédonie
> Mitija Australia
> +61 4 15 678 576
> +687 78 86 86
> http://www.mitija.com
> http://www.alphalog.nc
>
>
>
>
>
> This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
> Build the coolest Linux based applications with Moblin SDK & win
great prizes
> Grand prize is a trip for two to an Open Source event anywhere in
the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>
>
>
>
> _______________________________________________
> eGroupWare-developers mailing list
> eGroupWare-developers@lists.sourceforge.net
<mailto:eGroupWare-developers@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/egroupware-developers
--
Ralf Becker
eGroupWare Training & Support ==> http://www.egroupware-support.de
Outdoor Unlimited Training GmbH [www.outdoor-training.de
<http://www.outdoor-training.de>]
Handelsregister HRB Kaiserslautern 3587
Geschäftsführer Birgit und Ralf Becker
Leibnizstr. 17, 67663 Kaiserslautern, Germany
Telefon +49 (0)631 31657-0
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in
the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>
_______________________________________________
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
<mailto:eGroupWare-developers@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
–
Raphael Alla
Alphalog Calédonie
Mitija Australia
+61 4 15 678 576
+687 78 86 86
http://www.mitija.com
http://www.alphalog.nc
This SF.Net email is sponsored by the Moblin Your Move Developer’s
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
–
Ralf Becker
Director Software Development
Stylite GmbH
[open style of IT]
Morschheimer Strasse 15
67292 Kirchheimbolanden
fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
cell +49 (0) 170 7815917
mailto: rb@stylite.de
www.stylite.de
www.egroupware.org
Geschäftsführer Andre Keller, Nigel John Vickers,
Gudrun K. Müller und Ralf Becker
Registergericht Kaiserslautern HRB 12087
This SF.Net email is sponsored by the Moblin Your Move Developer’s
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers