Hi,

On 18/05/2010 00:29, tomasz bandura wrote:
> 
> I'm playing with click&gae and noticed a small problem/question:
> 
> If i have 'com.google.appengine.api.datastore.Text' type field, the
> function 'form.copyTo' doesn't copy its value to entity.


The issue is most likely that Text is not a recognized type. You could create a 
custom field and
implement the getValueObject/setValueObject to handle the Text type:

public class GaeTextField extends Field {

    ...
    private Text text;

    @Override
    public Object getValueObject() {
        if (text == null) {
            return null;
        } else {
            return text.getValue();
        }
    }

    @Override
    public void setValueObject(Object object) {
        if (object != null && object instanceof Text) {
            this.text = (Text) object;
        }
    }
}

Hope this helps.

Kind regards

Bob

Reply via email to