Hi David,

I see what happens, this happens during getSubmissionBean. It needs  
the constraints to see if bean properties need to be filled in  
through a Format constraint that is used to convert a string to the  
actual property.

To solve your problem, I think you can use the beforeSave callback:
http://rifers.org/docs/api/com/uwyn/rife/database/querymanagers/ 
generic/Callbacks.html#beforeSave(BeanType)
http://rifers.org/wiki/display/RIFE/Callbacks

This should make it easier to update the constraints without having  
to add your own Add element. You could even not bother adding the  
contentAttribute constraint in the activateMetaData method and just  
add it for that particular constrained property in your callback.

Hope this helps,

Geert

On 23 Aug 2007, at 16:51, David Herbert wrote:

>
> Thanks Geert for your help on this.
>
> Basically my app uses the default RIFE/CRUD classes.  As I understand
> it I would need to create my own AddCustom class which extends
> com.uwyn.rife.crud.elements.admin.Add and plumb this into the RIFE/ 
> CRUD
> app.  It looks, browsing the source for this latter class, I just need
> to add the line:
>
> validated.activateMetaData();
>
> before the line:
>
> saveAddedEntity(template, validated);
>
> in the "handleSubmission" method? Is this sufficient to ensure that my
> image transform is applied and the data present so that the watermark
> ends up sensible rather than null?  Is this the only change that's
> required? Just feeling my way here.
>
> Thanks for any help,
>
> David Herbert
> British Antarctic Survey.
>
> --  
> This message (and any attachments) is for the recipient only.  NERC  
> is subject
> to the Freedom of Information Act 2000 and the contents of this  
> email and any
> reply you make may be disclosed by NERC unless it is exempt from  
> release under
> the Act.  Any material supplied to NERC may be stored in an electronic
> records management system.
>
>
> >

--
Geert Bevin
Terracotta - http://www.terracotta.org
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to