[Jifty-commit] r2156 - in jifty/trunk: lib/Jifty lib/Jifty/Web/Form
lib/Jifty/Web/Form/Field
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Nov 14 23:26:53 EST 2006
Author: jesse
Date: Tue Nov 14 23:26:52 2006
New Revision: 2156
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Request.pm
jifty/trunk/lib/Jifty/Result.pm
jifty/trunk/lib/Jifty/Web/Form/Element.pm
jifty/trunk/lib/Jifty/Web/Form/Field.pm
jifty/trunk/lib/Jifty/Web/Form/Field/Combobox.pm
Log:
r44853 at pinglin: jesse | 2006-11-14 23:25:43 -0500
r2123 broke live applications. (it somehow broke certain classes of webservice actions submitted by the client)
Modified: jifty/trunk/lib/Jifty/Request.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Request.pm (original)
+++ jifty/trunk/lib/Jifty/Request.pm Tue Nov 14 23:26:52 2006
@@ -4,7 +4,7 @@
package Jifty::Request;
use base qw/Jifty::Object Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw(top_request arguments just_validating path continuation_id continuation_type continuation_path));
+__PACKAGE__->mk_accessors(qw(_top_request arguments just_validating path continuation_id continuation_type continuation_path));
use Jifty::JSON;
use Jifty::YAML;
@@ -837,7 +837,7 @@
sub is_subrequest {
my $self = shift;
- return $self->_top_request_accessor ? 1 : undef;
+ return $self->_top_request ? 1 : undef;
}
=head2 top_request
@@ -850,8 +850,8 @@
sub top_request {
my $self = shift;
- $self->_top_request_accessor(@_) if @_;
- return $self->_top_request_accessor || $self;
+ $self->_top_request(@_) if @_;
+ return $self->_top_request || $self;
}
package Jifty::Request::Action;
Modified: jifty/trunk/lib/Jifty/Result.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Result.pm (original)
+++ jifty/trunk/lib/Jifty/Result.pm Tue Nov 14 23:26:52 2006
@@ -19,7 +19,7 @@
use base qw/Jifty::Object Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw(failure action_class message content));
+__PACKAGE__->mk_accessors(qw(failure action_class message _content));
=head2 new
@@ -35,7 +35,7 @@
my $self = bless {}, $class;
$self->failure(0);
- $self->_content_accessor({});
+ $self->_content({});
return $self;
}
@@ -146,11 +146,11 @@
sub content {
my $self = shift;
- return $self->_content_accessor unless @_;
+ return $self->_content unless @_;
my $key = shift;
- $self->_content_accessor->{$key} = shift if @_;
- return $self->_content_accessor->{$key};
+ $self->_content->{$key} = shift if @_;
+ return $self->_content->{$key};
}
1;
Modified: jifty/trunk/lib/Jifty/Web/Form/Element.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Element.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Element.pm Tue Nov 14 23:26:52 2006
@@ -134,7 +134,7 @@
=cut
-use constant handlers => qw(onclick);
+use constant handlers => qw(_onclick);
=head2 accessors
@@ -179,7 +179,7 @@
sub onclick {
my $self = shift;
- return $self->_onclick_accessor unless @_;
+ return $self->_onclick unless @_;
my ($arg) = @_;
@@ -213,7 +213,7 @@
}
- $self->_onclick_accessor($arg);
+ $self->_onclick($arg);
}
=head2 javascript
Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field.pm Tue Nov 14 23:26:52 2006
@@ -104,30 +104,8 @@
=cut
-use constant ACCESSORS => qw(
- name
- label
- input_name
- type
- sticky
- sticky_value
- default_value
- action
- mandatory
- ajax_validates
- ajax_canonicalizes
- autocompleter
- preamble
- hints
- placeholder
- focus
- render_mode
- length
- element_id
-);
-
-sub accessors { shift->SUPER::accessors(), ACCESSORS }
-__PACKAGE__->mk_accessors(ACCESSORS);
+sub accessors { shift->SUPER::accessors(), qw(name label input_name type sticky sticky_value default_value action mandatory ajax_validates ajax_canonicalizes autocompleter preamble hints placeholder focus render_mode length _element_id); }
+__PACKAGE__->mk_accessors(qw(name _label _input_name type sticky sticky_value default_value _action mandatory ajax_validates ajax_canonicalizes autocompleter preamble hints placeholder focus render_mode length _element_id));
=head2 name [VALUE]
@@ -213,7 +191,7 @@
# Otherwise, we should ask our action, how to turn our "name"
# into a form input name.
- my $ret = $self->_input_name_accessor(@_);
+ my $ret = $self->_input_name(@_);
return $ret if $ret;
my $action = $self->action;
@@ -257,7 +235,7 @@
sub label {
my $self = shift;
- my $val = $self->_label_accessor(@_);
+ my $val = $self->_label(@_);
defined $val ? $val : $self->name;
}
@@ -273,7 +251,7 @@
sub element_id {
my $self = shift;
- return $self->_element_id_accessor || $self->_element_id_accessor( $self->input_name ."-".Jifty->web->serial);
+ return $self->_element_id || $self->_element_id( $self->input_name ."-".Jifty->web->serial);
}
=head2 action [VALUE]
@@ -287,11 +265,11 @@
sub action {
my $self = shift;
- my $action = $self->_action_accessor(@_);
+ my $action = $self->_action(@_);
# If we're setting the action, we need to weaken
# the reference to not get caught in a loop
- Scalar::Util::weaken( $self->{action} ) if @_;
+ Scalar::Util::weaken( $self->{_action} ) if @_;
return $action;
}
Modified: jifty/trunk/lib/Jifty/Web/Form/Field/Combobox.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field/Combobox.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field/Combobox.pm Tue Nov 14 23:26:52 2006
@@ -27,7 +27,7 @@
@{[ $self->_widget_class('combo-button')]}
></span></span><span style="display: none"></span><select
name="@{[ $self->input_name ]}"
- id="@{[ $self->_element_id_accessor ]}_List"
+ id="@{[ $self->_element_id ]}_List"
@{[ $self->_widget_class('combo-list')]}
onchange="ComboBox_SimpleAttach(this, this.form['@{[ $self->element_id ]}']); "
>
More information about the Jifty-commit
mailing list