moqui / moqui-framework

Use Moqui Framework to build enterprise applications based on Java. It includes tools for databases (relational, graph, document), local and web services, web and other UI with screens and forms, security, file/resource access, scripts, templates, l10n, caching, logging, search, rules, workflow, multi-instance, and integration.
http://www.moqui.org
Other
284 stars 204 forks source link

Client render screen with Vue dose not work for dynamic-dialog #317

Closed hellozhangwei closed 6 years ago

hellozhangwei commented 6 years ago

For example,

<dynamic-dialog id="Test" button-text="View Dynamic Example Items" transition="//example/DynamicExampleItems" />

Which does not work.

jonesde commented 6 years ago

That looks like an invalid transition. There are lots of examples of this working fine, including on the EditParty screen in SimpleScreens and many others.

hellozhangwei commented 6 years ago

Yes, dynamic-dialog works but vuet mode dose not work. See attached screen

qq20180503-165032 2x

shot

jonesde commented 6 years ago

I see, that's correct, it is not currently supported. This should be possible, the loader for dynamic-dialog and dynamic-container would have to be changed to support the .js + .vuet (optional) loading in WebrootVue.js. The path in the transition would also have to be changed, shouldn't include the '.xml'.

I haven't run into a use case for this... you want more dynamic (client rendered) behavior in a dialog but not in the screen that it's in?

hellozhangwei commented 6 years ago

I am finding a way to implement a Lookup Screen in OFBiz, see https://www.moqui.org/vapps/my/User/Request/EditRequest?requestId=100357

jonesde commented 6 years ago

As you probably know in general all issues and new features requests should go in HiveMind on moqui.org, so closing this issue as there is already a related request there.

I added some notes to that request. Basically if you want something like this in your application you can build a custom screen (server rendered FTL or client rendered Vue JS template) with a dialog that interacts with the screen as you wish. As a hint, don't use dynamic-dialog as it is not designed to populate something in the parent screen based on something clicked, you have to add custom JavaScript to do that.