I have a customcell in my xml file, It contains vertical panel which I have hide, But it cause some UI design issue as CustomCell is not hidde. Can anyone tell me how I can hide my customcell?. Thanks in advance.
<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>
I want to hide the above customcell, which UiField value is ui:field="parentCell"
答案 0 :(得分:1)
g:customCell
标记不是dom元素,而是g:Grid
标记的标记,用于知道哪些项是单元格还是行。这意味着您无法向其中添加html属性。您也不能给它一个ui:field
,因为它根本不是对象。
相反,您可以将它们放在g:customCell
标记内的子Widget上,或者从Java代码中调用grid.getCellFormatter()
并使用其中的方法来进一步格式化包装了小部件。