5

Say I have this:

TimeEntryProxy timeEntry = someRequestContext.create(TimeEntryProxy.class);

The created proxy is empty. Is there a way to set some of it's fields with a default value? For example, this proxy has a timeAllocation which is a double. Can it be set to 0 without having to do this:

timeEntry.setTimeAllocation(0);

Thank you

milan
  • 11,872
  • 3
  • 42
  • 49
code-gijoe
  • 6,949
  • 14
  • 67
  • 103

1 Answers1

1

How about setting default values in your custom Locator.create(Class c) method?

milan
  • 11,872
  • 3
  • 42
  • 49
  • it works in dev mode, when creating a proxy and calling persist - by the time it got to the server, the property was there. not sure when RF sets the property, maybe it wont work if you use the property on the client side to set other properties. – milan Dec 16 '11 at 10:02