Hello all,

I'm having a tough issue. GWT is generating a piece of Java code that does
not compile. I wonder if any GWT pro here could help me find a workaround
or an actual fix to whatever is wrong.

First let me explain what I'm attempting to do. I'm annoyed by the fact
that CellTables and the Editor framework don't play well together. So I
decided to implement something that could make this two pieces of GWT code
interact better.

I started by making a merge between ListDataProvider and ListEditor. The
result is the class ListEditorDataProvider attached. This class works fine,
and it's all I needed when I didn't want to edit the elements of the list,
just the list itself (adding or removing elements, for ex.).

I wasn't yet satisfied, because in some cases I did want to edit the
elements of the List. For this reason, I wrote the EditableCellTable class
attached, which uses ListEditorDataProvider. The goal is to make the
integration between Columns and Editors as smooth as I could, and to reduce
some of the boilerplate in user code.
This class got quite complicated, with lots of generics. And I guess my
problem lies somewhere in there.

Before actually using the class, my project's code compiled fine. It was
only after creating my first instance of EditableCellTable, which would
specify actual types to all the generic templates, that I started having
errors.

Besides the two classes above, I attach to this mail the generated java
class that doesn't compile, an example view using this EditableCellTable, a
couple EntityProxies used by the view, as well as an enum. I commented out
"utility code" in EditableCellTable, and other pieces of code which don't
matter. I tried to remove  package declarations and all other references
that could contain my employer's name since I'm not 100% sure they are okay
with it.

I was using GWT2.4.0, but I verified that the problem remains on 2.5.0 as
well. I'm also using kjordan's fix for issue
6912<https://code.google.com/p/google-web-toolkit/issues/detail?id=6912>provided
here<https://groups.google.com/d/msg/google-web-toolkit/E4fyhodXG_c/AF1foDkzxb8J>.
I don't think this fix has anything to do with my problem since it deals
with ExtraTypes, but I thought I should mention it since it relates to code
generation.

Can anybody help me? I'm totally lost on this one.

Thank you very much in advance for any help given,
-- 
Tiago Rinck Caveden

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Attachment: EditableCellTable.java
Description: Binary data

Attachment: ListEditorDataProvider.java
Description: Binary data

Attachment: OrganizationEntityParam.java
Description: Binary data

Attachment: OrganizationEntityParamProxy.java
Description: Binary data

Attachment: OrganizationEntityTypeProxy.java
Description: Binary data

Attachment: OrgEntityTypeEditView.java
Description: Binary data

<!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:c="urn:import:com.google.gwt.user.cellview.client">

	<g:VerticalPanel>
		<g:HorizontalPanel>
			<g:Label><ui:msg key="orgEntityTypeEdit.name">Nom du type d'éntité organisationnelle:</ui:msg></g:Label>
			<g:TextBox ui:field="name"/>
		</g:HorizontalPanel>
		
		<c:CellTable ui:field="acceptableParams"/>
		
		<g:VerticalPanel>
			<g:HorizontalPanel>
				<g:Label><ui:msg key="orgEntityTypeEdit.paramName">Nom:</ui:msg></g:Label>
				<g:TextBox ui:field="paramName"/>
				<g:Label><ui:msg key="orgEntityTypeEdit.paramType">Type:</ui:msg></g:Label>
				<x:EnumListBox ui:field="paramType"/>
				<g:Label><ui:msg key="orgEntityTypeEdit.paramName">Obligatoire:</ui:msg></g:Label>
				<g:CheckBox ui:field="paramMandatory"/>
			</g:HorizontalPanel>
			<g:Button ui:field="btnNewParam"><ui:msg key="orgEntityTypeEdit.btnNewParam">Ajouter paramètre</ui:msg></g:Button>
		</g:VerticalPanel>
		
		<g:Button ui:field="btnSave"><ui:msg key="orgEntityTypeEdit.btnSave">Enregistrer</ui:msg></g:Button>
	</g:VerticalPanel>
</ui:UiBinder> 

Attachment: OrgEntityTypeEditView_RequestFactoryEditorDelegate.java
Description: Binary data

Reply via email to