Harmony 1.0.3 webapp source code HarmonyMenuRenderer encodeMenuItem override bug

Post Reply
jobor
Posts: 21
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.12.6
Eclipse 2018/08
Java 1.8.0-x
JSF Mojarra 2.3.x
PrimeFaces 6.2.1x
Tomcat 9.0.x
MySQL 5.6.x

aragorn
Posts: 3762
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 3 guests