Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: RE: LIferay 7.4 Data provider only returning result for Default User.
Hi,
I am trying to use data provider for a form in Liferay 7.4, where the Name field will be autofilled by the name of current logged in user. I have tried and tested the data providers with these to API
http://localhost:8080/o/headless-admin-user/v1.0/my-user-account
http://localhost:8080/api/jsonws/user/get-current-user
Hi Minhaj, you've run into a known limitation with the REST Data Provider. One option is to develop a custom data provider that's a bit smarter. I think this one is actually doing what you want.
The recommended approach in 7.4 is likely to create an object definition with the fields, then use fragments to set up the form container and fields. I think there's a new Form Container fragment that can help.
Thanks a lot for the reply. I will give it a try. Have a good one.
hello, i tried to install this module but it doesnt work. the data provider is visible and configurable but the form does not fill
Hi Gregory, I didn't write the data provider and likely can't help troubleshoot it. I recommend taking the data provider from there, looking at the code to understand what it's trying to do, then, if you can't figure out why it's not working, write a separate and detailed post about what you've tried and what's going wrong.
Powered by Liferay™