*/
private boolean isVisible(InputHtml editor){
for(UIComponent parent = editor.getParent(); parent != null ; parent = parent.getParent()){
if( parent instanceof HtmlPanelTab ){
HtmlPanelTab panelTab = (HtmlPanelTab) parent;
HtmlPanelTabbedPane panelTabbedPane = null;
for(UIComponent panelAncestor=panelTab.getParent(); panelAncestor!=null ; panelAncestor=panelAncestor.getParent()){
if( panelAncestor instanceof HtmlPanelTabbedPane ){
panelTabbedPane = (HtmlPanelTabbedPane)panelAncestor;
break;
}
}
if( panelTabbedPane != null ){
if( panelTabbedPane.isClientSide() ){
parent = panelTabbedPane;
continue;
}
// Not client side tabbed pane.
// We need to check if the current panel tab is bisible;
int selectedIndex = panelTabbedPane.getSelectedIndex();
List children = panelTabbedPane.getChildren();
int tabIdx = 0;
for (int i = 0, len = children.size(); i < len && tabIdx <= selectedIndex ; i++){
UIComponent child = htmlTabbedPaneRenderer_getUIComponent((UIComponent)children.get(i));
if (child instanceof HtmlPanelTab){
if( child == panelTab ){