I have to create a div that totally changes form and size (but not content) based on the value of a variable. I would like do something like this:
<g:FlowPanel styleName="PanelA" ui:field="panelA">
...
<g:HTML styleName="Html1" ui:field="html1"/>
...
<g:HTML styleName="Html2" ui:field="html2"/>
...
</g:Flowpanel>
<g:FlowPanel styleName="PanelA" ui:field="panelB">
...
<g:HTML styleName="Html1" ui:field="html1"/>
...
<g:HTML styleName="Html2" ui:field="html2"/>
...
</g:Flowpanel>
but obviously the compiler give me the error:
Field html1 cannot appear multiple times in one template
There is a way to do what I want like that or I need to use css? Thanks a lot,
Willy
You can not have multiple fields with the same name.
I would declare all the variables but use only the proper ones, like this:
Or just split your layout into set of separate smaller layouts and use the one you want at the time.