line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package RapidApp::Module::Combo; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
3051
|
use strict; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
209
|
|
4
|
5
|
|
|
5
|
|
28
|
use warnings; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
134
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
30
|
use Moose; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
32
|
|
7
|
|
|
|
|
|
|
extends 'RapidApp::Module::StorCmp'; |
8
|
|
|
|
|
|
|
|
9
|
5
|
|
|
5
|
|
32664
|
use RapidApp::Util qw(:all); |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
3253
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'name' => ( is => 'ro', required => 1, isa => 'Str' ); |
12
|
|
|
|
|
|
|
has 'displayField' => ( is => 'ro', required => 1, isa => 'Str' ); |
13
|
|
|
|
|
|
|
has 'valueField' => ( is => 'ro', required => 1, isa => 'Str' ); |
14
|
|
|
|
|
|
|
has 'fieldLabel' => ( is => 'ro', lazy => 1, default => sub { (shift)->name } ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# New custom 'allowSelectNone' feature. If true '(None)' will be the first choice |
17
|
|
|
|
|
|
|
# in the dropdown to be able to unset (null/empty) the value by selection. Specific |
18
|
|
|
|
|
|
|
# to 'appcombo2' (see Ext.ux.RapidApp.AppCombo2) |
19
|
|
|
|
|
|
|
has 'allowSelectNone', is => 'ro', isa => 'Bool', default => 0; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub BUILD { |
22
|
6
|
|
|
6
|
0
|
130
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
6
|
50
|
|
|
|
212
|
$self->apply_extconfig( |
25
|
|
|
|
|
|
|
xtype => 'appcombo2', |
26
|
|
|
|
|
|
|
typeAhead => \0, |
27
|
|
|
|
|
|
|
mode => 'remote', |
28
|
|
|
|
|
|
|
triggerAction => 'all', |
29
|
|
|
|
|
|
|
selectOnFocus => \1, |
30
|
|
|
|
|
|
|
editable => \0, |
31
|
|
|
|
|
|
|
#allowBlank => \0, |
32
|
|
|
|
|
|
|
width => 337, |
33
|
|
|
|
|
|
|
name => $self->name, |
34
|
|
|
|
|
|
|
fieldLabel => $self->fieldLabel, |
35
|
|
|
|
|
|
|
displayField => $self->displayField, |
36
|
|
|
|
|
|
|
valueField => $self->valueField, |
37
|
|
|
|
|
|
|
allowSelectNone => $self->allowSelectNone ? \1 : \0 |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
5
|
|
|
5
|
|
51
|
no Moose; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
28
|
|
44
|
|
|
|
|
|
|
#__PACKAGE__->meta->make_immutable; |
45
|
|
|
|
|
|
|
1; |