Hello
We have tried to use content management with RIFE. When we tried with the
example http://rifers.org/wiki/display/RIFE/Content+management+framework

and it works like a charm. After that I have write own bean with same thing,
but that does not work. It only insert data in bean table but not in content
store.

I used following code in bean
---------
package app.bean;


import com.uwyn.rife.cmf.CmfProperty;
import com.uwyn.rife.cmf.CmfValidation;
import com.uwyn.rife.cmf.MimeType;

import java.util.*;
import java.text.DecimalFormat;
import java.text.NumberFormat;


public class ProductBean extends CmfValidation
{

 private String mProducttitle=null;
    private float mPrice=Float.parseFloat("0.0");
    private byte[] mAvatar=null;
    private String mDescription=null;
    private Date  mAddProductdate=null;
    private int mId=-1;

    protected void activateValidation()
 {
     addConstraint(new CmfProperty("producttitle")
       .notNull(true)
       .notEmpty(true)
       .maxLength(50));
  addConstraint(new CmfProperty("description")
    .notNull(true)
    .notEmpty(true)
    .minLength(10));
  addConstraint(new CmfProperty("avatar")
    .persistent(false)
    .file(true));
  addConstraint(new CmfProperty("id")
    .saved(false)
    .editable(false));
 }
    public void setId(int id)
    {
      mId=id;
    }
    public int getId()
    {
      return mId;
    }

    public void setProducttitle(String producttitle)
    {
      mProducttitle=producttitle;
    }

    public void setDescription(String description)
    {
     mDescription=description;
    }

    public void setPrice(float price)
    {
     mPrice=price;
    }
    public void setAvatar(byte[] avatar)   {mAvatar=avatar;    }
    public byte[] getAvatar() { return mAvatar; }

    public void setAddProductdate(Date addProductdate) {
     mAddProductdate=addProductdate;
    }
 public String getProducttitle()
 {
  return mProducttitle;
 }

 public String getDescription()
 {
  return mDescription;
 }
 public float getPrice()
 {
 return mPrice;
 }
 public Date getAddProductdate()
 {
  return mAddProductdate;
 }

}
----------------

What am I doing wrong ? What are the main Contrainst that need to apply to
store data in Content Store.

Regards
Naren






_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to