• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
'object' not getting initialized in D2WCustomComponent sub class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'object' not getting initialized in D2WCustomComponent sub class


  • Subject: 'object' not getting initialized in D2WCustomComponent sub class
  • From: Kamal D Shah <email@hidden>
  • Date: Fri, 2 Jan 2009 15:16:16 +0530

Hi all,

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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: 'object' not getting initialized in D2WCustomComponent sub class
      • From: Ramsey Lee Gurley <email@hidden>
  • Prev by Date: Not finding binding with "$^" notation
  • Next by Date: Removing < > = etc. from the drop down in D2W search
  • Previous by thread: Re: Not finding binding with "$^" notation
  • Next by thread: Re: 'object' not getting initialized in D2WCustomComponent sub class
  • Index(es):
    • Date
    • Thread