• 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
Re: 'object' not getting initialized in D2WCustomComponent sub class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'object' not getting initialized in D2WCustomComponent sub class


  • Subject: Re: 'object' not getting initialized in D2WCustomComponent sub class
  • From: Ramsey Lee Gurley <email@hidden>
  • Date: Tue, 06 Jan 2009 10:34:12 -0500

The values for object and key should be getting passed to the component by your page. Making them public might get them to synchronize... If you just bind your string value to ^object.name in the wod file, I think it should work for you. If you really need to do it in the java file, you can try loading your object value with valueForBinding("object")

Ramsey


On Jan 2, 2009, at 4:46 AM, Kamal D Shah wrote:

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:
@mac.com


This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Kamal D Shah <email@hidden>
References: 
 >'object' not getting initialized in D2WCustomComponent sub class (From: Kamal D Shah <email@hidden>)

  • Prev by Date: Re: Using NULLS FIRST/LAST on sort orderings
  • Next by Date: Re: D2W: Rules for the sub components of the EditRelationship page
  • Previous by thread: 'object' not getting initialized in D2WCustomComponent sub class
  • Next by thread: Re: 'object' not getting initialized in D2WCustomComponent sub class
  • Index(es):
    • Date
    • Thread