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: How to call service class in command class?
Hi,
My requirement is while publishing data in ddl form then i need to generate qr code. So i have overridden BaseMVCActioncommand.
I have attached my code below
Component(immediate = true, property = { "javax.portlet.name=" + DDLControllerModulePortletKeys.DYNAMIC_DATA_LISTS,
"javax.portlet.name=" + DDLControllerModulePortletKeys.DYNAMIC_DATA_LISTS_DISPLAY, "mvc.command.name=addRecord",
"service.ranking:Integer=100"
}, service = MVCActionCommand.class)
public class DDLControllerModulePortlet extends BaseMVCActionCommand {
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
//here i am performing some custom actions like qrcode generator
}
}
now i thiink i need to call ddlservice calss to store ddl data.
for e.g recordidset,companyId,formvalues etc.
How i can achieve this???
Now i am not able to add any record to ddl table........
I am working liferay 7.1
Please help me..
Thanks in advance
My requirement is while publishing data in ddl form then i need to generate qr code. So i have overridden BaseMVCActioncommand.
I have attached my code below
Component(immediate = true, property = { "javax.portlet.name=" + DDLControllerModulePortletKeys.DYNAMIC_DATA_LISTS,
"javax.portlet.name=" + DDLControllerModulePortletKeys.DYNAMIC_DATA_LISTS_DISPLAY, "mvc.command.name=addRecord",
"service.ranking:Integer=100"
}, service = MVCActionCommand.class)
public class DDLControllerModulePortlet extends BaseMVCActionCommand {
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
//here i am performing some custom actions like qrcode generator
}
}
now i thiink i need to call ddlservice calss to store ddl data.
for e.g recordidset,companyId,formvalues etc.
How i can achieve this???
Now i am not able to add any record to ddl table........
I am working liferay 7.1
Please help me..
Thanks in advance
Mahammad Ashik AThe whole question sounds like you're generating the QR code before storing it - shouldn't you rather be generating it from the available data when you're showing the data, as the machine readable alternative to the actual data?
My requirement is while publishing data in ddl form then i need to generate qr code. So i have overridden BaseMVCActioncommand.
Thanks for your reply.
Yes, I am going to generate qr code before storing data. Because i need to generate qr code based on custom table Id.
But i am storing qr code in other custom table. no need to expand ddl table.
Thank You
Yes, I am going to generate qr code before storing data. Because i need to generate qr code based on custom table Id.
But i am storing qr code in other custom table. no need to expand ddl table.
Thank You
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™