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.
Then, if a JSF action adds or removes some layers, the values specified by this property can be updated.
Visible layers in the map view
To specify the initial visible layers:
<jvmf:mapView [...] visibleLayers="layer1,layer2,layer3" />
To update the list of visible layers:
public class MapBean {
  [...]

  public void addLayer() {
    IlvFacesMapsView jsfView = getJSFViewComponent();
    //Adds a new visible layer.
    ArrayList list = jsfView.getVisibleLayers();
    list.add(newLayer.getName());
    jsfView.setVisibleLayers(list);
  }
}
Visible layers in the diagram view
To specify the initial visible layers:
<jvdf:diagrammerView [...] visibleLayers="layer1,layer2,layer3" />
To update the list of visible layers:
public class DiagrammerBean {
  [...]

  public void addLayer() {
    IlvFacesDHTMLDiagrammerView jsfView = getJSFViewComponent();
    //Adds a new visible layer.
    ArrayList list = jsfView.getVisibleLayers();
    list.add(newLayer.getName());
    jsfView.setVisibleLayers(list);
  }
}
Visible layers at the JViews Framework level
To specify the initial visible layers:
<jvf:view [...] visibleLayers="layer1,layer2,layer3" />
To update the list of visible layers:
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);
  }
}