• 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: D2W: Reading custom rule values in a custom property-level component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: D2W: Reading custom rule values in a custom property-level component


  • Subject: Re: D2W: Reading custom rule values in a custom property-level component
  • From: David Holt <email@hidden>
  • Date: Thu, 07 Jun 2012 16:09:44 -0700

Hi Paul,

I don't have a lot of time to respond, but some thoughts are:

My understanding of the docs is that you can use these ERDCustomComponents WITHOUT a d2wContext. 

"This is achieved by pulling values first from the bindings, then from the d2wContext and finally from an "extraBindings" binding."

Have you tried just setting the key in the rules and see if the component can pull the value by itself?

Alternatively have you tried subclassing a (ER)D2W(Stateless)Component instead? Then access it like so:

    @Override
    public D2WContext d2wContext() {
     return super.d2wContext();
    }

and in the .wod something like:

StyleSheetRepetition : WORepetition {
list = d2wContext.stylesheets;
item = stylesheetName;
}


On 2012-06-07, at 3:55 PM, Paul Hoadley wrote:

Hello,

This question is languishing at the end of my thread on another topic, so I'll just drag it out into its own thread.  Say I have just made a custom property-level component by extending ERDCustomComponent.  I want to be able to read a value for a custom key that I've set in the rules.  I'm assuming I need access to the D2WContext for that, but I may be wrong, as all of d2wContext(), localContext() and d2wContextFromBindings() are returning null down in that custom component.  What am I doing wrong here?


-- 
Paul Hoadley
http://logicsquad.net/



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: D2W: Reading custom rule values in a custom property-level component
      • From: Paul Hoadley <email@hidden>
References: 
 >D2W: Reading custom rule values in a custom property-level component (From: Paul Hoadley <email@hidden>)

  • Prev by Date: D2W: Reading custom rule values in a custom property-level component
  • Next by Date: Re: WOInject: harmed twice by classloader manipulation
  • Previous by thread: D2W: Reading custom rule values in a custom property-level component
  • Next by thread: Re: D2W: Reading custom rule values in a custom property-level component
  • Index(es):
    • Date
    • Thread