• 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: Access to WOComponents of a page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Access to WOComponents of a page


  • Subject: RE: Access to WOComponents of a page
  • From: GILQUIN Pierre via Webobjects-dev <email@hidden>
  • Date: Wed, 24 Jul 2019 13:51:26 +0000
  • Thread-topic: Access to WOComponents of a page

Hi André,

The only way (I know) to access a method in a component is to be in an action
in the parent :

public WOComponent  generateCapcha(){
{
        ERCaptcha captcha = pageWithName(ERCaptcha.class);
        captcha. setResponse("");
        return captcha;
}

But probably action can be used in your case.


You can try  the subclass way. You  could override appendToResponse in your
PSDCaptcha to do what you want...


HTH
Pierre


-----Message d'origine-----
De : Webobjects-dev
[mailto:webobjects-dev-bounces+pierre.gilquin=email@hidden] De la
part de André Rothe via Webobjects-dev
Envoyé : mercredi 24 juillet 2019 11:53
À : WebObjects-Dev
Objet : Access to WOComponents of a page

Hi,

How I can access the WOComponent objects of a page? I use different
WOComponents in a "Main WO" and I try to access the classes behind the
components from Main.java to call some public methods on them. In example I
would like to call ERCaptcha.setResponse("") on the component which is named as
"captcha" within my page.

captcha : er.captcha.ERCaptcha {
   validated = ...
   resetText = ...
}

I have tried to subclass the components and override some methods there, but it
won't work as expected.

capcha : PSDCaptcha {
   validated = ...
   resetText = ...
}

public class PSDCaptcha extends ERCaptcha { ....
}

Is there a map of all defined components in "Main WO" which I can access from
i.e. context()?

Thank you
André
 _______________________________________________
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
 _______________________________________________
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: Access to WOComponents of a page
      • From: André Rothe via Webobjects-dev <email@hidden>
References: 
 >Access to WOComponents of a page (From: André Rothe via Webobjects-dev <email@hidden>)

  • Prev by Date: Access to WOComponents of a page
  • Next by Date: Re: Access to WOComponents of a page
  • Previous by thread: Access to WOComponents of a page
  • Next by thread: Re: Access to WOComponents of a page
  • Index(es):
    • Date
    • Thread