Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Display Array  (Read 7554 times)
Candida F.
Posts: 13


« on: June 14, 2010, 12:31:58 pm »

Hi!

I'm having a problem with display array!
The idea is to display the array (for the user to see the information), while in another dialog. The problem is i can only see the first row of the array, although the array has the complete information (ex: 3 rows)

The .per file has the folloing information regarding to the array.

[...]
TABLE t1 ( wantfixedpagesize, width=30 columns, height=10 lines, style="lista" )
{
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
}
end -- TABLE

[...]
tp   = ct_03006.tpdoc, title = "Doc.", justify=center, comments =
        " F10-Ver Documentos p/Email (Tab.171)";
dtp  = formonly.dtp171, noentry, title = " Descricao";
e    = formonly.lemail1, include = (0,1), title = "A", justify=center;
f    = formonly.lemail2, include = (0,1), title = "B", justify=center;
g    = formonly.lemail3, include = (0,1), title = "C", justify=center;
h    = formonly.lemail4, include = (0,1), title = "D", justify=center;
i    = formonly.lemail5, include = (0,1), title = "E", justify=center;
j    = formonly.lemail6, include = (0,1), title = "F", justify=center;
k    = formonly.lemail7, include = (0,1), title = "G", justify=center;
l    = formonly.lemail8, include = (0,1), title = "H", justify=center;
m    = formonly.lemail9, include = (0,1), title = "I", justify=center;
n    = formonly.lemail10, include = (0,1), title = "J", justify=center;


[...]

screen record sc_f03006 (tpdoc,dtp171,lemail1, lemail2, lemail3, lemail4,
                           lemail5,
                           lemail6, lemail7, lemail8, lemail9, lemail10)

[...]

The .4gl has the following code.

[...]
 let ql_03006= a_03006.getLength()
  display array a_03006 to sc_f03006.*
        attribute (count=ql_03006, unbuffered)
     before display
        call ui.Interface.refresh()
        exit display
  end display

[...]

When I display the value of the length of the array, it returns the correct number of rows, but it only displays the information of the first row.

Thanks in advance,
Cāndida
Sebastien F.
Four Js
Posts: 509


« Reply #1 on: June 14, 2010, 02:26:04 pm »

Cāndida,

What version of Genero are you using?

Your request is well-known and you should consider to use multiple-dialogs to solve this.

The reason why you see only one row in the list is because the form file defines only one row, and the DISPLAY ARRAY fills only what is needed by the front-end. Yes there is probably a bug (you specify height=10 lines), but even if we fix this, it would only solve a part of the request: If the user resizes the window, the table grows and more rows are expected to be displayed... Without a real controller behind the table, you can't achieve that properly. This is one of the reasons we have multiple dialogs (Genero 2.10 and +).

https://4js.com/techdocs/genero/fgl/devel/DocRoot/User/NewFeatures.html#VERSION_2_10

Seb
Sebastien F.
Four Js
Posts: 509


« Reply #2 on: June 14, 2010, 03:58:15 pm »

Cāndida,
(Thanks to Rene, who pointed me on this)

I did not realize that you are using wantfixedpagesize, so actually the height of the table cannot be changed by the user...

So yes there is a bug in fglform (it should take the HEIGHT attribute into account) - what version are you using?

You can try the following workaround:

Remove [height=10 lines] and add 10 row placeholders in the table container:

TABLE t1 ( wantfixedpagesize, width=30 columns, style="lista" )
{
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
  [tp  |dtp            ][e][f][g][h][j][k][l][m][n]
}

However, without using multiple dialogs, the end user will not be able to scroll in the list if there are more than 10 rows.

Seb
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines