Note that there are some explanatory texts on larger screens.

plurals
  1. POMVP - What adjustment must be made to enable a "UiField FlowPanel" to work (rather than "UiField SimplePanel"?
    text
    copied!<p>I changed my "topPanel" UiField to refer to a FlowPanel rather than a SimplePanel.<br> --But, when I do this, the original "setWidget" method in my "View" class is no longer valid.</p> <p>What adjustment (--if any can be made) can I make to allow the FlowPanel "@UiField" to be compile and process correctly?</p> <p>Here is the "View" Class...</p> <pre><code> public class TopPanel extends Composite implements AcceptsOneWidget { - - - //...prev...@UiField //...prev...SimplePanel topPanel; //...Trying to make this work... @UiField FlowPanel topPanel; - - - //...how should this method be modified or replaced to allow the FlowPanel "@UiField" to work?.... @Override public void setWidget(IsWidget w) { topPanel.setWidget(w); } } </code></pre> <p>Here is the uiBinder template...</p> <pre><code>&lt;!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"&gt; &lt;ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"&gt; &lt;ui:style src="app.css" /&gt; &lt;g:HTMLPanel width="50%" height="50%"&gt; &lt;!-- &lt;g:SimplePanel ui:field="topPanel"&gt; --&gt; &lt;g:FlowPanel ui:field="topPanel"&gt; &lt;g:Button text="from aaa: go to bbb" ui:field="topButtonA"&gt;&lt;/g:Button&gt; &lt;g:Button text="from bbb: go to ccc" ui:field="topButtonB"&gt;&lt;/g:Button&gt; &lt;g:Button text="from ccc: go to aaa" ui:field="topButtonC"&gt;&lt;/g:Button&gt; &lt;/g:FlowPanel&gt; &lt;/g:HTMLPanel&gt; &lt;/ui:UiBinder&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload