Re: Problem with xml form and two arrays

Alain Siverly <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
DIsplay and Input Array forms with the VDC:
In this case you should separate the array definitions using "TABLE/END" 
for each, like in the attached example.

Best regards
Alain Siverly

VENTAS AG

Am 17.12.13 14:20, schrieb wh:
> Hello,
>
> if you create a form with two arrays, fcompile -xml builds only one
> table instead of two:
>
> example:
> t1.per
> <<<
> database formonly
> screen
> {
> [f1   ]
> [f1   ]
> [f1   ]
> [f2   ]
> [f2   ]
> [f2   ]
> }
>
> attributes
> f1 = formonly.f1;
> f2 = formonly.f2;
>
> instructions
> screen record s1[3] (f1);
> screen record s2[3] (f2);
> after a fcompile -xml -f1.per you got:
>
> <<<
> <?xml version="1.0" encoding="utf-8"?>
> <Form name="f1.afr" sqlDbName="formonly" width="7" height="7"
> delimiters="[]|" encoding="">
> <VBox >
> <Table pageSize="3" tabName="s1" >
> <TableColumn name="formonly.f1" colName="f1" fieldId="0"
> sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="1">
>     <Edit width="5"  />
> </TableColumn>
> <TableColumn name="formonly.f2" colName="f2" fieldId="1"
> sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="2">
>     <Edit width="5"  />
> </TableColumn>
> </Table>
> </VBox>
> <RecordView tabName="formonly">
>      <Link colName="f1" fieldIdRef="0"/>
>      <Link colName="f2" fieldIdRef="1"/>
> </RecordView>
> <RecordView tabName="s1">
>      <Link colName="f1" fieldIdRef="0"/>
> </RecordView>
> <RecordView tabName="s2">
>      <Link colName="f2" fieldIdRef="1"/>
> </RecordView>
> </Form>
> So there is not table with tabName="s2"! but instead the columns of the
> secound table are added to the first.
>
>
> If you insert a line with any content (but not a empty line) between the
> two arrays, the xml is correct:
> <<<
> database formonly
> screen
> {
> [f1   ]
> [f1   ]
> [f1   ]
> x
> [f2   ]
> [f2   ]
> [f2   ]
> }
>
> attributes
> f1 = formonly.f1;
> f2 = formonly.f2;
>
> instructions
> screen record s1[3] (f1);
> screen record s2[3] (f2);
> and you get:
> <<<
> <?xml version="1.0" encoding="utf-8"?>
> <Form name="f1.afr" sqlDbName="formonly" width="7" height="8"
> delimiters="[]|" encoding="">
> <VBox >
> <Table pageSize="3" tabName="s1" >
> <TableColumn name="formonly.f1" colName="f1" fieldId="0"
> sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="1">
>     <Edit width="5"  />
> </TableColumn>
> </Table>
> <Grid width="1" height="4" >
> <Label text="x" posY="3" posX="0" gridWidth="1" guessAlign="L"/>
> </Grid>
> <Table pageSize="3" tabName="s2" >
> <TableColumn name="formonly.f2" colName="f2" fieldId="1"
> sqlTabName="formonly"  sqlType="CHAR(5)" tabIndex="2">
>     <Edit width="5"  />
> </TableColumn>
> </Table>
> </VBox>
> <RecordView tabName="formonly">
>      <Link colName="f1" fieldIdRef="0"/>
>      <Link colName="f2" fieldIdRef="1"/>
> </RecordView>
> <RecordView tabName="s1">
>      <Link colName="f1" fieldIdRef="0"/>
> </RecordView>
> <RecordView tabName="s2">
>      <Link colName="f2" fieldIdRef="1"/>
> </RecordView>
> </Form>
>
> Walter
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
m2menpf.per (text/plain, 2.3 KB)
DATABASE im_ex

LAYOUT
 HBOX
  GRID(HIDDEN)
{
 [mx1                           ] 
  ------------------------------  
}
  END
  TABLE
{
 [bez1                          ] 
 [bez1                          ] 
 [bez1                          ] 
 [bez1                          ] 

}
  END

  VBOX
   GRID(HIDDEN)
{

 [mx2  |mx3                               ] 
  ----- ----------------------------------
}
   END
   TABLE
{
   [t] [spt2                              ]
   [t] [spt2                              ]
   [t] [spt2                              ]
   [t] [spt2                              ]

}
   END
   VBOX
    GRID(HIDDEN)
{
 [mx4  |mx5                                                  |mx6               ]G
  ----- ----------------------------------------------------- ------------------ -
}
    END
    TABLE
{
   [u] [spt3                                                 |fgi3              |g]
   [u] [spt3                                                 |fgi3              |g]
   [u] [spt3                                                 |fgi3              |g]
   [u] [spt3                                                 |fgi3              |g]
   [u] [spt3                                                 |fgi3              |g]
   [u] [spt3                                                 |fgi3              |g]
   [u] [spt3                                                 |fgi3              |g]

}
    END
   END
 END
END

TABLES
menu1, menu2, menu3

ATTRIBUTES
Label mx1  = FORMONLY.txx_Bezeichnung
;
Label mx2  = FORMONLY.txx_Taste
;
Label mx3  = FORMONLY.txx_Bezeichnung2
;
Label mx4  = FORMONLY.txx_Taste2
;
Label mx5  = FORMONLY.txx_Bezeichnung3
;
Label mx6  = FORMONLY.txx_Programm_Modul
;

bez1 = menu1.bez,         AUTONEXT;
t    = menu2.status_feld, AUTONEXT;
ButtonEdit spt2 = menu2.nr_sptxt,   action=f9, image="open";
u    = menu3.status_feld, AUTONEXT;
ButtonEdit spt3 = menu3.nr_sptxt,   action=f9, image="open";
fgi3 = menu3.nr_4gi,      AUTONEXT;
g    = menu3.gui,         AUTONEXT;

#ProgressBar fortschritt = FORMONLY.fortschritt,    VALUEMIN=0, VALUEMAX=100;
#proz                    = FORMONLY.prozent,        NOENTRY ;                

INSTRUCTIONS
DELIMITERS "  "

SCREEN RECORD s_menu1[4] (menu1.bez         THRU menu1.bez)
SCREEN RECORD s_menu2[4] (menu2.status_feld THRU menu2.nr_sptxt)
SCREEN RECORD s_menu3[7] (menu3.status_feld THRU menu3.gui)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.