Form view keeps headers in table view

Hi,
When the table view is expanded to the form view, the table headers remain visible. For example, this is my Determination table collapsed:


And this is expanded:

This happens to all my tables.

Here are the definitions for the Determination form and table views:

		<viewdef type="formtable" name="Determination Compact Table" class="edu.ku.brc.specify.datamodel.Determination" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
			<desc>Determination subform table for Collection Object form.</desc>
			<definition>Determination Compact</definition>
		</viewdef>
		<viewdef name="Determination Compact" type="form" class="edu.ku.brc.specify.datamodel.Determination" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
			<desc>Determination subform for Collection Object form.</desc>
			<enableRules/>
			<columnDef os="table">2px,1px,1px,1px,1px,2px,1px,2px</columnDef>
			<columnDef os="lnx">2px,1px,1px,1px,1px,2px,1px,2px</columnDef>
			<columnDef>300px,0px,30px,0px,30px,0px,40px,0px,200px,0px,80px,0px,80px</columnDef>
			<rowDef auto="true" cell="p" sep="2px"/>
			<rows>
				<row>
					<cell type="label" labelfor="1"/>
					<cell type="field" id="1" name="taxon" uitype="querycbx" initialize="name=Taxon"/>
					<cell type="label" label=""/>
					<cell type="field" id="3" name="isCurrent" uitype="checkbox"/>
					<cell type="label" label=""/>
					<cell type="field" id="a" name="taxon.isAccepted" uitype="checkbox"/>
					<cell type="label" labelfor="8"/>
					<cell type="field" id="8" name="qualifier" uitype="text"/>
					<cell type="label" labelfor="12"/>
					<cell type="field" id="12" name="remarks" uitype="textareabrief" rows="1"/>
					<cell type="label" labelfor="5"/>
					<cell type="field" id="5" name="determiner" uitype="querycbx" initialize="name=Agent"/>
					<cell type="label" labelfor="6"/>
					<cell type="field" id="6" name="typeStatusName" uitype="combobox"/>
				</row>
			</rows>
		</viewdef>
		<viewdef type="formtable" name="Determination Table" class="edu.ku.brc.specify.datamodel.Determination" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
			<desc>Determination subform table for Collection Object form.</desc>
			<definition>Determination</definition>
		</viewdef>
		<viewdef name="Determination" class="edu.ku.brc.specify.datamodel.Determination" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
			<desc>Determination subform for Collection Object form.</desc>
			<enableRules/>
			<columnDef os="lnx">2px,0px,4px,0px,1px,0px,1px,0px,1px,0px,1px,0px,1px,0px,2px,0px,2px</columnDef>
			<columnDef>p,2px,210px,10px:g,p,10px,p,2px,p,p:g,p,2px,p,p:g,20px</columnDef>
			<!-- <columnDef os="mac">130px,2px,260px,5px,100px,2px,288px,5px,108px,2px,180px,0px,p:g</columnDef>
            <columnDef os="exp">p,2px,p:g,5px:g,p,2px,p:g,5px:g,p,2px,p:g(2),0px</columnDef>-->
			<rowDef auto="true" cell="p" sep="2px"/>
			<rows>
				<row>
					<cell type="label" labelfor="1"/>
					<cell type="field" id="1" name="taxon" uitype="querycbx" initialize="name=Taxon"/>
					<cell type="field" id="3" name="isCurrent" uitype="checkbox"/>
					<cell type="label" labelfor="8"/>
					<cell type="field" id="8" name="qualifier" uitype="text"/>
					<cell type="label" labelfor="6"/>
					<cell type="field" id="6" name="typeStatusName" uitype="combobox"/>
					<cell type="label" labelfor="typenotes"/>
					<cell type="field" id="typenotes" name="text4" uitype="text"/>
				</row>
				<row>
					<cell type="label" labelfor="13"/>
					<cell type="field" id="13" name="preferredTaxon" uitype="text" readonly="true"/>
				</row>
				<row>
					<cell type="label" labelfor="12"/>
					<cell type="field" id="12" name="remarks" uitype="textareabrief" rows="1" colspan="3"/>
					<cell type="label" labelfor="7"/>
					<cell type="field" id="7" uitype="plugin" name="this" initialize="name=PartialDateUI;df=determinedDate;tp=determinedDatePrecision" uifieldformatter="Date" colspan="5"/>
				</row>
				<row>
					<cell type="label" labelfor="5"/>
					<cell type="field" id="5" name="determiner" uitype="querycbx" initialize="name=Agent"/>
				</row>
			</rows>
		</viewdef>

Any ideas of why this happens?

Hi @sorosoro,

This was an intentional design decision made for several reasons, the most important reasons being:

  1. It reduced “jumping” in the application. When records were added or removed from a one-to-many table subview, the form would not jump, preventing users from accidentally clicking on the wrong thing.
  2. It maintains the headings for items below or between the expanded line in the table.

When viewed in isolation, the headings may not seem useful. However, as mentioned earlier, removing the headings when the top record was expanded led to the application dynamically hiding and showing the headings. This resulted in “jumping” behavior, which could lead to misclicks or make it difficult to determine which fields were being displayed.

If you have a subview that nearly always has a single record, we recommend using the “form” view rather than the “table” view.

Let me know if you have any questions or need help customizing which view (form or table) a subview should display! Thank you so much for your question!

1 Like

Thanks for the explanation with the screenshots. I don’t quite understand the jumping behaviour, but it is clear that the headers are helpful for the non-expanded items in the table. Generally I prefer the table view, but as you suggest, I’ll probably change to form view for some tables.
Cheers Grant!

Maybe the headers can have their alpha opacity set to 0 when the table is expanded. This would keep the page from jumping and be minimal coding to achieve.

Sounds good. Is it possible to do that? Maybe it’s too much work for a the improvement it provides, I don’t know.