Updates the bean value with the current value of the component and all its bean-bound children.

@param component the component whose contents need to be copied to the bean.
@param visibleOnly - whether to include visible components only.
194613
public static void updateBeanValue(final WComponent component, final boolean visibleOnly) {
		// Do not process if component is invisble and ignore visible is true. Will ignore entire branch from this point.
		if (!component.isVisible() && visibleOnly) {
			return;
		}

		if (component instanceof WBeanComponent) {
			((WBeanComponent) component).updateBeanValue();
		}

		// These components recursively update bean values themselves,
		// as they have special requirements due to repeating data.
		if (component instanceof WDataTable || component instanceof WTable || component instanceof WRepeater) {
			return;
		}

		if (component instanceof Container) {
			for (int i = ((Container) component).getChildCount() - 1; i >= 0; i--) {
				updateBeanValue(((Container) component).getChildAt(i), visibleOnly);
			}
		}
	}
957210
private void clearTransientAndNonFaceletComponents(final FacesContext context, final UIComponent component)
    {
        //Scan children
        int childCount = component.getChildCount();
        if (childCount > 0)
        {
            for (int i = 0; i < childCount; i++)
            {
                UIComponent child = component.getChildren().get(i);
                if (child != null && child.isTransient() &&
                    child.getAttributes().get(ComponentSupport.MARK_CREATED) == null)
                {
                    component.getChildren().remove(i);
                    i--;
                    childCount--;
                }
                else
                {
                    if (child.getChildCount() > 0 || !child.getFacets().isEmpty())
                    {
                        clearTransientAndNonFaceletComponents(context, child);
                    }
                }
            }
        }

        //Scan facets
        if (component.getFacetCount() > 0)
        {
            Map<String, UIComponent> facets = component.getFacets();
            for (Iterator<UIComponent> itr = facets.values().iterator(); itr.hasNext();)
            {
                UIComponent fc = itr.next();
                if (fc != null && fc.isTransient() &&
                    fc.getAttributes().get(ComponentSupport.MARK_CREATED) == null)
                {
                    itr.remove();
                }
                else
                {
                    if (fc.getChildCount() > 0 || !fc.getFacets().isEmpty())
                    {
                        clearTransientAndNonFaceletComponents(context, fc);
                    }
                }
            }
        }
    }
47199
public void setSectionsAlwaysVisible(final boolean VISIBLE) {
        if (null == sectionsAlwaysVisible) {
            _sectionsAlwaysVisible = VISIBLE;
            fireTileEvent(REDRAW_EVENT);
        } else {
            sectionsAlwaysVisible.set(VISIBLE);
        }
    }
1072352
public void setClearVisible(boolean visible) {
        if (mClearButtonEnabled) {
            final Drawable d = (visible ? mTappableDrawable : null);
            final Drawable[] drawables = getCompoundDrawables();
            if (drawables != null) {
                setCompoundDrawables(drawables[0], drawables[1], d, drawables[3]);
            } else {
                Log.w(TAG, "No clear button is available.");
            }
        }
    }
495316
public void setAreasVisible(final boolean VISIBLE) {
        if (null == areasVisible) {
            _areasVisible = VISIBLE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            areasVisible.set(VISIBLE);
        }
    }
96132
public void setTextVisible(final boolean VISIBLE) {
        if (null == textVisible) {
            _textVisible = VISIBLE;
            fireUpdateEvent(VISIBILITY_EVENT);
        } else {
            textVisible.set(VISIBLE);
        }
    }
831722
public void setOldValueVisible(final boolean VISIBLE) {
        if (null == oldValueVisible) {
            _oldValueVisible = VISIBLE;
            fireTileEvent(VISIBILITY_EVENT);
        } else {
            oldValueVisible.set(VISIBLE);
        }
    }
836488
public void setAsContextMenuOf(AbstractClientConnector component) {

        if (component instanceof Table) {
            setAsTableContextMenu((Table)component);
        } else if (component instanceof Tree) {
            setAsTreeContextMenu((Tree)component);
        } else {
            super.extend(component);
        }
    }
901367
public void setAverageVisible(final boolean VISIBLE) {
        if (null == averageVisible) {
            _averageVisible = VISIBLE;
            fireUpdateEvent(VISIBILITY_EVENT);
        } else {
            averageVisible.set(VISIBLE);
        }
    }
843321
protected void setElementVisible(Widget widget, boolean visible) {

        if (visible) {
            widget.getElement().getStyle().clearDisplay();
        } else {
            widget.getElement().getStyle().setDisplay(Display.NONE);
        }

    }
1131544
public void add(final WComponent component, final Serializable... constraints) {
		add(component);

		if (constraints != null && constraints.length > 0) {
			PanelModel model = getOrCreateComponentModel();

			if (model.layoutConstraints == null) {
				model.layoutConstraints = new HashMap<>();
			}

			model.layoutConstraints.put(component, constraints);
		}
	}
1062180
public void setMajorTickMarksVisible(final boolean VISIBLE) {
        if (null == majorTickMarksVisible) {
            _majorTickMarksVisible = VISIBLE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            majorTickMarksVisible.set(VISIBLE);
        }
    }
404579
protected void setTypeVisible(boolean visible) {

        Style style = m_typeLabel.getElement().getParentElement().getStyle();
        if (visible) {
            style.clearDisplay();
        } else {
            style.setDisplay(Display.NONE);
        }
    }
239753
public void setDisplayOnly(boolean displayOnly) {

        m_isDiplayOny = displayOnly;
        if (displayOnly) {
            setVisibleColumns(TITLE, PATH);
        } else {
            setVisibleColumns(CHECKBOX, TITLE, PATH);
        }
    }
478502
public void setSectionIconsVisible(final boolean VISIBLE) {
        if (null == sectionIconsVisible) {
            _sectionIconsVisible = VISIBLE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            sectionIconsVisible.set(VISIBLE);
        }
    }
1128910
public void extendComponent( Component component ) {

		if( this.extendedComponent != null )
			this.extendedComponent.extendingComponents.remove( this );

		component.extendingComponents.add( this );
		this.extendedComponent = component;
	}
488596
public void setColumnVisible(String colName, boolean visible) {
        ColumnDefEx col = findColumn(colName);
        if (col == null) return;
        col.setVisible(visible);
        JsDataTable.setColVisible(getElement(), colName, visible);
    }