Hi Sheela,
You mentioned that you tried the downloaded code it works. Were you able to create the entire inkwell example? On the whole the code which you gave me is much better than the version i previously downloaded, but I am still getting one particular error in ProductAdmintPortlet.java. The error is:
The method deleteProduct(long) in the type PRProductLocalServiceUtil is not applicable for the arguments (long, long)
It happens in the following line of the class:
public void deleteProduct(ActionRequest request, ActionResponse response)
throws Exception {
long productKey = ParamUtil.getLong(request, "resourcePrimKey");
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(
WebKeys.THEME_DISPLAY);
if (Validator.isNotNull(productKey)) {
PRProductLocalServiceUtil.deleteProduct(productKey, themeDisplay.getCompanyId()); SessionMessages.add(request, "productDeleted");
} else {
SessionErrors.add(request, "error-deleting");
}
}
The part of PRProductLocalServiceUtil.java which defines the above method is:
/**
* Removes the specified product from the database.
*
* @param productId
* @throws com.inkwell.internet.portlets.prodreg.sb.NoSuchProductException
* @throws com.liferay.portal.kernel.exception.SystemException
* @throws com.liferay.portal.kernel.exception.PortalException
*/
public static void deleteProduct(long productId)
throws com.inkwell.internet.productregistration.NoSuchProductException,
com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
getService().deleteProduct(productId);
}
/**
* Removes the specified product from the database.
*
* @param product
* @throws com.liferay.portal.kernel.exception.PortalException
* @throws com.liferay.portal.kernel.exception.SystemException
*/
public static void deleteProduct(
com.inkwell.internet.productregistration.model.PRProduct product)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException {
getService().deleteProduct(product);
}
So i can see that ProductAdminPOrtlet is looking for two arguments, but only one exists in PRProductLocalServiceUtil.java (the pparent class). So my questions are:
1) Would I have to to add the second argument in the parent class?
2) What is the best way to add/ modify these two classes to fix this build error
I have also attached both classes. Many thanks!!
Please sign in to flag this as inappropriate.