Date passed via Request Factory always reduced by 8 hours

2011-10-10 Thread Owen Ilagan
Hello all,

I've run into a problem with passing dates from a GWT client to a
backend service via Request Factory. It would seem that in my case
that whatever date value my GWT application would pass gets reduced by
8 hours when it reaches the back end service being invoked. This
appears like some automatic timezone adjustment that I was not told
about. This is a problem since the date/time value is always different
from what the client submitted. To further illustrate lets say I have
a DateBox user input on my application whose value is obtained using
DateBox.getValue(). This value is passed on to the back-end via
RequestFactory's serviceContext.myService(value). But when
myService(Date value) on the back end is executed, the value received
is 8 hours less than what was originally sent by the client.

We ran into this problem when we changed the formatting of a DateBox
to simply MM/dd/ which resulted in the time value submitted to
00:00:00 from 12:00:00. But the back end would receive a date that is
actually the previous day because it was somehow reduced by 8 hours.

- Owen

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



Date Inequalites Resulting in Illegal Argument Exception using JDO

2011-09-25 Thread Owen Ilagan
Hello all,

I just encountered a surprising problem. Given that the way to filter
by Date in JDO is simply:

myQuery.setFilter(someDateField  dateParam);
myQuery.declareParameters(java.util.Date dateParam);
myQuery.execute(new java.util.Date());

It always returns an Illegal argument exception. But if you change the
filter to someDateField == dateParam, then the error goes away
(unfortunately, it doesnt return a match even if the time of day is
already identical down to the last second). There must be something
amiss.

I've already upgraded to AppEngine 1.5.3 and using GWT 2.4.0. Previous
versions still remain on my Eclipse and this project was already using
the current AppEngine and the preceding version of GWT when it was
created so I wonder if that has anything to do with it.

Anyways, I shifted to Objectify and it works so I am inclined to think
this is purely a JDO problem.

- Owen

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



Setting an AbsolutePanel's width to 100% makes it disappear

2011-08-23 Thread Owen Ilagan
Hello,

I have discovered that on GWT 2.3.0, setting an AbsolutePanel's width
to 100% in UiBinder makes it disappear when deployed but that fact is
not shown by the Designer. Curiously, setting a FlowPanel's width to
100% does not have the same effect. I made a UiBinder view with a
FlowPanel containing an AbsolutePanel and was experimenting on how to
make the panels fluid.  I was scratching my head for a long time when
this suddenly happened after making a batch of seemingly harmless
changes. I only discovered the cause of the problem after comparing
with other views that still worked and undoing the previous changes
one by one.

- Owen

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



Still Getting Compilation Warnings after removing all styling

2011-05-16 Thread Owen Ilagan
Hi,

I'm suddenly getting these compilation warnings from a GWT project on
Eclipse. I remember there were users not long ago, who encountered
these before because their style names had a character that caused the
compiler to get confused. But just recently I started getting these
for a UI Binder template in my project that was unchanged and used to
compile without any problems. I've just upgraded to GWT 2.3.0 and
Appengine 1.5.0 and am wondering if this has anything to do with it?

 Scanning for additional dependencies: file:/home/user/
workspace_helios/ManilaHearingAid/src/com/systemacorp/crm/client/view/
ContactListViewImpl.java
  Computing all possible rebind results for
'com.systemacorp.crm.client.view.ContactListViewImpl.ContactListViewImplUiBinder'
 Rebinding
com.systemacorp.crm.client.view.ContactListViewImpl.ContactListViewImplUiBinder
Invoking generator
com.google.gwt.uibinder.rebind.UiBinderGenerator
   The following problems were detected
  [WARN] Line 33 column 1: encountered _. Was
expecting one of: IDENT
  [WARN] Line 38 column 1: encountered _. Was
expecting one of: IDENT
  [WARN] Line 48 column 1: encountered _. Was
expecting one of: IDENT
  [WARN] Line 63 column 1: encountered _. Was
expecting one of: IDENT
  [WARN] Line 71 column 1: encountered _. Was
expecting one of: IDENT
  [WARN] Line 81 column 1: encountered _. Was
expecting one of: IDENT
  [WARN] Line 91 column 8: encountered -. Was
expecting one of: } ; IDENT
  [WARN] Line 94 column 15: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 95 column 14: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 96 column 16: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 97 column 17: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 98 column 18: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 99 column 19: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 100 column 21: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 103 column 14: encountered -. Was
expecting one of: } ; IDENT
  [WARN] Line 106 column 15: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 107 column 17: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 108 column 18: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 109 column 19: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 110 column 21: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 203 column 20: encountered -. Was
expecting one of: } ; IDENT
  [WARN] Line 206 column 15: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 207 column 20: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 208 column 17: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 209 column 18: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 210 column 19: encountered  . Was
expecting one of: IDENT FUNCTION
  [WARN] Line 211 column 19: encountered  . Was
expecting one of: IDENT FUNCTION

-- 
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: Still Getting Compilation Warnings after removing all styling

2011-05-16 Thread Owen Ilagan
Turns out this was a problem caused by subversion. Another developer
using Eclipse, probably using an older version of GWT or Appengine
committed a .classpath and com.google.gwt.eclipse.core.prefs file into
the repository that was brought down to my workstation and caused the
compilation problem. Problem was solved by getting the
right .classpath and com.google.gwt.eclipse.core.prefs file version
from the repository before the problem manifested and made it the
current version.

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



Adding new Entity properties causes old entity records not to be found in appengine queries

2011-05-13 Thread Owen Ilagan
Until recently, adding new properties to an existing entity used by an
application just involved adding the new properties and setters/
getters to the entity class. The currently existing records that do
not have the new properties could still be found by queries. However,
we found that our application could no longer find old records after
adding a few new properties to our entity. Since this was a live
application, we reverted the app back to its previous state and it is
now able to find the old records again. But now we cannot add the new
properties needed to update the application without losing the old
records.

The entity class in question uses JDO and the following annotations:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Page implements Serializable {
private static final long serialVersionUID = 1L;
@PrimaryKey
@Persistent
private String ID;
@Persistent
private String status;
   ...

And this is the query code that searches for records using JDO
Persistence Manager:
Query query = pm.newQuery(Page.class);
query.setFilter(ID == ' + ID + ');
ListPage pages = (ListPage)query.execute();

Now we need to add a couple of new strings and a boolean property, but
cannot without running into the problem described earlier. This is not
the first time however, that we've added properties to this entity
before but we did not encounter this problem back then. Aside from
this, we've also just recently upgraded from AppEngine 1.4.3 to 1.5.0.
Might this be a factor in the situation that we're facing?

- Owen

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



Adding new Entity properties problem

2011-05-13 Thread Owen Ilagan
Until recently, adding new properties to an existing entity used by an
application just involved adding the new properties and setters/
getters to the entity class. The currently existing records that do
not have the new properties could still be found by queries. However,
we found that our application could no longer find old records after
adding a few new properties to our entity. Since this was a live
application, we reverted the app back to its previous state and it is
now able to find the old records again. But now we cannot add the new
properties needed to update the application without losing the old
records.

The entity class in question uses JDO and the following annotations:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Page implements Serializable {
private static final long serialVersionUID = 1L;
@PrimaryKey
@Persistent
private String ID;
@Persistent
private String status;
   ...

And this is the query code that searches for records using JDO
Persistence Manager:
Query query = pm.newQuery(Page.class);
query.setFilter(ID == ' + ID + ');
ListPage pages = (ListPage)query.execute();

Now we need to add a couple of new strings and a boolean property, but
cannot without running into the problem described earlier. This is not
the first time however, that we've added properties to this entity
before but we did not encounter this problem back then. Aside from
this, we've also just recently upgraded from AppEngine 1.4.3 to 1.5.0.
Might this be a factor in the situation that we're facing?

- Owen

-- 
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: Unable to deploy GWT updates

2011-05-11 Thread Owen Ilagan
Hi Alex,

I don't own the app itself, but my account has been authorized by the
owner to update this app and I have been able to update it before. I
just don't know why I keep getting this error now. The only change I
am aware of is upgrading my Eclipse plugin to GWT 2.3.0. What needs to
be done to be able to update this app again with my own account?

- Owen

On May 11, 12:18 am, Alex Humesky ahume...@google.com wrote:
 Hi Owen,
 Check that the account that you're logged into in the Google Plugin
 for Eclipse owns the app ID you're trying to deploy with. If you're
 using two different accounts, say, a personal Google account and
 another one for work, you'll have to sign out of one and then sign
 back into the other.

 Alex, GPE Team

 On May 10, 8:07 am, Owen Ilagan oila...@systemacorp.com wrote: Hello,

  I've been using GWT Plugin for Eclipse for a long time now and after
  upgrading to toolkit version 2.3.0 I am suddenly unable to update my
  existing projects. I keep getting this error:

  Unable to update:
  java.io.IOException: Error posting to 
  URL:https://appengine.google.com/api/appversion/create?app_id=myappversi...
  403 Forbidden
  You do not have permission to modify this app (app_id=u'myapp').

          at
  com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServ 
  erConnection.java:
  245)
          at
  com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServ 
  erConnection.java:
  207)
          at
  com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.jav 
  a:
  638)
          at
  com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersi 
  onUpload.java:
  446)
          at
  com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload 
  .java:
  137)
          at
  com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:
  259)
          at
  com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
  47)
          at
  com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngin 
  eBridgeImpl.java:
  265)
          at
  com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(De 
  ployProjectJob.java:
  144)
          at
  org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorksp 
  aceJob.java:
  38)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

  -

  Can somebody tell me why this is happening?

-- 
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: Unable to deploy GWT updates

2011-05-11 Thread Owen Ilagan
I just had a thought, would this have anything to do with the latest
changes with google accounts? I've been using an account created
through my company's domain (o...@mycompany.com) on google before to
update GWT apps before as well as access the appengine dashboard
portal. But I tried using another account on google (my personal
gmail) and added it as a developer and I could update again.

- Owen

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



Unable to deploy GWT updates

2011-05-10 Thread Owen Ilagan
Hello,

I've been using GWT Plugin for Eclipse for a long time now and after
upgrading to toolkit version 2.3.0 I am suddenly unable to update my
existing projects. I keep getting this error:

Unable to update:
java.io.IOException: Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=myappversion=1;
403 Forbidden
You do not have permission to modify this app (app_id=u'myapp').

at
com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:
245)
at
com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:
207)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
638)
at
com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:
446)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
137)
at
com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:
259)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
47)
at
com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:
265)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:
144)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


-

Can somebody tell me why this is happening?

-- 
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: GWT Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-17 Thread Owen Ilagan
Thanks!

On Apr 16, 6:46 am, Thomas Broyer t.bro...@gmail.com wrote:
 Annotating your classes/fields/accessors is not enough; you need a tool that
 uses those annotations. gwt-servlet-deps only contains the javax.validation
 annotations, not any actual validator.
 Try adding hibernate-validator.jar in your classpath, and see if it makes a
 difference (I bet it will)

-- 
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: GWT Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-15 Thread Owen Ilagan
I dont use Hibernate, just JDO and the javax.validation annotation
classes that came with
gwt-servlet-deps.jar which I already included in my classpath. Am I
supposed to use another
library? I dont see any Unable to initialize a JSR 303 Bean
Validator errors on my console
either.

On Apr 15, 5:36 pm, Thomas Broyer t.bro...@gmail.com wrote:
 Just in case: I suppose you have some JSR 303 validator (hibernate
 validator, for instance) in your classpath?
 If you see the Unable to initialize a JSR 303 Bean Validator log in the
 console, then it's not going to work, as it simply won't validate anything.

-- 
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: GWT Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-15 Thread Owen Ilagan
I meant, I just use plain appengine via JDO.

On Apr 15, 6:11 pm, Owen Ilagan oila...@systemacorp.com wrote:
 I dont use Hibernate, just JDO and the javax.validation annotation
 classes that came with
 gwt-servlet-deps.jar which I already included in my classpath. Am I
 supposed to use another
 library? I dont see any Unable to initialize a JSR 303 Bean
 Validator errors on my console
 either.

 On Apr 15, 5:36 pm, Thomas Broyer t.bro...@gmail.com wrote:







  Just in case: I suppose you have some JSR 303 validator (hibernate
  validator, for instance) in your classpath?
  If you see the Unable to initialize a JSR 303 Bean Validator log in the
  console, then it's not going to work, as it simply won't validate anything.

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



Request Factory: executing request method with entity proxy parameter does not fire callback

2011-04-14 Thread Owen Ilagan
Hi!

I've managed to get Request Factory to work somewhat, but I'm stuck at
a point where I attempt to execute this code in my client Activity
class:

AppRequestFactory factory = clientfactory.getAppRequestFactory();
EmployeeProxy employeeProxy =
factory.employeeRequest().create(EmployeeProxy.class);
employeeProxy.setDepartment(New Department);
employeeProxy.setUserName(Owen);
employeeProxy.setPassword(password);
factory.employeeRequest().getStatus(employeeProxy).fire(new
ReceiverString() {
  ...
}

If I pass my entity proxy, the method does not fire any of the
Receiver callback methods and no server errors are reported on the
Eclipse console. But if I modify the expected parameter to a primitive
type or remove it altogether, I get a successful response. So I
suspect there is something wrong with the way I defined my one of my
request factory objects but a solution still eludes me...

My Proxy Class:
@ProxyForName(value=com.systemacorp.starter.server.domain.Employee,
locator=com.systemacorp.starter.server.domain.EmployeeLocator)
public interface EmployeeProxy extends EntityProxy {

  String getUserName();
  String getDepartment();
  String getPassword();

  void setUserName(String userName);
  void setDepartment(String department);
  void setPassword(String password);

  Long getId();
  Integer getVersion();
}

My Request Class:
@ServiceName(value=com.systemacorp.starter.server.domain.EmployeeServiceInt,
locator=com.systemacorp.starter.server.domain.EmployeeServiceLocator)
public interface EmployeeRequest extends RequestContext {

  RequestLong countEmployees();
  RequestString getStatus(EmployeeProxy instance);
  RequestVoid add(EmployeeProxy instance);
  RequestVoid delete(EmployeeProxy instance);

}

My Domain Class:
@Entity
public class Employee {
  private String userName;
  private String department;
  private String password;

  @Id
  @Column(name = id)
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @Version
  @Column(name = version)
  private Integer version;

  public String getUserName() {
  return userName;
  }
  public void setUserName(String userName) {
  this.userName = userName;
  }
  public String getDepartment() {
  return department;
  }
  public void setDepartment(String department) {
  this.department = department;
  }
  public String getPassword() {
  return password;
  }
  public void setPassword(String password) {
  this.password = password;
  }

  public Long getId() {
  return id;
  }
  public void setId(Long id) {
  this.id = id;
  }
  public Integer getVersion() {
  return version;
  }
  public void setVersion(Integer version) {
  this.version = version;
  }

}

If more sample code is needed, just let me know.

-- 
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: Request Factory: executing request method with entity proxy parameter does not fire callback

2011-04-14 Thread Owen Ilagan
Forgot to add this...

My Entity Locator Class:
public class EmployeeLocator extends LocatorEmployee, Long{

public static final PersistenceManager persistenceManager() {
return PMF.get().getPersistenceManager();
}

@Override
public Employee create(Class? extends Employee clazz) {
try {
return clazz.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return null;
}

@Override
public Employee find(Class? extends Employee clazz, Long id) {
System.out.println(Finding entity...);
return persistenceManager().getObjectById(clazz, id);
}

@Override
public ClassEmployee getDomainType() {
return null;
}

@Override
public Long getId(Employee domainObject) {
return domainObject.getId();
}

@Override
public ClassLong getIdType() {
return Long.class;
}

@Override
public Object getVersion(Employee domainObject) {
return domainObject.getVersion();
}

}

-- 
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: Request Factory: executing request method with entity proxy parameter does not fire callback

2011-04-14 Thread Owen Ilagan
Hey thanks! It worked. I didn't know I was creating two different
instances with employeeRequest().

On Apr 14, 6:53 pm, Thomas Broyer t.bro...@gmail.com wrote:
 The fire(Receiver) method of a Request is just a shortcut for
 Request#to(Receiver) and RequestContext#fire().

-- 
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 Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-14 Thread Owen Ilagan
Hi!

So I finally got Request Factory to work on my Eclipse environment and
I'm trying out the Entity validation features. Following the example
on the tutorial, I add @NotNull to my Entity class property like so:

import javax.validation.constraints.NotNull;
@Entity
public class Employee {
  @NotNull
  private String userName;
 ...

Then I try to trigger the onViolation callback by using:

AppRequestFactory factory = clientfactory.getAppRequestFactory();
EmployeeRequest context = factory.employeeRequest();
EmployeeProxy employeeProxy = context.create(EmployeeProxy.class);
employeeProxy.setDepartment(New Department);
employeeProxy.setPassword(password);
employeeProxy.setUserName(null);
context.add(employeeProxy).fire(new ReceiverLong() {
...

Unfortunately, the add method succeeds every time I run it even if the
userName property is not set or purposely set to null, as in this
case. Is there something I'm missing here? I haven't tried the other
validation options yet since I can't get something this simple to work
and they'll probably get the same result as this.

Although it might not be related, I'm also not using any Locators for
this entity and use @ProxyForName because of a bug in GWT Plugin for
Eclipse.

- Owen

-- 
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: Getting Request Factory to work on the GWT-Eclipse environment

2011-04-13 Thread Owen Ilagan
So I actually found a bug huh? Thanks for the quick response. I hope
this bug will be fixed in the near future.

On Apr 13, 4:40 pm, Thomas Broyer t.bro...@gmail.com wrote:

 This is actually a bug in the Google Plug for Eclipse. Your code will work.
 Seehttp://code.google.com/p/google-web-toolkit/issues/detail?id=5587

  How can I resolve this?

 If it really bothers you, you can replace your @ProxyFor and/or @Service
 annotations with @ProxyForName and @ServiceName. You'll lose compile-time
 type-safety and class-reference checks though, and you'll have to be careful
 when refactoring (renaming, moving around) your server-side classes.

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



Getting Request Factory to work on the GWT-Eclipse environment

2011-04-12 Thread Owen Ilagan
Hello!

I'm trying to make Request Factory work on GWT plug-in (2.2.1) for
Eclipse 3.6 and I've run into a dilemma. While I got most of the
coding required done, not an easy task given that I had to go through
a lot of references and head scratching, my real troubles began when I
put persistence code which is supposed to be server-side only on my
service/locator classes. I use the same persistence code framework
that I normally use for RPC style services. Obviously, GWT would
refuse to compile when code like that is present in the client or
shared package. However, if I move the offending class to the server
package, the GWT editor reports an impending build error because the
class referenced by the @Service annotation in other classes is no
longer included in the client/shared package. How can I resolve this?
I've tried other sample code before but I have no idea how the others
got them to work without getting past this.

- Owen

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



java.util.List set method makes affected item null

2011-01-28 Thread Owen Ilagan
Hi there,

Has anyone ever encountered this problem using the List's set method?

For example:

ListMyItems list = new VectorMyItems();
...then you populate the list using a few
   list.add(new MyItems(xxx));

When you do, list.get(some index) it returns the item.
But when you do list.set(some index, new MyItems(xxx))
then do list.get(same index), it returns null.

- Owen

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



Using multiple views in one place

2011-01-13 Thread Owen Ilagan
Has anyone tried using multiple views in one Place then having
separate activities for each one? This scenario occurred to me when I
wanted to save work on having to repeat the same header for multiple
Places in my application. It was done using one view as a container,
acting like a frame for a header view and a body view so that every
time my app would move from one place to another, the activity code
would just get the root view then replace the child widget in the body
with the view I wanted to show thus keeping the header view in place
without having to repeat it all over different views if I didn't use
this technique. It works fine, except that I am bothered by the fact
that I have a Place and Activity for the header view separate from the
others which is doesn't quite fit the essence of Activities and Places
as I understand them. Ideally, there should be only one Place and
Activity for each page in my application. It just so happens that in
order to save coding for sections of a place that are repeated over
many places, I have to define a separate Place and Activity class for
it. Perhaps there could be a new concept that will cover this gray
area that would make it easier explain separately defined repeating
sections of a Place.

- Owen

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