Note that there are some explanatory texts on larger screens.

plurals
  1. POuibinder gwt method call
    primarykey
    data
    text
    <p>I'm trying to get used to GWT and UiBinder at the moment. But I can't solve this problem. An example to show you what I mean:</p> <p>MainMenu.ui.xml</p> <pre><code>&lt;ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:gwt="urn:import:com.google.gwt.user.client.ui" xmlns:my="urn:import:com.wn.webapp.client.UiBinder"&gt; &lt;gwt:VerticalPanel&gt; &lt;my:TopMenu/&gt; &lt;gwt:VerticalPanel&gt; &lt;gwt:HTMLPanel&gt; &lt;gwt:TextBox/&gt; &lt;/gwt:HTMLPanel&gt; &lt;my:ItemList/&gt; &lt;my:PageMenu/&gt; &lt;/gwt:VerticalPanel&gt; &lt;/gwt:VerticalPanel&gt; &lt;/ui:UiBinder </code></pre> <p>I created a MainMenu and embedded some ui.xml files into it. This works fine. The website looks good.</p> <p>But how can I do this? This is the code for my PageMenu.ui.xml file, which I embedded into MainMenu.ui.xml .</p> <pre><code>public class PageMenu extends Composite{ private static PageMenuUiBinder uiBinder = GWT.create(PageMenuUiBinder.class); interface PageMenuUiBinder extends UiBinderWidget, PageMenu{} public PageMenu(){ initWidget(uiBinder.createAndBindUi(this)); } public void setButtonText(ArrayListString textIds){ //doessomething } } </code></pre> <p>Now I want to call for ex. the setButtonText() method in onModuleLoad().</p> <pre><code>public void onModuleLoad() { MainMenu mainmenu = new MainMenu(); RootPanel.get().add(this.mainmenu); // call it here (setButtonText()) } </code></pre> <p>How can I do this?</p> <p>Greetings Laura (I'm not such an experienced programmer yet. So pls be aware of that, when you try to answer :D) THX</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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