private boolean pageEditable = false;
@Override
public int doStartTag() throws JspException
{
EditPanel panel = (EditPanel)Panel.getPanelStack((HttpServletRequest)pageContext.getRequest()).peek();
panelEditable = panel.isEditable();
pageEditable = panelEditable;
if(panel.getActivePage().getEditable() != null) {
pageEditable = panel.getActivePage().getEditable();
}
if(log.isDebugEnabled())
log.debug("panelEditable="+panelEditable+", pageEditable="+pageEditable);
pageContext.setAttribute("i_panel_editable", panelEditable);
pageContext.setAttribute("i_page_editable", pageEditable);
action = panel.getActivePage().getAction();
styleClass = getProperty("form");
setDisabled(!pageEditable);
int process = super.doStartTag();
StringBuilder html = new StringBuilder();
if(panel.getPages().size() > 1)
{
html.append("<div class=\"").append(getProperty("slider")).append("\">");
for(Page tab : panel.getPages())
{
if(isTabRightsValid(tab))
{
if(tab.equals(panel.getActivePage()))
renderButton(html, "doPage_"+tab.getName(), tab.getMessageKey(), null, getProperty("slider.active"), null, true);
else
{
if(tab.isSelectable())
renderButton(html, "doPage_"+tab.getName(), tab.getMessageKey(), null, null, null, false);