Hi Markus,

If I understand your requirement correctly, you want a modal that allows 
selecting some value(s) for a form field and want the selection be visible in 
the displayed form after the modal close.

The trick is to define an AjaxUpdateContainer around the zone to be updated 
after the modal close. If you use AjaxObserveFields on your form, you can have 
a large section refreshed safely.

You also need to define the AjaxModalDialog with it's id and add the 
closeUpdateContainerID binding to specify the AjaxUpdateContainer to update 
when the dialog close.

<wo:AjaxModalDialog closeUpdateContainerID = "formContainerId" id = 
"selectValueDialogId" ...

And lastly, put the link to open the dialog on your form...
<wo:AjaxModalDialogOpener dialogId = "selectValueDialogId" class = "tiny 
button" label = "$localizer.button.selectionner"/>


Samuel



> Le 11 déc. 2017 à 11:41, Markus Ruggiero <mailingli...@kataputt.com> a écrit :
> 
> it always the same ... not using these things often results in utter 
> confusion when finally I need to do this.
> 
> I have a standard page with a large form.
> On that page there is a text field that the user can ...
>       - enter an value directly
>       - depending on previously made selections further up in the form the 
> value is already set and cannot be changed
>       - depending on previously made selections further up in the form there 
> is a button/link next to the text field that should open a modal dialog with 
> a list of strings to pick from (the field is not editable direcly).
> My problem is that 3rd option.
> 
> I already have a small component that loads the available strings from the 
> database and shows them in a table. The user can then click a [pick this] - 
> hyperlink next to an entry (or close the selection box without picking 
> anything. The picked 
> value should be put into the text field.
> 
> I succeeded partially with the help of the Ajax Examples. Tried 
> AjaxModalDialog as well as AjaxModalUpdate. I can show a dialog with both 
> elements and the correct data, but from there? ..... I am lost.
> 
> Which one to use, AjaxModalDialog or AjaxModalUpdate?
> How do I get the selected String back / put it into the underlying 
> object-to-be-edited, update the display and close the dialog.
> 
> Can anyone provide me with a simple example? 
> 
> Thanks a lot
> ---markus---
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/samuel%40samkar.com
> 
> This email sent to sam...@samkar.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to