1 |
<!-- Componente de DIRECCIONES --> |
<!-- Componente de DIRECCIONES --> |
2 |
<neb:Vars> |
<neb:Vars> |
3 |
$masterDatasource # el nombre del datasource del abm |
$masterDatasource # el nombre del datasource del abm |
4 |
$masterBlock => 'addressentityBlock' |
$masterBlock |
5 |
|
$localMasterBlock => 'addressEntityBlock' |
6 |
$fields # una referencia a un array de referencias a hashes. Claves usadas: label, entry, width, name, field |
$fields # una referencia a un array de referencias a hashes. Claves usadas: label, entry, width, name, field |
7 |
$masterBoxLabel => 'Sucursal' |
$masterBoxLabel => 'Sucursal' |
8 |
$detailBlockLabel => 'direcciones' |
$detailBlockLabel => 'Direcciones' |
9 |
$name => 'Direcciones' # el nombre de la página (lo que dice en el tag de la página) |
$name => 'Direcciones' # el nombre de la página (lo que dice en el tag de la página) |
10 |
</neb:Vars> |
</neb:Vars> |
11 |
<!-- datasources --> |
<!-- datasources --> |
26 |
</datasource> |
</datasource> |
27 |
<!-- triggers --> |
<!-- triggers --> |
28 |
<trigger name="addressRollbackTrigger" type="NAMED"><![CDATA[ |
<trigger name="addressRollbackTrigger" type="NAMED"><![CDATA[ |
29 |
import hack |
addressBlock.reset () |
|
hack.rollback(addressBlock) |
|
30 |
]]></trigger> |
]]></trigger> |
31 |
<trigger name="addressDeleteTrigger" type="NAMED"><![CDATA[ |
<trigger name="addressDeleteTrigger" type="NAMED"> |
32 |
addressBlock.deleteRecord() |
addressBlock.deleteRecord() |
33 |
addressBlock.commit() |
try: |
34 |
]]></trigger> |
<neb:Inline>$masterBlock</neb:Inline>.postChanges() |
35 |
|
commitConnection () |
36 |
|
except DBError, err: |
37 |
|
rollbackConnection() |
38 |
|
message = "Hay problemas para borrar" |
39 |
|
genericBox(mesagge+"\n"+str(err),['Aceptar']) |
40 |
|
</trigger> |
41 |
<!-- forms --> |
<!-- forms --> |
42 |
<page name="neb:$name"> |
<page name="neb:$name"> |
43 |
<!-- completar nombres --> |
<!-- completar nombres --> |
55 |
</and> |
</and> |
56 |
</condition> |
</condition> |
57 |
</datasource> |
</datasource> |
58 |
|
|
59 |
<neb:Sub neb:src="nameSearch.nebc" block="addressBlock" idEntry="addressTypeIdEntry" nameEntry="addressTypeNameEntry" |
<neb:Sub neb:src="nameSearch.nebc" block="addressBlock" idEntry="addressTypeIdEntry" nameEntry="addressTypeNameEntry" |
60 |
searchTrigger="callAddressTypeTrigger" dataSource="addresTypeDataSource" idField="_address_type_data._table" |
searchTrigger="callAddressTypeTrigger" dataSource="addresTypeDataSource" idField="_address_type_data._table" |
61 |
nameField="_address_type_data.name" > |
nameField="_address_type_data.name" > |
65 |
<!-- <trigger type="Pre-Focusout" src="askForChangesTrigger"/> --> |
<!-- <trigger type="Pre-Focusout" src="askForChangesTrigger"/> --> |
66 |
<box label="neb:$masterBoxLabel" |
<box label="neb:$masterBoxLabel" |
67 |
x="0" y="0" height="5" width="84"> |
x="0" y="0" height="5" width="84"> |
68 |
<block name="neb:$masterBlock" datasource="neb:$masterDatasource" restrictInsert=""> |
<block name="neb:$localMasterBlock" datasource="neb:$masterDatasource" restrictInsert=""> |
69 |
<neb:Block>my $x = 1; foreach (@$fields) {</neb:Block> |
<neb:Block>my $x = 1; foreach (@$fields) {</neb:Block> |
70 |
<label text="neb:$_->{label}" x="neb:$x" y="1" /> |
<label text="neb:$_->{label}" x="neb:$x" y="1" /> |
71 |
<entry name="neb:$_->{entry}" x="neb:$x" y="2" width="neb:$_->{width}" field="neb:$_->{field}" /> |
<entry name="neb:$_->{entry}" x="neb:$x" y="2" width="neb:$_->{width}" field="neb:$_->{field}" /> |
72 |
<neb:Block>$x+=$_->{width};}</neb:Block> |
<neb:Block>$x+=$_->{width};}</neb:Block> |
73 |
</block> |
</block> |
74 |
</box> |
</box> |
75 |
<box label="neb:$detailBlockLabel" |
<box label="neb:$detailBlockLabel" |
76 |
x="0" y="5" height="15" width="84"> |
x="0" y="5" height="15" width="84"> |
77 |
<block name="addressBlock" datasource="addressDataSource"> |
<block name="addressBlock" datasource="addressDataSource"> |
78 |
<label text="tipo" x="1" y="1"/> |
<label text="Tipo" x="1" y="1"/> |
79 |
<label text="valor" x="30" y="1"/> |
<label text="Valor" x="30" y="1"/> |
80 |
<label text="obsevacion" x="60" y="1"/> |
<label text="Observacion" x="60" y="1"/> |
81 |
<entry name="addressTypeIdEntry" field="_address_data.address_type" rows="8" |
<entry name="addressTypeIdEntry" field="_address_data.address_type" rows="8" |
82 |
x="1" y="2" width="2" hidden="" /> |
x="1" y="2" width="2" hidden="" /> |
83 |
<entry name="addressTypeNameEntry" rows="8" |
<entry name="addressTypeNameEntry" rows="8" |