Page 1 of 1

<pm:tab> render not working

Posted: 14 Aug 2017, 13:48
by smarttrade
i have requirement to hide base don user role for that i used render option when i use render in pm:tab tab hides but when i click next tab hided tabmenu is showing.

Re: <pm:tab> render not working

Posted: 17 Aug 2017, 11:18
by mert.sincan
Fixed for next version. For now, please make the following change;
in TabMenuRenderer.java

Code: Select all

@Override
 public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        ...
        
        writer.startElement("div", tabMenu);
        writer.writeAttribute("class", "layout-tabmenu-contents", null);
        for(int i = 0; i < children.size(); i++) {
            Tab tab = (Tab) children.get(i);
            
            if(tab.isRendered()) { /* PLEASE ADD THIS LINE(line 75) */
                writer.startElement("div", tabMenu);
                writer.writeAttribute("class", "layout-tabmenu-content", null);

                ....
                writer.endElement("div");
            }  /* PLEASE ADD THIS LINE (line 99) */
        }
        writer.endElement("div");
        
        writer.endElement("div");
        
       ...
    }

Re: <pm:tab> render not working

Posted: 21 Aug 2017, 12:42
by smarttrade
thanks working.

Re: <pm:tab> render not working

Posted: 13 Sep 2017, 09:07
by mert.sincan
Glad to hear, thanks for the update!