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: Need info about the javascript function
I was going through the source code of usergroup admin portlet's view.jsp, where we have javascript function to get the user's count of user group.
function <portlet:namespace />getUsersCount(className, ids, status, callback) {
AUI.$.ajax(
'<%= themeDisplay.getPathMain() %>/user_groups_admin/get_users_count',
{
data: {
className: className,
ids: ids,
status: status
},
}
);
}
but iam unable to understand this line "<%=themeDisplay.getPathMain() %>/user_groups_admin/get_users_count ".
Is this a json web service or just invocation of method which returns a count number.
Thanks.
function <portlet:namespace />getUsersCount(className, ids, status, callback) {
AUI.$.ajax(
'<%= themeDisplay.getPathMain() %>/user_groups_admin/get_users_count',
{
data: {
className: className,
ids: ids,
status: status
},
}
);
}
but iam unable to understand this line "<%=themeDisplay.getPathMain() %>/user_groups_admin/get_users_count ".
Is this a json web service or just invocation of method which returns a count number.
Thanks.
Hi
Search this path in struts-config.xml file.
This is like a json action.
Search this path in struts-config.xml file.
This is like a json action.
Sorry,I couldn't find this path in struct-config.xml file
I just find get_users_count mvc command in this class : com.liferay.users.admin.web.internal.portlet.action.GetUsersCountMVCResourceCommand.
you can found this class in this path : modules\apps\users-admin\users-admin-web\src\main\java\com\liferay\users\admin\web\internal\portlet\action
you can found this class in this path : modules\apps\users-admin\users-admin-web\src\main\java\com\liferay\users\admin\web\internal\portlet\action
Thank you so much for your reply.
But in the view.jsp, resource url has "themeDisplay.getPathMain()" is appended which in turn returns "/c" ,
but in the GetUsersCountMVCResourceCommand.java class we have component property
"mvc.command.name=/users_admin/get_users_count" in which we dont have any "/c",
so why "/c" is added and what does it convey's here ?.
Once again thanks for help @Nader Jafari.
But in the view.jsp, resource url has "themeDisplay.getPathMain()" is appended which in turn returns "/c" ,
but in the GetUsersCountMVCResourceCommand.java class we have component property
"mvc.command.name=/users_admin/get_users_count" in which we dont have any "/c",
so why "/c" is added and what does it convey's here ?.
Once again thanks for help @Nader Jafari.
This is a url pattern that you can find in liferay-web.xml and handled with com.liferay.portal.servlet.filters.secure.SecureFilter .
in a simple word : The user needs to be logged on to the portal first to see these URls.
in a simple word : The user needs to be logged on to the portal first to see these URls.
Thank you once again @Nader Jafari.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™