hjo
(hjo)
May 17, 2006, 9:17pm
1
Hello,
I use nearly the same textgrid in 2 layouts but the textgrid does not react in the same way:
layout 1:
...
<itr takefullwidth="true">
<rowtabarea textid4="sector" page4="Pruefsektor" height="300">
<tabpage id="Pruefsektor">
<textgrid2 griddataprop="sectorList" width="100%" height="240" selectprop="checked" singleselect="true" withselectioncolumn="true" directselectevent="onclick" singleselectcontextmenu="true">
<column textid="name" property="sector" width="60%" cuttextline="false"/>
<column textid="planned" imageprop="plannedIcon" width="20%" cuttextline="false"/>
<column textid="used" imageprop="usedIcon" width="20%" cuttextline="false"/>
</textgrid2>
</tabpage>
</rowtabarea>
</itr>
...
layout 2
...
<itr takefullwidth="true">
<rowtabarea textid1="sectors" page1="sectors" height="210">
<tabpage id="sectors" takefullheight="true" fixlayout="true">
<itr visibleprop="sectorGridVisible" takefullwidth="true"
height="100%">
<textgrid2 griddataprop="usedSectorList" width="100%"
height="100%" selectprop="checked" singleselect="true" withselectioncolumn="true" directselectevent="onclick" singleselectcontextmenu="true">
<column textid="name" property="sector" width="60%" cuttextline="false"/>
<column textid="planned" imageprop="plannedIcon" width="20%" cuttextline="false"/>
<column textid="used" imageprop="usedIcon" width="20%" cuttextline="false"/>
</textgrid2>
</itr>
</tabpage>
...
Layout 1 works as expected: 3 columns are shown, 1 with the name, 2 with the icons (gif).
In layout 2, only 1 column (name) is displayed, this column is sized to 60 %, the selection column to 40 %. I tried already to use “property” instead of “imageprop” but this doesn’t work either.
BTW: The objects in the textgridcollection are the same.
Thanks in advance for advice.
H. Johannes
…please check the XML code - it was surely not maintained using the Layout Editor!!!
<== is missing in your layout
<== is not possible, only column controls are allows in ITR
Bjoern
This is a nicer layout:
<page model="TestBug1Adapter">
<titlebar name="Template">
</titlebar>
<header withdistance="false">
<button name="Save">
</button>
</header>
<pagebody>
<rowtabarea height="300" textid1="sector" page1="Pruefsektor">
<tabpage id="Pruefsektor">
<itr takefullwidth="true" height="8">
<textgrid2 griddataprop="sectorList" width="100%" height="240" selectprop="checked" singleselect="true" withselectioncolumn="true" directselectevent="onclick" singleselectcontextmenu="true">
<column textid="name" property="sector" width="60%" cuttextline="false">
</column>
<column textid="planned" width="20%" imageprop="plannedIcon" cuttextline="false">
</column>
<column textid="used" width="20%" imageprop="usedIcon" cuttextline="false">
</column>
</textgrid2>
</itr>
</tabpage>
</rowtabarea>
<rowtabarea height="210" textid1="sectors" page1="sectorss">
<tabpage id="sectorss" takefullheight="true" fixlayout="true">
<itr takefullwidth="true" height="100%" fixlayout="true">
<textgrid2 griddataprop="usedSectorList" width="100%" height="100%" selectprop="checked" singleselect="true" withselectioncolumn="true" directselectevent="onclick" singleselectcontextmenu="true">
<column textid="name" property="sector" width="60%" cuttextline="false">
</column>
<column textid="planned" width="20%" imageprop="plannedIcon" cuttextline="false">
</column>
<column textid="used" width="20%" imageprop="usedIcon" cuttextline="false">
</column>
</textgrid2>
</itr>
</tabpage>
</rowtabarea>
</pagebody>
<statusbar withdistance="false">
</statusbar>
</page>
hjo
(hjo)
May 18, 2006, 1:18pm
4
Yes, you’re right :oops: . But it works fine…
Just my second layout (which is a nice layout) doesn’t work as expected (see attachment).
The layout is as following:
<rowtabarea textid1="sectors" page1="sectors" height="210">
<tabpage id="sectors" takefullheight="true">
<itr visibleprop="sectorGridVisible" takefullwidth="true" height="100%">
<textgrid2 griddataprop="usedSectorList" width="100%" height="100%" selectprop="checked" singleselect="true" withselectioncolumn="true" directselectevent="onclick" singleselectcontextmenu="true">
<column textid="name" property="sector" width="60%" cuttextline="false"/>
<column textid="planned" imageprop="plannedIcon" width="20%" cuttextline="false"/>
<column textid="used" imageprop="usedIcon" width="20%" cuttextline="false"/>
</textgrid2>
</itr>
</tabpage>
</rowtabarea>
sectorGridVisible is set to true.
…works perfectly fine on my side - pressed “Refresh” in browser?
Bjoern
hjo
(hjo)
May 18, 2006, 2:33pm
6
Well, the layout is refreshed, the webserver is restarted…
I don’t know why this doesn’t work at me…
However, thanks for your help.
hjo
(hjo)
May 18, 2006, 3:25pm
7
Seems to be a problem inside the adapter.
If I return null or new TEXTGRIDCollection() in getUsedSectorList(), the columns are displayed correctly. But if I return a member variable which is initialized in init() and no more touched, the result is as described before.
…if you could provide a mini adapter + mini page: would be great for us…!
Maybe one thing: you should never change the instance of a textgrid-collection (same with other objects that bind to user interface controls). Instead of doing “new TEXTGRIDCollection()” inside the processing you always should keep the instance stable: e.g. by using the clear() method.
Bjoern