Jason Johnston wrote:
Kamal Bhatt wrote:
Kamal Bhatt wrote:
Hi
I have a CForm that binds to a java object. If there are no
validation errors (ie the continuation is not called) then the form
saves correctly. However, if there was a validation error, you fix
the error and you try and save again, the form does not bind
correctly (form.save fails). Instead, it returns null.
When you say "it returns null", what exactly is null? The new values
in the object you're saving to? The return value of the Form.save()
method call?
The values in the fields of the object being bound. Eg., I have a get
function called "getBrandField". When I run this before the save, it
returns a value, after the value, it returns nulll.
What is the likely cause of this?
Due to the sheer amount of source code associated with this stuff, I
will provide source on request. No point in adding a truck load of
code for no reason.
Cheers.
OK, worked out what was failing, now, I need to understand why.
On my form.showForm, I would pass in some work data. When I removed
this data, it stopped being a problem. It was being spit out on the
form as a hidden input, but it wasn't really being used. I thought
you could pass variables into showForm. If that is the case, what is
wrong with what I did?
Yes you can pass view data as the second argument to Form.showForm;
this is a very common use case so I'm surprised you're seeing issues.
So am I.
--
Kamal Bhatt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]