Harmony 1.0.3 webapp source code HarmonyMenuRenderer encodeMenuItem override bug

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
jobor
Posts: 33
Joined: 19 Dec 2011, 22:34
Location: the Netherlands

29 Nov 2018, 10:52

The Java source code of the Harmony 1.0.3 webapp contains an @Override bug.
The method is missing the tabindex parameter.
The harmony-theme-1.0.3.jar contains also the HarmonyMenuRenderer encodeMenuItem method without tabindex parameter.

public abstract class BaseMenuRenderer extends OutcomeTargetRenderer

Code: Select all

    protected void encodeMenuItem(FacesContext context, AbstractMenu menu, MenuItem menuitem, String tabindex) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        String title = menuitem.getTitle();
        String style = menuitem.getStyle();
        boolean disabled = menuitem.isDisabled();
        String rel = menuitem.getRel();

        writer.startElement("a", null);
        writer.writeAttribute("tabindex", tabindex, null);
public class HarmonyMenuRenderer extends BaseMenuRenderer

Code: Select all

    @Override
    protected void encodeMenuItem(FacesContext context, AbstractMenu menu, MenuItem menuitem) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        String title = menuitem.getTitle();
        boolean disabled = menuitem.isDisabled();
        Object value = menuitem.getValue();
        String style = menuitem.getStyle();
        String styleClass = menuitem.getStyleClass();

        writer.startElement("a", null);
        if(title != null) writer.writeAttribute("title", title, null);
With regards,
Johan Borchers

Mac OS X 10.15.7
NetBeans 12.3
OpenJDK Zulu11.37
JSF Mojarra 2.3.14
PrimeFaces 10.0.0
Tomcat 9.0.43
MySQL 5.6.x

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

29 Nov 2018, 13:43

Fixed for next elite version. Please see; https://github.com/primefaces/primefaces/issues/4284

For now, you can remove @Override from encodeMenuItem.

Best Regards,

Post Reply

Return to “Harmony - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests