Hello,
I´m trying to create a simple app using editors and requestfactory,
but when I try to declare for the first time the editor
(articuloEditor = new ArticuloEditor();) I get the following error:
[ERROR] [tecmovin] - Line 48: No source code is available for type
com.test.tecmovin.widgets.ArticuloEditor; did you forget to inherit a
required module?
The import "import com.test.tecmovin.widgets.ArticuloEditor;" is on
the class that calls the editor.
Any Help?
I'm relying on the DynaTableRF Sample code.
Here is the code for the Editor:
public class ArticuloEditor extends Composite implements
Editor<ArticuloProxy> {
interface Binder extends UiBinder<Widget, ArticuloEditor> {
}
public ArticuloEditor() {
initWidget(GWT.<Binder> create(Binder.class).createAndBindUi(this));
}
@UiField
ValueBoxEditorDecorator<String> id;
@UiField
ValueBoxEditorDecorator<String> titulo;
@UiField
ValueBoxEditorDecorator<String> autor;
}
<!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"
xmlns:e='urn:import:com.google.gwt.editor.ui.client'>
<ui:style>
.important {
font-weight: bold;
}
.editField {
display: inline;
width: fieldWidth;
}
.rightAlign {
text-align: right;
}
</ui:style>
<g:HTMLPanel>
<div class="{style.rightAlign}">
ID:
<e:ValueBoxEditorDecorator ui:field="id"
stylePrimaryName="{style.editField}">
<e:valuebox>
<g:TextBox stylePrimaryName="{style.editField}" />
</e:valuebox>
</e:ValueBoxEditorDecorator>
<br />
AUTOR:
<e:ValueBoxEditorDecorator ui:field="autor"
stylePrimaryName="{style.editField}">
<e:valuebox>
<g:TextBox stylePrimaryName="{style.editField}" />
</e:valuebox>
</e:ValueBoxEditorDecorator>
<br />
TITULO:
<e:ValueBoxEditorDecorator ui:field="titulo"
stylePrimaryName="{style.editField}">
<e:valuebox>
<g:TextArea stylePrimaryName="{style.editField}" />
</e:valuebox>
</e:ValueBoxEditorDecorator>
<br />
</div>
</g:HTMLPanel>
</ui:UiBinder>
And the code for the class that creates and calls the editor:
public class PersonEditorWorkflow {
interface Binder extends UiBinder<DialogBox, PersonEditorWorkflow>
{
Binder BINDER = GWT.create(Binder.class);
}
interface Driver extends
RequestFactoryEditorDriver<ArticuloProxy, ArticuloEditor> {
}
@UiField
HTMLPanel contents;
@UiField
DialogBox dialog;
@UiField(provided = true)
ArticuloEditor articuloEditor;
private Driver editorDriver;
private ArticuloProxy articulo;
private TestRequestFactory requestFactory;
public PersonEditorWorkflow(TestRequestFactory requestFactory,
ArticuloProxy articulo)
{
this.requestFactory=requestFactory;
this.articulo=articulo;
articuloEditor = new ArticuloEditor(); //////HERE IS THE ERROR
Binder.BINDER.createAndBindUi(this);
}
.
.
.
.
..
}