pa:tab not expand and clickable to another page
Posted: 16 Jul 2020, 03:38
Code: Select all
// TabMenuRenderer.java
encodeEnd
for(UIComponent child : children ){
if(child.isRendered() && child instanceof Tab) {
Tab tab = (Tab) child;
UIComponent header = tab.getFacet("header"); // Add this line
writer.startElement("li", tab);
if (header != null) { // Add this block
header.encodeAll(context);
}
else {
writer.startElement("a", tab);
writer.writeAttribute("href", "#", null);
writer.writeAttribute("class", "ripplelink tabmenuitem-link", null);
....
Code: Select all
// layout.js
//line 70
this.tabMenuNavLinks.off('click.menu').on('click.menu', function(e) {
$this.sidebar.css('overflow','hidden');
setTimeout(function() {
$this.sidebar.css('overflow','');
}, 301);
var link = $(this),
index = link.parent().index();
if (link.attr('href') !== '#') { // Add this block
return;
}
...
Code: Select all
<pa:tab icon="home" title="Features">
<f:facet name="header">
// Please add a link element has 'ripplelink tabmenuitem-link' class.
<a class="ripplelink tabmenuitem-link'" ...>...</a>
OR
<p:link styleClass="ripplelink tabmenuitem-link'" ...>..<p:link>
OR
...
</f:facet>
</pa:tab>