Page 1 of 1

Harmony 1.0.3 webapp source code HarmonyMenuRenderer encodeMenuItem override bug

Posted: 29 Nov 2018, 10:52
by jobor
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);

Re: Harmony 1.0.3 webapp source code HarmonyMenuRenderer encodeMenuItem override bug

Posted: 29 Nov 2018, 13:43
by aragorn
Fixed for next elite version. Please see; https://github.com/primefaces/primefaces/issues/4284

For now, you can remove @Override from encodeMenuItem.

Best Regards,