dont use a cpm, write a model that chains the entity model and does the right thing in get/set.
-igor On Wed, Jan 26, 2011 at 1:25 AM, Xavier López <[email protected]> wrote: > Hi, > > I've got a form with some fields, backed by an entity with a cpm. I've got > one property on the entity which value is calculated in terms of one of the > input fields in the form. It's important to have this field calculated up to > date at form validation time. > I tipically approached this issue by using an > ajaxformcomponentupdatingbehavior to update the entity's calculated field on > every change. Now i'm allowing non-js users into the site, and have mimed > this action with a submit button. But, of course, the user might not press > the button and go straight away without pre-calculating the value > server-side. > I've been thinking about binding a propertymodel to that calculated > property, and somehow make it work like a model, so that its getObject will > calculate the value, and thus have the value calculated before executing the > form validator. > Could you please provide any hint on how tho achieve this, if it is > possible? > > Thank you very much! > Xavier > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
