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
Add button not showing in Clay management-toolbar
I'm following the "DXP 7.2 back-end developer" course and I've copied the exact same code in the exercise, however I'm not getting the same result.
view.jsp:
<clay:management-toolbar
disabled="${assignmentCount eq 0}"
displayContext="${AssignmentsManagementToolbarDisplayContext}"
itemsTotal="${assignmentCount}"
searchContainerId="assignmentEntries"
selectable="false"
/>
com.liferay.training.gradebook.web.display.context.AssignmentsManagementToolbarDisplayContext.java:
...
public class AssignmentsManagementToolbarDisplayContext extends BaseManagementToolbarDisplayContext {
...
public CreationMenu getCreationMenu() {
// Create the menu.
return new CreationMenu() {
{
addDropdownItem(dropdownItem -> {
dropdownItem.setHref(liferayPortletResponse.createRenderURL(), "mvcRenderCommandName",
MVCCommandNames.EDIT_ASSIGNMENT, "redirect", currentURLObj.toString());
dropdownItem.setLabel(LanguageUtil.get(request, "add-assignment"));
});
}
};
}
...
All copied from the exercises in the course. There were no errors in the console.
Result:
Expected result:
Any help would be appreciated.
Hi Khaleel, I don't know much about this course, or about Clay, but it might help if you specify exactly which exercise you downloaded so someone can take a look at it.
Also, your Result and Expected Result are blank. Did yopu mean to post screenshots?
Hi all,
Some additions:
We are talking about the 03-application-presentation course, where we add the <clay:management-toolbar> in page 14.
I had the same issue few weeks ago, at some point it solved itself suddenly. Because I didnt understand why, I created another project but this time It did not magically resolve, nor could I resolve it. No idea until now. I gave up, beacuse:
The ManagementToolbar is declared as deprecated, and its not the only thing used in the tutorials. (Management Toolbar - Clay (clayui.com))
I think someone needs to update these tutorials.
Powered by Liferay™