Is there a way where I can put non setter/getter methods inside the proxy interface that we define?
For eg..
@ProxyFor( value = requestFactory.example.gwt.server.domain.Person.class )
public interface PersonProxy extends EntityProxy
{
String getLastName();
String getFirstName();
void setLastName( String nachname );
void setFirstName( String vorname );
public Long getId();
public Integer getVersion();
void setProperty(String name, Object value);
}
The last method in the above example throws an exception “Only setters and getters allowed”. Any ways to fix this? Thanks in advance.
No. Proxies can only have getters and setters.
You can however add a method to a
RequestContextfor the same server-side call to be made:Used as:
Note that you cannot use
Objecteither (and before you ask: no, you cannot have overloads so you’d have to addsetPropertyString,setPropertyDate,setPropertyDouble, etc. with similarly named methods on the server-side)