Editing list of child objects in CellTable

2012-01-19 Thread Maiku
I am trying to set up a CellTable with a HasDataEditor and it appeared
to work up until I tried to create an ActionCell column that launches
a dialog to edit a list of child objects (ex. My main CellTable edits
Fields and my dialog should provide a way to add Attributes like
read-only, enabled, etc. to those Fields). This dialog also uses its
own CellTable (although I suppose I could use a simple ListEditor if
need be) but the CellTable never seems to get any information.

I think I am having problems understanding fundamentally how this
would be hooked up and so I am asking

1. How do others usually deal with a situation of modifying lists of
child objects from their CellTable? Do you use a popup or is there
some way to edit them in place that I am not aware of?

2. Does hooking a CellTable up to a HasDataEditor work at all? I saw
old posts from the beginning of 2011 that suggested it did not but
they referenced a bug in 2.2 that appears to be fixed now.

3. If the q1 is use a popup/dialog and q2 is true, then how would I
set it up that the ActionCell knows to hook up the proxy it receives
to an editor? I couldn't think of it and thus produced the following
which is obviously wrong (given the error I stated in the paragraph
above):

  ActionCellAttributeListProxy presentsCell = new
ActionCellPresentsListProxy(Edit...,
new ActionCell.DelegateAttributeListProxy()
{
   @Override
   public void execute(AttributeListProxy alproxy)
   {
  // Setup a dialog
  // Pass in the RequestContext
  // Start the driver
  // Launch the dialog
  plproxy =
requestContext.create(AttributeListProxy.class);
  AttributeListProxy attributeEditor = new
AttributeListEditor();
  attributeEditor .setRequestContext(requestContext);
  attributeEditor .edit(plproxy);
  attributeEditor .center();
   }
});

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



Editing list of child objects in CellTable

2012-01-19 Thread Maiku
I am trying to set up a CellTable with a HasDataEditor and it appeared
to work up until I tried to create an ActionCell column that launches
a dialog to edit a list of child objects (ex. My main CellTable edits
Fields and my dialog should provide a way to add Attributes like
read-only, enabled, etc. to those Fields). This dialog also uses its
own CellTable (although I suppose I could use a simple ListEditor if
need be) but the CellTable never seems to get any information.

I think I am having problems understanding fundamentally how this
would be hooked up and so I am asking

1. How do others usually deal with a situation of modifying lists of
child objects from their CellTable? Do you use a popup or is there
some way to edit them in place that I am not aware of?

2. Does hooking a CellTable up to a HasDataEditor work at all? I saw
old posts from the beginning of 2011 that suggested it did not but
they referenced a bug in 2.2 that appears to be fixed now.

3. If the q1 is use a popup/dialog and q2 is true, then how would I
set it up that the ActionCell knows to hook up the proxy it receives
to an editor? I couldn't think of it and thus produced the following
which is obviously wrong (given the error I stated in the paragraph
above):

  ActionCellAttributeListProxy presentsCell = new
ActionCellAttributeListProxy(Edit...,
new ActionCell.DelegateAttributeListProxy()
{
   @Override
   public void execute(AttributeListProxy alproxy)
   {
  // Setup a dialog
  // Pass in the RequestContext
  // Start the driver
  // Launch the dialog
  plproxy =
requestContext.create(AttributeListProxy.class);
  AttributeListProxy attributeEditor = new
AttributeListEditor();
  attributeEditor .setRequestContext(requestContext);
  attributeEditor .edit(plproxy);
  attributeEditor .center();
   }
});

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



Re: Canvas, ImageData, and IE9

2011-12-07 Thread Maiku
One thing to mention with this technique is that it is based on the
non-negative winding rule. This means that for complex shapes that
have paths that intersect internally it will depend on the order that
you draw your paths (clockwise or counter-clockwise) whether points
are considered inside the shape or not.

Having said that, I have tried to create a fail case from the example
at 
http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_canvas_ispointinpath
but have not been successful so far so I'm not sure to what extent one
should worry about it.

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



GWT Canvas ImageData requires multiple reads to get value

2011-12-01 Thread Maiku
I am wondering if anyone else has encountered this and if so is it a
bug or simply a misunderstanding on my part of how Canvas's ImageData
works.

I am trying to implement a simple hit detection on my canvas where
each graphic in a list is drawn in a solid colour representing its
index in the list. As I go through the list, I check the Alpha value
at the current mouse coordinates to see if they hit the graphic just
drawn and if so I return that graphic as the one that was selected.

The problem I am getting is that after getting the ImageData from the
Canvas and calling imageData.getAlphaAt(0, 0) I always get 0. After a
bunch of testing I found that if I call it multiple times in a row (at
the same location) I will eventually get the correct value. My code is
like the following:

 hitContext.clearRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);

  ListSymbol graphics = listener.getSymbolList();
  for (int i = graphics.size() - 1; i = 0; i--)
  {
 graphics.get(i).draw(hitContext, i);

 ImageData imageData = hitContext.getImageData(x, y, 1, 1);

 // The coordinates for getAlphaAt are those of the imageData
not the original canvas.
 int alpha = imageData.getAlphaAt(0, 0);// first time this
method is run, this always returns 0. afterwards, returns expected
result
 alpha = imageData.getAlpha(0, 0);   // also returns 0
 alpha = imageData.getAlpha(0,0);   //  returns
correct value


 if (0  imageData.getAlphaAt(0, 0))
 {
 
 }
 }


So is this a bug in GWT or is this call assumed to be asynchronous
(although not stated as such) and if so how should I be handling it?

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



Editor Dialog with CellList does not display DockLayoutPanel

2011-11-03 Thread Maiku
Hello,

I have UIBinder class that extends DialogBox and implements
HasDataEditor using a CellList. I want to show the CellList on the
left hand side of the DialogBox and an editor on the right-hand side
for editing a selected item.

However, when I try to put a DockLayoutPanel the screen does not
render it or any widgets it contains (but it still takes up space if I
specify width and height on the DockLayoutPanel).  The strange thing
is that after a lot of testing I can show the same dialog without the
HasDataEditor attached to any POJO and the DockLayoutPanel will appear
just fine.

Does anyone know if there is an issue with Editor + DockLayoutPanel or
CellList + DockLayoutPanel appearing in a DialogBox?

(I can provide code if necessary this issue has been driving me
crazy for a few days now).

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



Re: Recreating the CellList Showcase example with Editors

2011-10-24 Thread Maiku
Hi Thomas,


After much tinkering, I managed to get it to work but I have 2
questions:

1. It seems to work equally well with ValuePicker or with using the
actual SelectionModel (since I guess the former is just hiding the
implementation of the later) with the exception that either way it
will select multiple rows if my ValueProxy has the same values as
another ValueProxy in the list. I tried to use a KeyProvider that
looks at the hashCode but this has the same effect (which I guess
makes sense if the hash is based on the values?)   So is there a way
to correct this behaviour without adding extraneous fields to my model
or adding a uniqifier to the string?

2. I am trying to generify my dialog that contains the cellList but
I have hit a snag because I require a RequestFactoryEditorDriver
interface to accompany the inner Editor. However, if I use the
following code I get an error like ... is assignable to Editor raw
type but a Parameterization is required.

   interface DriverA, B extends EditorA extends
RequestFactoryEditorDriverA, B
   {
   }

   private final DriverT, Edriver   =
GWT.create(Driver.class);

---

Here is the full source code in case there is some other obvious way I
could be doing this without knowing it:


public class DialogCellListEditorT extends BaseProxy, E extends
EditorT  IsWidget extends DialogBox implements
  IsEditorHasDataEditorT, HasRequestContextT
{

   /**
* Standard interface to allow the binding of the declarative
layout to this
* Editor.
*/
   interface DialogCellListEditorUiBinder extends UiBinderWidget,
DialogCellListEditor?, ?
   {
   }

   interface DriverA, B extends EditorA extends
RequestFactoryEditorDriverA, B
   {
   }

   private static final DialogCellListEditorUiBinder UIBINDER =
GWT.create(DialogCellListEditorUiBinder.class);

   private final DriverT, Edriver   =
GWT.create(Driver.class);

   private RequestContextrequestContext;

   private ClassT  proxyClass;

   private T currentProxy;

   private HasDataEditorT  dataEditor;

   @Ignore
   private E mainEditor;

   @UiField
   FlowPanel container;
   @UiField
   ButtonbuttonAdd;
   @UiField
   ButtonbuttonClose;

   CellListT   cellList;

   private final SingleSelectionModelT selectionModel;

   // TODO Remove. This was used for uniquely identifying new entries
   private int   counter  = 0;

   /**
* Constructor. Binds the declarative XML layout to this Editor and
creates
* the backing ListEditor.
*/
   public DialogCellListEditor(ClassT proxyClass, AbstractCellT
cell, E mainEditor)
   {
  setWidget(UIBINDER.createAndBindUi(this));

  this.proxyClass = proxyClass;
  this.mainEditor = mainEditor;

  // TODO As this is basically the same as comparing the objects,
it may not be adding anything
  ProvidesKeyT keyProvider = new ProvidesKeyT()
  {
 @Override
 public Object getKey(T item)
 {
return (null == item) ? null : item.hashCode();
 }
  };

  cellList = new CellListT(cell, keyProvider);

  dataEditor = HasDataEditor.of(cellList);

  selectionModel = new SingleSelectionModelT(keyProvider);
  cellList.setSelectionModel(selectionModel);
  selectionModel.addSelectionChangeHandler(new
SelectionChangeEvent.Handler()
  {

 @Override
 public void onSelectionChange(SelectionChangeEvent event)
 {
if (null != currentProxy)
{
   // Dealing with the previously selected object. Update
the list with the new version.
   int index =
dataEditor.getList().indexOf(currentProxy);

   T temp =
driver.flush().edit(dataEditor.getList().remove(index));
   dataEditor.getList().add(index, temp);
}

// Dealing with the object now selected
currentProxy = selectionModel.getSelectedObject();
driver.initialize(DialogCellListEditor.this.mainEditor);
driver.edit(currentProxy, requestContext);
 }
  });

  container.add(cellList);

   }

   /**
* Creates a new instance of a LanguageProxy and displays it in a
new
* LanguageEditor added to this screen.
*
* @param event
*   The ClickEvent triggered by the user clicking
buttonAdd.
*/
   @UiHandler(value = buttonAdd)
   void onClickAdd(ClickEvent event)
   {
  T temp = requestContext.create(proxyClass);
  dataEditor.getList().add(temp);
   }

   /**
* Closes this dialog.
*
* @param event
*   The ClickEvent 

Recreating the CellList Showcase example with Editors

2011-10-21 Thread Maiku
Hello,

I have a case for a dialog that operates very similar to the CellList
example included in the Showcase. That is, I need to have the ability
to add items to a list, select them, and display a form (within the
same dialog) for the selected item.

I was trying to set it up with an implementation combination of
HasDataEditor and ValueAwareEditor but even if I get the value from
the CellList's SelectionModel I don't get how I can set the values on
an editor that is dynamically displayed. (I thought maybe of using
another RequestFactoryEditorDriver on the inner editor but this
doesn't seem to work...)

Then during my searches I found some very small amount of information
on ValuePicker. However, I cannot grasp from the code or sparse
documentation whether ValuePicker (as the name implies) is made for
picking an option out of a preset list (like selecting an enum value)
or for getting the value from a dynamic list for use in a separate
editor?

Can anyone provide any clues as to whether ValuePicker is what I
should be using or if there is some way to achieve the concept of a
form displaying the value of item selected from a list?

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



RequestFactoryEditorDriver returns empty array for getPaths

2011-09-29 Thread Maiku
I was banging my head against the wall trying to figure out why my
ListEditor is not displaying any objects from a ListLanguageProxy in
my ConfigProxy.  I then realized I wasn't using the .with command.
So I set it up with the standard idiom:

.with(view.editorDriver().getPaths()).fire();

But then found out that the getPaths() method is returning an empty
array. Is this a known issue (unlikely) or have I set something up
wrong (more likely). Here is a rough outline of my setup for this
editor:

* ConfigPresenter implements Presenter
* ConfigView implements EditorConfigProxy and contains getter
methods annotated with @Path
* ConfigViewImpl implements ConfigView and contains the interface that
extends RequestFactoryEditorDriverConfigProxy, ConfigView

I thought maybe it wasn't working because I use using the simple
version of Driver.initialize(editor) instead of
Driver.initialize(RequestFactory, editor) but after changing it
(granted I had to do it in a rather contrived way as trying to
initialize the Driver from the Presenter like I was previously doing
wouldn't work in this case) the getPaths() still returned an empty
array.

Is there a step that I am missing?

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



Re: Edit an object in a List without a ListEditor

2011-09-27 Thread Maiku
Crud, seems I spoke too soon. The code worked the first time I tried
it but after changing something in a totally different area I get:


com.google.gwt.core.client.JavaScriptException: (TypeError):
__static[524442].call is not a function
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
237)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at
com.google.web.bindery.autobean.gwt.client.impl.ClientPropertyContext
$Setter$.beanSetter(ClientPropertyContext.java)
at
com.google.web.bindery.requestfactory.shared.messages.InvocationMessageAutoBean.traverseProperties(InvocationMessageAutoBean.java:
91)
at
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:
166)
at
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:
101)
at
com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl.doCoderFor(AutoBeanCodexImpl.java:
521)
at
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:
276)
at
com.google.web.bindery.requestfactory.shared.messages.InvocationMessageAutoBean.access
$8(InvocationMessageAutoBean.java:1)
at
com.google.web.bindery.requestfactory.shared.messages.InvocationMessageAutoBean
$2.setOperation(InvocationMessageAutoBean.java:73)
at
com.google.web.bindery.requestfactory.shared.messages.InvocationMessageAutoBean
$1.setOperation(InvocationMessageAutoBean.java:32)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.makePayloadInvocations(AbstractRequestContext.java:
990)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.access
$4(AbstractRequestContext.java:980)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext
$StandardPayloadDialect.makePayload(AbstractRequestContext.java:220)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.doFire(AbstractRequestContext.java:
944)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.fire(AbstractRequestContext.java:
468)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.fire(AbstractRequest.java:
54)
at
com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.fire(AbstractRequest.java:
59)
at
com.myproject.client.activity.ConfigDialogPresenter.edit(ConfigDialogPresenter.java:
97)


I've received a similar error code before when trying to create a List
Editor with UIBinder (but the stack trace was totally different). How
can I debug into this further to find out the problem as it is turning
up in the javascript code?

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



Re: Edit an object in a List without a ListEditor

2011-09-27 Thread Maiku
Hmmm... this looks it might be a bug in the Development mode for
Eclipse under Firefox 6.02 (although I had my ListEditor problem back
in FF 5.0).  Running under IE9 and Chrome both work and using the
Run command in Eclipse (which I assume starts Hosted Mode?) instead
of the Debug command, also allows it to work in Firefox.

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



Re: Edit an object in a List without a ListEditor

2011-09-27 Thread Maiku
Woops, I mean Eclipse Debug runs Development Mode and Eclipse Run
runs Production Mode.  (I keep getting confused with the change in
terminology for the modes :) )

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



Re: Edit an object in a List without a ListEditor

2011-09-26 Thread Maiku
Thanks Thomas,

I had no idea that interface existed. It works a charm now (although,
now I'm considering from a design perspective whether this sort of
manipulation should be done in the editor or the presenter but that's
a philosophical problem :) )

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



Re: Edit an object in a List without a ListEditor

2011-09-25 Thread Maiku
So if I understand correctly, ValueAwareEditor basically allows you to
muck with how the object obtains its values?   I have tried to
implement this in 2.3 but now I am getting a problem with the Config
object not retaining the values set for the LanguageProxy. That is,
the returned ConfigProxy seems to have the values but once the code
calls to the Server side, the values have been reset to null.

In my code:

In ConfigViewImpl (which implements ConfigView which in turn
implements ValueAwareProxyConfigProxy):

pre
   @Override
   public void flush()
   {
  ListLanguageProxy languages = new ArrayListLanguageProxy();

  // Not sure if this is the correct way to create an editable
ValueProxy
  LanguageProxy lang =
requestFactory.configRequest().create(LanguageProxy.class);

  lang.setString(language.getText());
  lang.setDefault(true);
  languages.add(lang);
  proxy.setLanguageList(languages);
   }
...
   @Override
   public void setValue(ConfigProxy value)
   {
  proxy = value;
   }
/pre


Then in ConfigPresenter:

pre
   public void save()
   {
  ConfigRequestContext context =
(ConfigRequestContext)view.getEditorDriver().flush();

  // If I use this code, the values persist properly.
  //LanguageProxy language = context.create(LanguageProxy.class);
  //language.setString(FRA);
  //editProxy.setLanguageList(new ArrayListLanguageProxy());
  //editProxy.getLanguageList().add(language);

  if (null == saveRequest)
  {
 saveRequest = context.save(editProxy);
  }

  view.setLocked(true);

  // Up to this point, the editProxy contains an ArrayList with
the correct LanguageProxy
  saveRequest.fire(new ReceiverVoid()
  {
 @Override
 public void onSuccess(Void response)
 {
view.setLocked(false);
view.close();
 }
  }
/pre

On the server side's Save code, my Config object still contains an
ArrayList with a Language object but the fields of the Language object
are all null. If I use the commented code which sets the values in the
Presenter then those values will persist to the server side
correctly.  Is this an issue with the way I have setup my
ValueAwareEditor, how I created the LanguageProxy, or something else?

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



Edit an object in a List without a ListEditor

2011-09-23 Thread Maiku
Is there a way to setup an editor so with a subeditor for one item
within a list without having to setup a ListEditor? My example is:

I have an ConfigProxy that contains a list of LanguageProxy's (which
contain a language code and a boolean for whether it is the default
language or not).  When the user first starts up the program I need
them to create their ConfigProxy before doing anything and along with
that I want them to specify a default language. That means I want them
to create 1 and only 1 LanguageProxy that will be flushed into the
ListLanguageProxy in ConfigProxy.

Because I want them to only create 1 instance, it seems like overkill
to have to put in a ListEditor but I cannot think of a way to setup
the Path annotations to point a simple editor to object within a
List.

Is this possible?

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



Re: Edit an object in a List without a ListEditor

2011-09-23 Thread Maiku
Hello Thomas,

Thanks for the suggestion. I do not quite understand the user of
ValueAwareEditor though. I have checked the information at
http://code.google.com/webtoolkit/doc/latest/DevGuideUiEditors.html#ValueAwareEditor
and on your blog (http://tbroyer.posterous.com/gwt-21-editors), and
the example in DynaTableRF, but I must say I still do not understand
the intent/use of ValueAwareEditor.

Do you know of any other examples that focus on the core purpose of
ValueAwareEditor or can you explain it more in depth?

On Sep 23, 2:35 pm, Thomas Broyer t.bro...@gmail.com wrote:
 You could edit and flush your subobject from the setValue and flush methods 
 of a ValueAwareEditor. You're not forced to use subeditors foreach and every 
 value.

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



Re: JAXB + GWT

2011-09-16 Thread Maiku
There shouldn't be any problems. In my case, I had my JIBX stuff in a
separate project that got included into my webapp so I had to provide
a *.gwt.xml file in it's base folder and do an include in my main
*.gwt.xml file but other than that everything just worked.

I was working with RPC methods, passing my XML domain objects back and
forth and converting them to XML on the server side without any gwt
related problems.

Now I should note that I had a little it of trouble with JIBX itself
in terms of converting enums to XML but that isn't related to GWT and
a benefit of JIBX is you can modify your java beans to your heart's
content (as long as your mapping files reflect what needs to be
converted) and I was able to solve any problems that way.

Another thing to mention is that JIBX has relatively little in terms
of validation in order to keep its conversion process light. But since
it produces beans you could, in theory, use a jsr 303 implementation
to do the validation annotations there  (a bit of duplication from the
XML schema but can't be helped at the moment).

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



Re: JAXB + GWT

2011-09-15 Thread Maiku
Hi,

If you are not totally tied to JAXB you may want to check out JIBX. I
was successfully using the beans that it creates on both Server side
and Client side.  The way it marshals is by injecting information into
the bytecode and this seems to allow GWT to still recognize the source
of the beans as being the same as the compiled server object.

I have since refactored to use RequestFactory so that this entire
issue is moot but if you cannot then I highly recommend JIBX.

- Mike

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



Re: Trouble with List Editors

2011-08-30 Thread Maiku
Thank you for de-confirming my assumption (which was only based on my
experience and the fact that FavoritesWidget I linked to did not use
UIBinder).  The error that I am receiving is appearing in DevMode but
I am not sure how to go about debugging further to find the root
cause. Any thoughts?

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



Re: Trouble with List Editors

2011-08-29 Thread Maiku
It's unfortunate no one has further input on this. For the time being,
it looks to me like a limitation that you cannot use UIBinder for the
editors that are created by the ListEditor. Can anyone confirm this?

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



Trouble with List Editors

2011-08-17 Thread Maiku
Hello,

I have a model that contains a List of Language objects (which just
contain a string for the language code and boolean to denote
default).  I am trying to setup a List Editor like that shown in
http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/FavoritesWidget.java
for that model (with the major change that I am using
SimpleBeanEditorDriver instead of RequestFactoryEditorDriver).

However, during the creation of the LanguageEditor from the
LanguageListEditor.LanguageEditorSource's create method, it dies on
the call to uiBinder.createAndBindUi. The error seems to refer to
native javascript and I am unsure of how to debug it any further. Does
anyone have suggestions of what is the problem or how I can track it
down further?


22:09:04.490 [ERROR] [viewappdesigner] Failed to create an instance of
'vivid.client.widget.LanguageListEditor' via deferred binding

com.google.gwt.core.client.JavaScriptException: (TypeError):
__static[458906].call is not a function
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
237)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.dom.client.DOMImpl.createElement(DOMImpl.java)
at com.google.gwt.dom.client.Document$.createDivElement$
(Document.java:290)
at com.google.gwt.user.client.ui.HTMLPanel.lt;initgt;
(HTMLPanel.java:79)
at
vivid.client.widget.LanguageEditor_LanguageEditorUiBinderImpl.createAndBindUi(LanguageEditor_LanguageEditorUiBinderImpl.java:
13)
at
vivid.client.widget.LanguageEditor_LanguageEditorUiBinderImpl.createAndBindUi(LanguageEditor_LanguageEditorUiBinderImpl.java:
1)
at vivid.client.widget.LanguageEditor.lt;initgt;
(LanguageEditor.java:50)
at vivid.client.widget.LanguageListEditor
$LanguageEditorSource.create(LanguageListEditor.java:47)
at vivid.client.widget.LanguageListEditor
$LanguageEditorSource.create(LanguageListEditor.java:1)
at
com.google.gwt.editor.client.adapters.ListEditorWrapper.add(ListEditorWrapper.java:
50)
at vivid.client.widget.LanguageListEditor.lt;initgt;
(LanguageListEditor.java:76)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
465)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at
vivid.client.view.ApplicationDialogViewImpl_ApplicationDialogViewImplUiBinderImpl.createAndBindUi(ApplicationDialogViewImpl_ApplicationDialogViewImplUiBinderImpl.java:
26)
at
vivid.client.view.ApplicationDialogViewImpl_ApplicationDialogViewImplUiBinderImpl.createAndBindUi(ApplicationDialogViewImpl_ApplicationDialogViewImplUiBinderImpl.java:
1)
at vivid.client.view.ApplicationDialogViewImpl.lt;initgt;
(ApplicationDialogViewImpl.java:77)
at vivid.client.ClientFactoryImpl.lt;clinitgt;
(ClientFactoryImpl.java:57)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName(ModuleSpace.java:
654)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
458)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at vivid.client.ViewAppDesigner.onModuleLoad(ViewAppDesigner.java:
44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
396)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
193)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
510)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Unknown Source)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at