Problem with Delete id Datastore

2011-05-26 Thread Randell Schneider
Hi There,

I'm Starting a Web Project with GWT  and some problems about datastore
delete by ID.

do not know why having this problem. I think it should be the primary
key generation.

OBS: getters and setters were not placed in this post

Class GRUPO:

import javax.jdo.PersistenceManager;
import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.listener.StoreCallback;

import com.metadot.book.connectr.shared.GrupoDTO;

@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = true)
public class Grupo implements StoreCallback {

 @PrimaryKey
 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 @Extension(vendorName = datanucleus, key = gae.encoded-
pk, value = true)
 private String id;

 @Persistent
 private String GrupoNome;


 @SuppressWarnings(unused)
 @Persistent
 private UserAccount userAccount;

 public Grupo() {
}

 public Grupo(GrupoDTO grupoDTO) {
this();
this.setBasicInfo(grupoDTO.getGrupoNome());
 }
}



Class GrupoList.java:

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.metadot.book.connectr.shared.GrupoDTO;

public class GrupoList extends Composite {

  private static GrupoListUiBinder uiBinder = GWT
  .create(GrupoListUiBinder.class);

  interface GrupoListUiBinder extends UiBinderWidget, GrupoList
{
  }

  @UiField
  VerticalPanel gruposPanel;

  private ListGrupoDTO grupoDTOs;

  private final static GrupoServiceAsync grupoService = GWT
  .create(GrupoService.class);

  public GrupoList() {
initWidget(uiBinder.createAndBindUi(this));
  }

  public GrupoList(ListGrupoDTO grupoDTOs) {
this();
this.grupoDTOs = grupoDTOs;
displayGrupos();
  }

  public void showGrupos() {
   grupoService
   .getGrupos(new AsyncCallbackListGrupoDTO() {
 public void onFailure(Throwable caught) {
   Window.alert(An error occurred);
 }

 public void onSuccess(ListGrupoDTO result) {
grupoDTOs = result;
displayGrupos();
 }
   });
 }

  private void displayGrupos() {
for (final GrupoDTO grupo: grupoDTOs) {
  gruposPanel.add(new GrupoItem(grupo));
}
  }

}



 Class GrupoItem.java:

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.metadot.book.connectr.shared.GrupoDTO;

public class GrupoItem extends Composite {

  private static GrupoItemUiBinder uiBinder = GWT
  .create(GrupoItemUiBinder.class);

  interface GrupoItemUiBinder extends UiBinderWidget, GrupoItem
{
  }

  @UiField
  Label title;
  @UiField
  Button delete, edit;

  GrupoDTO grupo;

  private final static GrupoServiceAsync grupoService = GWT
  .create(GrupoService.class);

  public GrupoItem() {
initWidget(uiBinder.createAndBindUi(this));
  }

  public GrupoItem(String title, String id) {
this();
this.title.setText(title);
  }

  public GrupoItem(GrupoDTO grupoDTO) {
   this();
   this.grupo = grupoDTO;
   this.title.setText(grupo.getGrupoNome());
  }

  public GrupoItem(String title) {
   this();
   this.title.setText(title);
 }

  private static void deleteGrupo(GrupoDTO grupo) {
  grupoService.deleteGrupo(grupo.getId(),
  new AsyncCallbackBoolean() {
public void onFailure(Throwable caught) {
  Window.alert(An error occurred);
}

public void onSuccess(Boolean result) {
  ConnectrApp.get().cancelEditFriend();
  

Re: Error while installing Google Plugin for (Fedora) Eclipse 3.5.1

2010-03-25 Thread Randell
I filed it here:
http://code.google.com/p/google-web-toolkit/issues/detail?id=4791, although
I didn't see any fields to indicate EclipsePlugin.

On Wed, Mar 24, 2010 at 10:36 PM, Rajeev Dayal rda...@google.com wrote:

 Ha, hopefully you won't encounter too many! You can file an issue via this
 URL:

 http://code.google.com/p/google-web-toolkit/issues/list

 When choosing a category, choose EclipsePlugin.

 On Wed, Mar 24, 2010 at 4:23 AM, Randell 
 josephrandell.benavi...@gmail.com wrote:



 On Mon, Mar 22, 2010 at 10:30 PM, Rajeev Dayal rda...@google.com wrote:

 HI Randell,

 Good point - do you mind filing an issue for this?


 Sure thing. How can I file an issue? I'd like to learn how since I'll
 probably be encountering a lot of issues.

 --
 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-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 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-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
http://randell.ph/

-- 
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-tool...@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: Error while installing Google Plugin for (Fedora) Eclipse 3.5.1

2010-03-24 Thread Randell
On Mon, Mar 22, 2010 at 10:30 PM, Rajeev Dayal rda...@google.com wrote:

 HI Randell,

 Good point - do you mind filing an issue for this?


Sure thing. How can I file an issue? I'd like to learn how since I'll
probably be encountering a lot of issues.

-- 
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-tool...@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.



Error while installing Google Plugin for (Fedora) Eclipse 3.5.1

2010-03-19 Thread Randell
I'm getting this error when I'm trying to install the Google Plugin for
Eclipse 3.5.1. I already did a yum remove *eclipse* and removed all
occurrences of find / -name eclipse, then yum install eclipse again, but I'm
getting the same error.

Cannot complete the install because one or more required items could not be
found.
  Software being installed: Google Web Toolkit SDK 2.0.3 2.0.3.v201002191036
(com.google.gwt.eclipse.sdkbundle.e35.feature.2.0.3.feature.group
2.0.3.v201002191036)
  Missing requirement: Google Web Toolkit Plugin 1.3.0.v201003161223
(com.google.gwt.eclipse.core 1.3.0.v201003161223) requires 'bundle
org.eclipse.wst.xml.ui 0.0.0' but it could not be found
  Cannot satisfy dependency:
From: Google Web Toolkit SDK 2.0.3.v201002191036
(com.google.gwt.eclipse.sdkbundle.2.0.3 2.0.3.v201002191036)
To: bundle com.google.gwt.eclipse.core 0.0.0
  Cannot satisfy dependency:
From: Google Web Toolkit SDK 2.0.3 2.0.3.v201002191036
(com.google.gwt.eclipse.sdkbundle.e35.feature.2.0.3.feature.group
2.0.3.v201002191036)
To: com.google.gwt.eclipse.sdkbundle.2.0.3 [2.0.3.v201002191036]

Any clues?

-- 
http://twitter.com/_randell

-- 
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-tool...@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: Error while installing Google Plugin for (Fedora) Eclipse 3.5.1

2010-03-19 Thread Randell
On Fri, Mar 19, 2010 at 10:53 PM, Rajeev Dayal rda...@google.com wrote:

 See http://code.google.com/eclipse/docs/faq.html#wstinstallerror


It solved the problem. Thanks!

Side note: The plugin installation page (
http://code.google.com/eclipse/docs/install-eclipse-3.5.html) should have at
least mentioned the requirement at the top of the page.

-- 
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-tool...@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.