I'm trying to build a property level custom component in my D2W application (not using Wonder). For testing, I put a simple table with a WOString in the component and in my Java file looks like this:
EOEnterpriseObject object;
String key;
public DBWidgets(WOContext context) {
super(context);
}
public String value(){
return (String)object.valueForKey("name");
}
The WOString's value is bound to value. When I access the component, I get a null pointer exception when it tries to render 'value' because object evaluates to null.
In my rules, I set two rules - one to say - use a D2WCustomComponent for the particular property and the second to specify the particular component (DBWidgets) that I am building.
My actual usage is more complicated but since I was getting this problem, I decided to try it in steps and this is the same problem I have in my component too.
Is there anything else I need to do to be able to use my property level component?
Thanks a ton...
Kamal