我的xml文件中有一个customcell,它包含我隐藏的垂直面板,但它会导致一些UI设计问题,因为CustomCell不是hidde。谁能告诉我如何隐藏我的自定义单元?提前致谢。
<g:customCell styleName="width:15%;" ui:field="parentCell"
visible="false">
<g:VerticalPanel visible="false" ui:field="SortVPanel">
<g:Grid width="100%">
<g:row>
<g:customCell >
<g:Label styleName="float-left" wordWrap="false" width="65px" >
<ui:msg key="lblSort"> Sort By </ui:msg></g:Label>
</g:customCell>
<g:customCell styleName="cell-width83">
<c:ComboBoxComponent />
</g:customCell>
</g:row>
</g:Grid>
</g:VerticalPanel>
</g:customCell>
我想隐藏上面的自定义单元格,其字段值为ui:field =“parent Cell”
g:customCell
标签不是dom元素,而是g:Grid
标签的标记,用于了解哪些项目是细胞与行。这意味着您无法向其添加html属性。你也不能给它一个ui:field
,因为它根本不是一个对象。
相反,你把它们放在生活在g:customCell
标签内的子Widget上,或者从你的Java代码中,你可以调用grid.getCellFormatter()
并使用那里的方法来进一步格式化包装小部件的单元格。