Naren,

To add to what Geert has said, I think you'll save yourself a lot of
these questions if you go through the in-depth simple blog video
tutorial (http://rifers.org/rife_indepth_simple_blog); it's about the
only thing I had to go through to get going with most of what I know
about the framework.

hth,
eokyere

On 1/9/06, Geert Bevin <[EMAIL PROTECTED]> wrote:
> >         ProductBean pBean
> > =(ProductBean)getSubmissionBean("addproduct",ProductBean.class);
> >         Datasource ds = Datasources.getRepInstance().getDatasource
> > ("mysql");
> >           ContentQueryManager manager = new ContentQueryManager(ds,
> > ProductBean.class);
> >           int id=manager.save(pBean);
>
> I found the problem, you used the persistent(false) constraint on
> your avatar property, this means that RIFE will not persist it. In
> the wiki, this is used as a demo of virtual properties. You also
> forgot to set a mimeType property, this indicates the manager that is
> has to be handled as content instead of regular data. If you don't
> specify it, your data will be stored in the DB table.
>
> > I have one more question, Is any support for localization in this
> > Content
> > Management ?
> >
> > So that I can use different images for different languages.
>
> There is no native support for localization since the CMF relies on
> paths to identify content items. You can use any path you like. If
> you use the ContentQueryManager to store the properties, those paths
> will be auto-generated for you as /lowercase_bean_classname/propertyname
>
> If you set the property to persistent(false), you can store it in any
> path yourself like this:
> manager.getContentManager().storeContent("/localized/language/
> myimage", new Content(MimeType.IMAGE_PNG, pBean.getAvatar()), null);
>
> You can read the javadocs of ContentManager to see how to retrieve
> the content again:
> http://rifers.org/docs/api/com/uwyn/rife/cmf/dam/ContentManager.html
>
> Best regards,
>
> Geert
>
>
> --
> Geert Bevin                       Uwyn bvba
> "Use what you need"               Avenue de Scailmont 34
> http://www.uwyn.com               7170 Manage, Belgium
> gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03
>
> PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
> Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net
>
>
> _______________________________________________
> Rife-users mailing list
> [email protected]
> http://www.uwyn.com/mailman/listinfo/rife-users
>
_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to