• 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
Passing WOActionResult to Custom Component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing WOActionResult to Custom Component


  • Subject: Passing WOActionResult to Custom Component
  • From: Daniele Corti <email@hidden>
  • Date: Wed, 24 Oct 2012 16:14:02 +0200

Hi,
probably is a simple thing, but I'm not able to create a custom component that allow to pass a WOActionResult and fire it when the user click on a button displayed by the component.

I mean, I wanted to create a Component that show a Modal Container that allow the user to confirm an action. Like:

MyComponent.wo:
<wo:AjaxModalDialog label = "$linkLabel" locked = "$true" overlayClose = "$false">
   <wo:WOForm>
      <p>
         <wo:WOString value="$confirmMessage"></wo:WOString>
      </p>
      <p>
         <wo:WOSubmitButton action = "" value ="$continueValue"></wo:WOSubmitButton>   
         <wo:WOGenericElement elementName = "input" type =  "button"  value ="$cancelValue" _onclick_ = "Modalbox.hide();"></wo:WOGenericElement>   
      </p>
   </wo:WOForm>
</wo:AjaxModalDialog>


the problem is when I call

<wo:MyComponent action = "" linkLabel = "Delete" confirmMessage = "Confirm Delete" continueValue = "Continue" cancelValue = "Cancel" />

How can I handle the passed WOActionResult in the action bind to fire it when the user press the SubmitButton?

I've notice that I cannot add a "public WOActionResult action;" attribute to the MyComponent.java class and point the WOSubmitButton action to it (I mean <wo:WOSubmitButton action = "" />)  , or the WOActionResult is fired when the component is rendered. 

I think that I have to subclass the ERXDynamicElement in order to do this, but I've not found any example in the WOCommunity Wiki about how it works.

Thanks in advance for any help!
--
Daniele Corti
--
I DON'T DoubleClick

 _______________________________________________
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: Passing WOActionResult to Custom Component
      • From: Henrique Gomes <email@hidden>
    • Re: Passing WOActionResult to Custom Component
      • From: Bastian Triller <email@hidden>
  • Prev by Date: Re: centos deploy problems
  • Next by Date: Re: Passing WOActionResult to Custom Component
  • Previous by thread: Re: centos deploy problems
  • Next by thread: Re: Passing WOActionResult to Custom Component
  • Index(es):
    • Date
    • Thread