How to refresh form-list after save in dynamic-dialog

I have a form-list for simple data, and each row has an edit button, use dynamic-dialog to load edit form.
After saved the dynamic-dialog I want to refersh the form-list with same page number and condition.

It seems no response type can do this.
What is the best solution for this scenario

i don’t know exactly how it is done, but the screen that shows the entities list in tools can delete without refreshing the whole page. Go check that screen out:


Please try

It not keep the find condition and page number of form-list

Does your screen list the parameters that are part of your find parameters so Moqui would know it wants them?

Does the form in your dynamic dialog also include these parameters (hidden is fine, but they need to be in that form if you want to carry them along)?

On some things, particularly dynamic dialogs, you may need to store them and restore them

e.g. in the actions block of the main screen:

        <set field="restoreFindParameters" from="[restoreFindPartyId:ec.web.requestParameters?.partyId,

*) Pass that map to your dynamic dialog as arguments in a parameter map (possibly context + restoreFindParameters)
) In your dynamic dialog screen, have those restore fields as parameters
) In your dynamic dialog screen, also have those restore fields as fields in the form (hidden)
*) In the transition of your dynamic dialog screen, pass the find parameters you carried along in the parameter map of conditional-response and/or default-response

    <transition name="updateTimeEntryAndChildren">
        <service-call name="update#BLah" in-map="context"/>
        <conditional-response url="//${appRoot}/Payroll/PayrollPeriod/PeriodTimeEntry"
        <default-response url="//${appRoot}/Payroll/TimeEntry/EditTimeEntry"

Thank you. It works. Can we add a new response type, which trigger the page refresh with it’s original parameters.

I can use a plain url response to reload the screen with it’s parameters. Don’t require pass parameters to dynamic-dialog loaded screen.

    <transition name="update">
        <service-call name="update#moqui.example.Example"></service-call>
        <conditional-response url="javascript:moqui.webrootVue.setUrl(moqui.webrootVue.currentLinkUrl, moqui.webrootVue.bodyParameters);" url-type="plain">
        <default-response url="../FindExample" />

Maybe we can create an new response type for javascript callback.

1 Like

Passing the current parameters (find options, pagination, etc) to the server is generally part of the HTML/JS/etc generated. There is an attribute on form-single for this (form-single.@pass-through-parameters), and on transitions there is an option to save parameters for the next screen render in the session (*-response.@save-parameters) which is different from the screen.parameter elements which tell the framework about field/parameter names to always look for when generating a URL to go to that screen.

Anyway, those are some current options commonly used when passing through such parameters is needed.

Sometimes we navigate from a screen which have form-list, to other screens to do something, and then back to the list screen. If we have an option to make the form-list keep the original search condition and page number. That may be convenient.