Search Results

Search found 45 results on 2 pages for 'uibinder'.

Page 1/2 | 1 2  | Next Page >

  • GWT: uiBinder-based widget cant be instanced second time

    - by Konoplianko
    Hi. I created a widget using GWT uiBinder. It works fine, till the moment when I want to instance it second time. After i call constructor second time it returns only raw description from XML and statements in constructor (rootElement.add( new HTML( "panel1" ), leftId );) are just don't work. It throws no error or warning. Please help Java class: public class DashboardLayout extends Composite { final String leftId = "boxLeft"; final String rightId = "boxRight"; interface DashboardLayoutUiBinder extends UiBinder<HTMLPanel, DashboardLayout> { } private static DashboardLayoutUiBinder ourUiBinder = GWT.create( DashboardLayoutUiBinder.class ); @UiField HTMLPanel htmlPanel; public DashboardLayout() { HTMLPanel rootElement = ourUiBinder.createAndBindUi( this ); this.initWidget( rootElement ); rootElement.add( new HTML( "panel1" ), leftId ); rootElement.add( new HTML( "panel2" ), rightId ); } } XML descriprion: <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' > <g:HTMLPanel ui:field="htmlPanel"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="40%" id="boxLeft" class="boxContextLeft"> </td> <td width="60%" id="boxRight" class="boxContextRight"> </td> </tr> </table> </g:HTMLPanel> </ui:UiBinder>

    Read the article

  • How to declare dependent style names with UiBinder

    - by Eduard Wirch
    I have a simple UiBinder widget containing a TextArea: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <g:TextArea visibleLines="3" /> </ui:UiBinder> I want to control the background color of this textarea for writeable and read only states. GWT uses the "-readonly" style name decorator to achieve this. So I try this: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:style> .textBoxStyle { background-color:yellow; } .textBoxStyle-readonly { background-color:lightgray; } </ui:style> <g:TextArea styleName="{style.textBoxStyle}" visibleLines="3" /> </ui:UiBinder> Obviously this won't work because style names are obfuscated for CssResources resulting in something like this: .G1x26wpeN { background-color:yellow } .G1x26wpeO { background-color: lightgray; } The result HTML for writeable textarea looks like this: <textarea tabindex="0" class="G1x26wpeN" rows="3"/> The read only textarea looks like this: <textarea tabindex="0" class="G1x26wpeN G1x26wpeN-readonly" readonly="" rows="3"/> How do I declare the style so GWT will obfuscate the primary part but not the "-readonly" decdorator? I know that I can disable the obfuscation for the entire style name. But I'd like to keep the obfuscation while making use of the decorators.

    Read the article

  • How to combine multiple uiBinder-based widgets?

    - by jprusakova
    I need to insert a [number of] uiBinder-based widgets into another one, at a particular spot. The inserted widget has a somewhat complicated layout, so I am trying to define it in HTML. referencePanel.add(...) fails with NoSuchElement exception. reference.getElement().toSource returns "undefined". Any suggestions on how to do that? public class AppUIDemo extends Composite { @UiTemplate("AppUIDemo.ui.xml") interface AppUIDemoUiBinder extends UiBinder<Widget, AppUIDemo> { } @UiTemplate("ReferenceUI.ui.xml") interface ReferenceUIUiBinder extends UiBinder<Widget, ReferenceUI> { } private static AppUIDemoUiBinder uiBinder = GWT .create(AppUIDemoUiBinder.class); private static ReferenceUIUiBinder refUIBinder = GWT .create(ReferenceUIUiBinder.class); @UiField HTMLPanel referencePanel; public AppUIDemo() { initWidget(uiBinder.createAndBindUi(this)); ReferenceUI reference = new ReferenceUI(refUIBinder); referencePanel.add(reference, reference.getElement().getId()); } } public class ReferenceUI extends Composite { interface ReferenceUIUiBinder extends UiBinder<Widget,ReferenceUI> { } private static ReferenceUIUiBinder uiBinder = GWT .create(ReferenceUIUiBinder.class); public ReferenceUI() { initWidget(uiBinder.createAndBindUi(this)); } public CreditReferenceUI(final UiBinder<Widget, CreditReferenceUI> binder) { initWidget(binder.createAndBindUi(this)); } }

    Read the article

  • GWT - How to define a Widget outside layout hierarchy in uibinder xml file

    - by mr_room
    Hello, this is my first post. I hope someone could help me. I'm looking for a way to define a widget in UiBinder XML layout file separately, without being part of the layout hierachy. Here's a small example: <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <g:Label ui:field="testlabel" text="Hallo" /> <g:HTMLPanel> ... </g:HTMLPanel> The compile fails since the ui:UiBinder element expects only one child element. In Java Code i will access and bind the Label widget as usual: @UiField Label testlabel; For example, this could be useful when you define a Grid or FlexTable - i want to define the Labels for the table header within the XML layout file, not programmatically within the code. Many thanks in advance

    Read the article

  • Get UiBinder widget to display inline instead of block

    - by Steve Armstrong
    I'm trying to get my UiBinder-defined widget to display inline, but I can't. My current code is: <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'> <ui:style> .section { border: 1px solid #000000; width: 330px; padding: 5px; display: run-in; } </ui:style> <g:HTMLPanel> <div class="{style.section}"> <div ui:field="titleSpan" class="{style.title}" /> <div class="{style.contents}"> <g:VerticalPanel ui:field="messagesPanel" /> </div> </div> </g:HTMLPanel> </ui:UiBinder> This works fine in terms of how the widget looks internally, but I want to throw a bunch of these widgets into a FlowPanel and have them flow when the window is resized. The HTMLPanel is a div, but I can't get the display attribute to assign. I can't force the style name, since the following throws an error: <g:HTMLPanel styleNames="{style.section}"> And I can assign an additional style, but it doesn't apply the display setting. <g:HTMLPanel addStyleNames="{style.section}"> This displays the border and sets the size, as expected, but it doesn't flow. Firebug shows the styles on the div are border, width, and padding, but no display. Is there a way to make a widget in UiBinder so that it'll display inline instead of block? And if so, can I make it compatible with having a VerticalPanel inside (can I do it without making the entire widget pure HTML without any GWT widgets)? PS: I saw question 2257924 but it hasn't had any answers lately, and he seems to be focused on getting a tag, not specifically getting inline layout. I don't care directly about , if I can just get the top-level tag for my widget to flow inline, I'm happy.

    Read the article

  • GWT UiBinder doesn't load the stylesheet

    - by halish
    I wanted to make a GWT widget using UiBinder. So I made: UserPanel.ui.xml like this: <?xml version="1.0" encoding="UTF-8"?> <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'> <ui:with field="res" type="com.example.resources.UserPanelResources" /> <g:VerticalPanel styleNames='{res.userpanel.main}'> ...some other widgets go here... </g:VerticalPanel> </ui:UiBinder> UserPanel.css like this: .main { width: 1000px; background-color: #f9f9fa; padding: 15px 10px; font-family: "Georgia"; } and UserPanelResources.java like: public interface UserPanelResources extends ClientBundle { public interface UserPanelCss extends CssResource { String main(); } @Source("css/userpanel.css") UserPanelCss userpanel(); } All the files and packages are in their place, as everything compiles just fine. But when I run the Development Mode, the styles are not applied! I tried many different approaches, but it still doesn't work. What I noticed, is that in the HTML, the VerticalPanel is given the class name obfuscated by GWT, but the CSS is not send to the browser - in fact, the GWT doesn't even ask for it. Am I missing something?

    Read the article

  • [GWT2] UiBinder work with ToggleButton

    - by EnToutCas
    I'm liking the new GWT2 UiBinder, however, it's not clear whether certain things are achievable using the declarative UI style. For instance, ToggleButton only takes the image instances at construction time (no setters for up/down images). As I understand, UiBinder works in a JavaBean-like reflective way, where the assignable attributes are mapped to corresponding setters. Is this style possible with widgets like ToggleButton, where certain attributes have to be specified at construction time? <g:ToggleButton ui:field="myBtn"></g:ToggleButton>

    Read the article

  • How can I use CssResources in UiBinder a generated Cell?

    - by confile
    I want to generate a Cell for a CellWidget with the UiBinder (UiRenderer). What I did to generate the cell is in MyCell.java: public class MyCell implements AbstractCell<MyDto> { public interface Resources extends ClientBundle { @Source({Css.DEFAULT_CSS }) Css css(); } public interface Css extends CssResource { String DEFAULT_CSS = "test/MyStyle.css"; String test(); } interface MyUiRenderer extends UiRenderer { void render(SafeHtmlBuilder sb, String name, SafeStyles styles); } private static MyUiRenderer renderer = GWT.create(MyUiRenderer.class); Resources resources = GWT.create(Resources.class); @Override public void render(SafeHtmlBuilder safeHtmlBuilder, MyDto model) { SafeStyles style = SafeStylesUtils.fromTrustedString(resources.css().test().toString()); renderer.render(safeHtmlBuilder, model.getName(), style); } } My MyCell.ui.xml file looks like this: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'> <ui:with field="name" type="java.lang.String" /> <ui:with field='styles' type='com.google.gwt.safecss.shared.SafeStyles'/> <div style="{styles}"><ui:text from="{name}" /></div> </ui:UiBinder> MyStyle.css: .test { background-color: red; font-size: 20px; display: flex; ... } When I run my code I get the following error: [DEBUG] [mobile] - Rebinding test.client.app.MyCell.MyUiRenderer [DEBUG] [mobile] - Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator [ERROR] [mobile] - java.lang.String required, but {styles} returns com.google.gwt.safecss.shared.SafeStyles: <div style='{styles}'> (:9) [ERROR] [mobile] - Deferred binding failed for 'test.client.app.MyCell.MyUiRenderer'; expect subsequent failures [ERROR] [mobile] - (GWT.java:72) 2014-06-08 17:15:05,214 [FATAL] Uncaught Exception: Then I tried to this: in my UiBinder but it does not work. How can I use css style from a CssResource in my UiRenderer?

    Read the article

  • How can I use CSS pseudo-classes with GWT's UiBinder?

    - by David
    I've been using the in-line styles approach as recommended by GWT's UiBinder documentation. I'm puzzled, though, about how to use CSS pseudo-classes with UiBinder; for example, suppose I would otherwise (without UiBinder) have this CSS rule: #myLink:hover { background:blue } Can I implement that rule in UiBinder?

    Read the article

  • How To: UiBinder + GWT MVP + multiple independent display areas

    - by Prt Yz
    I am using GWT MVP and UiBinder to create an app with a DockLayoutPanel. I want the north and south docks to be static, containing buttons and links. I want to have dynamic views in the center and two different areas of the east dock. As these dynamic areas should be independent of each other, I am setting up different ActivityMapper and ActivityManager's for each dynamic display area; center, east-top, and east-bottom. How can I independently initialize these 3 different display areas when the application is loaded? How can I switch from one Activity to another in one display area without affecting the other areas? When I use the the PlaceController's goTo to switch from one Place to another in one area, the other area's Activity is stopped. Mayday, please help, mayday! The following is some of my code: AppViewImpl.ui.xml <g:DockLayoutPanel styleName="{style.dockPanel}" unit="PX" width="975px" height="100%"> <!-- DOCK PANEL EAST --> <g:east size="220"> <g:LayoutPanel styleName="{style.eastPanel}"> <g:layer left="0px" width="220px" top="0px" height="105px"> <g:SimpleLayoutPanel ui:field="topRightPanel"/> </g:layer> <g:layer left="0px" width="220px" top="110px" height="340px"> <g:InlineLabel styleName="{style.label}" text="ANOTHER DISPLAY AREA"/> </g:layer> </g:LayoutPanel> </g:east> <!-- DOCK PANEL NORTH --> <g:north size="110"> <g:LayoutPanel styleName="{style.northPanel}"> <g:layer left="0px" width="755px" top="0px" height="105px"> <g:InlineLabel styleName="{style.label}" text="NORTH PANEL"/> </g:layer> </g:LayoutPanel> </g:north> <!-- DOCK PANEL SOUTH --> <g:south size="20"> <g:LayoutPanel styleName="{style.southPanel}"> <g:layer left="0px" width="755px" top="0px" height="20px"> <g:InlineLabel styleName="{style.label}" text="SOUTH PANEL"/> </g:layer> </g:LayoutPanel> </g:south> <!-- DOCK PANEL CENTER --> <g:center> <g:SimpleLayoutPanel ui:field="mainPanel" /> </g:center> </g:DockLayoutPanel> MyModule.java public class MyModule implements EntryPoint { private Place defaultPlace = new DefaultPlace(""); public void onModuleLoad() { // Create ClientFactory using deferred binding so we can replace with // different impls in gwt.xml ClientFactory clientFactory = GWT.create(ClientFactory.class); EventBus eventBus = clientFactory.getEventBus(); PlaceController placeController = clientFactory.getPlaceController(); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper topRightActivityMapper = new TopRightActivityMapper(clientFactory); ActivityManager topRightActivityManager = new ActivityManager(topRightActivityMapper, eventBus); topRightActivityManager.setDisplay(clientFactory.getAppView().getTopRightPanel()); // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper mainActivityMapper = new AppActivityMapper(clientFactory); ActivityManager mainActivityManager = new ActivityManager(mainActivityMapper, eventBus); mainActivityManager.setDisplay(clientFactory.getAppView().getMainPanel()); // Start PlaceHistoryHandler with our PlaceHistoryMapper AppPlaceHistoryMapper historyMapper = GWT .create(AppPlaceHistoryMapper.class); PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper); historyHandler.register(placeController, eventBus, defaultPlace); RootLayoutPanel.get().add(clientFactory.getAppView()); // Goes to place represented on URL or default place historyHandler.handleCurrentHistory(); new AppController(clientFactory); } } AppController.java public class AppController implements AppView.Presenter { private ClientFactory clientFactory; AppController(ClientFactory clientFactory){ this.clientFactory = clientFactory; goTo(new TopRightAPlace("")); } @Override public void goTo(Place place) { clientFactory.getPlaceController().goTo(place); } } TopRightAViewImpl.java public class TopRightAViewImpl extends Composite implements TopRightAView { interface Binder extends UiBinder<Widget, TopRightAViewImpl> { } private static final Binder binder = GWT.create(Binder.class); private Presenter listener; @UiField Button button; public TopRightAViewImpl() { initWidget(binder.createAndBindUi(this)); } @Override public void setName(String name) { button.setHTML(name); } @Override public void setPresenter(Presenter listener) { this.listener = listener; } @UiHandler("button") void onButtonClick(ClickEvent event) { listener.goTo(some other place); } }

    Read the article

  • GWT uibinder composite

    - by Han Fastolfe
    I'm creating a composite uibinder widget with a Label and a TextBox. The intented use is: <x:XTextBox ui:field="fieldName" label="a caption" > The text to be put in the box. </x:XTextBox> I've found how to catch the label with a custom @UiConstructor constructor, I might add another parameter to the constructor, but I would like to know how to get the text from the xml, just like the GWT tag <g:Label>a caption</g:Label> does. Any help is greatly appreciated.

    Read the article

  • UiBinder Dynamic DockPanel

    - by murray
    Simple Question .... If I have a StackLayoutPanel on the left, I want to click it have a dynamically loaded widget in my DockLayoutPanel on right ... similar to the GWt example http://gwt.google.com/samples/Mail/Mail.html.. where clicking anything under mailboxes would trigger a different widget on right...

    Read the article

  • GWT 1.4 TO 2.0 UiBinder

    - by manu sinha
    Hi I am upgrading a project with around 60 java classes, from 1.4 to 2.0 . Apart from replacing deprecated functions, adding generics, will converting the whole project into UI Binder approach i.e. XML and Corresponding working Java classes, be recommended. Or shall i go on adding new UI requirments using Ui Binder and leaving the existing code as it is?

    Read the article

  • Can't get SplitLayoutPanel working - GWT + UIBinder are driving me crazy

    - by Matt H
    ... <g:VerticalPanel styleName="{style.mainVerticalPanel}"> <g:SplitLayoutPanel> <g:north size="700"> <g:VerticalPanel> <g:ScrollPanel styleName="{style.conversationPanelContainer}"> <g:FlexTable ui:field="conversationPanel" styleName="{style.conversationPanel}"></g:FlexTable> </g:ScrollPanel> <g:HorizontalPanel styleName="{style.messageTextAndSendPanel}"> <g:TextBox ui:field="messageText" styleName="{style.messageText}"></g:TextBox><g:Button ui:field="sendButton">Send</g:Button> </g:HorizontalPanel> </g:VerticalPanel> </g:north> <g:south size="300"> <g:button>TestButton</g:button> </g:south> </g:SplitLayoutPanel> </g:VerticalPanel> ... Anything look wrong with this? All I'm trying to do is make a simple split panel but whenever I run this all I get is a blank page. Without any of the SplitPanel stuff, it works fine. The same happens with DockLayoutPanel.

    Read the article

  • GWT: use the same UI template for multiple pages?

    - by janya
    Hello, how can I use the same UI template (*.ui.xml file) with multiple Java objects extending from Composite? I need to build several pages that should display basically the same information with the same layout, but on one page some fields will be editable, and on a different page other fields will be editable. I would like to specify layout only once in ui.xml, and create different behaviors in different *.java classes. Eclipse is giving me a syntax error "FirstAppUI.ui.xml is missing" on @UiTemplate("Template.ui.xml") public class FirstAppUI extends Composite { interface FirstAppUIUiBinder extends UiBinder<Widget, FirstAppUI> { } } thanks! jane prusakova

    Read the article

  • Can I mix declarative and programmatic layout in GWT 2.0?

    - by stuff22
    I'm trying to redo an existing panel that I made before GWT 2.0 was released. The panel has a few text fields and a scrollable panel below in a VerticalPanel. What I'd like to do is to make the scrollable panel with UIBinder and then add that to a VerticalPanel Below is an example I created to illustrate this: public class ScrollTablePanel extends ResizeComposite{ interface Binder extends UiBinder<Widget, ScrollTablePanel > { } private static Binder uiBinder = GWT.create(Binder.class); @UiField FlexTable table1; @UiField FlexTable table2; public Test2() { initWidget(uiBinder.createAndBindUi(this)); table1.setText(0, 0, "testing 1"); table1.setText(0, 1, "testing 2"); table1.setText(0, 2, "testing 3"); table2.setText(0, 0, "testing 1"); table2.setText(0, 1, "testing 2"); table2.setText(0, 2, "testing 3"); table2.setText(1, 0, "testing 4"); table2.setText(1, 1, "testing 5"); table2.setText(1, 2, "testing 6"); } } then the xml: <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:mail='urn:import:com.test.scrollpaneltest'> <g:DockLayoutPanel unit='EM'> <g:north size="2"> <g:FlexTable ui:field="table1"></g:FlexTable> </g:north> <g:center> <g:ScrollPanel> <g:FlexTable ui:field="table2"></g:FlexTable> </g:ScrollPanel> </g:center> </g:DockLayoutPanel> </ui:UiBinder> Then do something like this in the EntryPoint: public void onModuleLoad() { VerticalPanel vp = new VerticalPanel(); vp.add(new ScrollTablePanel()); vp.add(new Label("dummy label text")); vp.setWidth("100%"); RootLayoutPanel.get().add(vp); } But when I add the ScrollTablePanel to the VerticalPanel, only the first FlexTable (test1) is visible on the page, not the whole ScrollTablePanel. Is there a way to make this work where it is possible to mix declarative and programmatic layout in GWT 2.0?

    Read the article

  • How to use imported css styles in GWT correctly

    - by Eduard Wirch
    Imagine you created the following simple widget with UiBinder: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:style type="my.package.Widget1.Widget1Style"> .childWidgetStyle { border-width: 1px; border-style: dotted; } </ui:style> <g:TextArea styleName="{style.childWidgetStyle}"/> </ui:UiBinder> package my.package; // some imports here public class Widget1 extends Composite { private static Widget1UiBinder uiBinder = GWT.create(Widget1UiBinder.class); interface Widget1UiBinder extends UiBinder<Widget, Widget1> { } public interface Widget1Style extends CssResource { String childWidgetStyle(); } @UiField TextArea textArea; public Widget1(String text) { initWidget(uiBinder.createAndBindUi(this)); textArea.setText(text); } } Than you use this simple widget in another (parent) widget you created: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:style> .parentWidgetStyle .childWidgetStyle { margin-bottom: 10px; } </ui:style> <g:VerticalPanel ui:field="listPanel" addStyleNames="{style.parentWidgetStyle}" /> </ui:UiBinder> package my.package; // imports go here public class ParentWidget extends Composite { private static ParentWidgetUiBinder uiBinder = GWT.create(ParentWidgetUiBinder.class); interface ParentWidgetUiBinder extends UiBinder<Widget, ParentWidget> { } @UiField VerticalPanel listPanel; public ParentWidget(final String... texts) { initWidget(uiBinder.createAndBindUi(this)); for (final String text : texts) { final Widget1 entry = new Widget1(text); listPanel.add(entry); } } } What you want to achieve is to get some margin between the Widget1 entries in the list using css. But this won't work. Because GWT will obfuscate the css names. And the obfuscated name for .childWidgetStyle in ParentWidget will be different from the .childWidgetStyle in Widget1. The resulting css will look similar to this: .G1unc9fbE { border-style:dotted; border-width:1px; } .G1unc9fbBB .G1unc9fDa { margin-bottom:10px; } So the margin setting wont apply. How do I do this correctly?

    Read the article

  • GWT styles not applying

    - by sernaferna
    I'm creating a GWT application that uses UiBinder, and I've come across a bizarre problem where styles aren't applying to my elements--until I refresh the browser, and then the styles briefly get applied, in that fraction of a second before the page refreshes. In other words: Open page; none of my defined styles are used. Hit Refresh For a fraction of a second the styles are used, before the page goes blank The page reloads, without the styles again I'm going to include my entire *ui.xml file, because it's not too big. <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:style> .idLabelStyle { font-weight: bold; text-align: center; width: 100px; border-style: solid; border-width: 1px; margin-right: 5px; } .nameLabelStyle { font-weight: bold; text-align: center; width: 500px; border-style: solid; border-width: 1px; margin-right: 5px; } .addressLabelStyle { font-weight: bold; text-align: center; width: 500px; border-style: solid; border-width: 1px; } </ui:style> <g:HTMLPanel> <g:HorizontalPanel> <g:Label addStyleNames="{style.idLabelStyle}">ID</g:Label> <g:Label addStyleNames="{style.nameLabelStyle}">Name</g:Label> <g:Label addStyleNames="{style.addressLabelStyle}">Address</g:Label> </g:HorizontalPanel> </g:HTMLPanel> </ui:UiBinder> I really hope I'm missing something simple.

    Read the article

  • GWT UIBinding cannot find zero-arg constructor

    - by aarestad
    I'm trying my hand at the new GWT 2.0 UIBinder capability, and I have a ui XML that looks like this: <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:my='urn:import:com.mystuff.mypackage'> <g:VerticalPanel> <!-- other stuff --> <my:FileUploadPanel.ValidatingFileUpload styleName="field" ui:field="fileUpload" /> </g:VerticalPanel> ValidatingFileUpload is a non-static inner class contained in FileUploadPanel. It has an explicit zero-arg constructor that simply calls super(). However, when GWT starts up, I get this error: 00:00:18.359 [ERROR] Rebind result 'com.mystuff.mypackage.FileUploadPanel.ValidatingFileUpload' has no default (zero argument) constructors. java.lang.NoSuchMethodException: com.mystuff.mypackage.FileUploadPanel$ValidatingFileUpload.<init>() Any idea what might be going wrong here?

    Read the article

  • Preferred way of using UiBinder with multiple screens

    - by arinte
    We have a GWT app that has multiple screens, based off of a menu. So App loads user sees Do This Do That Each menu item loads a different screen. What is the best way to switch the screens. Right now what I do roughly is RootPanel.get(CONTENT).remove(menu); RootPanel.get(CONTENT).add(new DoThisScreen()); I ask this because it seems on IE 8 (and I am sure 7,6) that the DoThisScreen is basically not recognize by IE's Developer Tool (wannabe firebug tool, when you press F12). Using IE's dev tool I tell it to highlight a textbox in the DoThisScreen, for some reason it won't highlight it or list it in the html.

    Read the article

  • GWT CssResource Customization

    - by Eric Landry
    I'm writing a GWT widget using UIBinder and MVP. The widget's default styles are defined in TheWidgetView.ui.xml: <ui:style type="com.widgetlib.spinner.display.TheWidgetView.MyStyle"> .textbox { border: 1px solid #red; } .important { font-weight: bold; } </ui:style> The widget's CssResource interface is defined in TheWidgetView.java: public class TheWidgetView extends HorizontalPanel implements TheWidgetPresenter.Display { // ... some code @UiField MyStyle style; public interface MyStyle extends CssResource { String textbox(); String important(); } // ... more code } I'd like the consumer of this widget to be able to customize part of the widget's styles and to have this in their MyExample.ui.xml: <ui:style type="com.consumer.MyExample.MyStyle"> .textbox { border: 2px solid #black; } </ui:style> And this be their MyExample.java: public class MyExample extends Composite { // ... some code @UiField MyStyle style; interface MyStyle extends TheWidgetView.MyStyle{ String textbox(); } // ... more code } Is there a way that my widget can have default styles, but that the consumer of the widget can override one of them? When an interface extends TheWidgetView.MyStyle, the of the widget consumer needs to define all the styles listed in that parent interface. I've seen some widget libraries have the widget's constructor take in a ClientBundle as parameter, which I suppose could apply to CssResource. Although, I'm not sure how I'd pass in this style object in a constructor invoked by UIBinder. Thanks much in advance!

    Read the article

1 2  | Next Page >