added utility methods to wobject and oo interface to international

This commit is contained in:
JT Smith 2004-06-18 15:50:09 +00:00
parent 20482def49
commit b2728e2781
3 changed files with 107 additions and 16 deletions

View file

@ -420,6 +420,33 @@ sub getValue {
#-------------------------------------------------------------------
=head2 i18n ( id [, namespace ]) {
Returns an internationalized message.
=over
=item id
The identifier for the internationalized message.
=item namespace
The namespace for the internationalized message. Defaults to the namespace of the wobject.
=back
=cut
sub i18n {
my $self = shift;
my $id = shift;
my $namespace = shift || $self->get("namespace");
return WebGUI::International::get($id,$namespace);
}
#-------------------------------------------------------------------
=head2 inDateRange ( )
@ -567,6 +594,20 @@ sub name {
}
#-------------------------------------------------------------------
=head2 namespace ( )
Returns the namespace of this wobject. This is a shortcut for $self->get("namespace");
=cut
sub namespace {
my $self = shift;
return $self->get("namespace");
}
#-------------------------------------------------------------------
=head2 new ( -properties, -extendedProperties [, -useDiscussion ] )
@ -1056,6 +1097,19 @@ sub uiLevel {
#-------------------------------------------------------------------
=head2 wid ( )
Returns the wobject id of this wobject. This is a shortcut for $self->get("wobjectId");
=cut
sub wid {
my $self = shift;
return $self->get("wobjectId");
}
#-------------------------------------------------------------------
=head2 www_copy ( )
Copies this instance to the clipboard.