Advanced Features > Using DHTML-Based JSF Components to Build Web Applications > The JViews Framework Faces Component Set > Visible Layers

The visibleLayers property contains the list of the names of the visible manager layers displayed by the view.

At first, all the layers are visible by default. To specify the visible layers at initialization, use the visibleLayers JSP tag attribute.

<jvf:view [...] visibleLayers="layer1,layer2,layer3" />

Code Sample 6.6 Specifying Visible Layers at Initialization

If a JSF action adds or removes some layers, the values specified by this property can be updated accordingly.

public class FrameworkBean {
  [...]

  public void addLayer() {
    IlvFacesDHTMLView jsfView = getJSFViewComponent();
    //Adds a new visible layer.
    ArrayList list = jsfView.getVisibleLayers();
    list.add(newLayer.getName());
    jsfView.setVisibleLayers(list);
  }
}

Code Sample 6.7 Updating the List of Visible Layers