Hi!

Thank you, this was exactly what I need!

Following your advice I subclassed ERXNonSynchronizingComponent in
MyComponent.

Then I've added :

<wo:WOSubmitButton action = "$^action" value = "$^confirmLabel"></
wo:WOSubmitButton>
I call MyComponent:

<wo:MyComponent action="$myAction" confirmLabel = "Confirm" />

And Everything works as needed!

Thank you!

In an unrelated note, I've lost an half of hour because a strange behaviour
in AjaxModalDialog:

in my component I call <wo:MyComponent> inside a WOForm, so the form inside
the ModalDialog is stripped (cause nested forms are note allowed). The
problem was: AjaxModalDialog does not render the HTML inside the element
where the Component is defined, but in a custom div injected as first body
child. Results, the Modal is render with no form inside and the button fire
no action.

That was frustrating... ;-P

2012/10/24 Bastian Triller <[email protected]>

> did you override synchronizesVariablesWithBindings in MyComponent, so
> that it returns false?
> That prevents the action to get fired while rendering MyComponent. You
> cann then bind the action to the SubmitButton in MyComponent with
> ^actionBindingName in the parent component of MyComponent.
> See CCSmartAjaxButton or similar.
>
> Am Mittwoch, den 24.10.2012, 16:14 +0200 schrieb Daniele Corti:
> > 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 = "$actionToPerform" 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 = "$myAction" 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 = "$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!
> >  _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list      ([email protected])
> > Help/Unsubscribe/Update your Subscription:
> >
> https://lists.apple.com/mailman/options/webobjects-dev/bastian.triller%40gmail.com
> >
> > This email sent to [email protected]
>
>
>


-- 
Daniele Corti
--
I DON'T DoubleClick
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to