dataSource
JSF component
IlpAbstractDataSource
project
tag attribute. It allows you to specify a JViews TGO project that will
be set to the underlying IlpNetwork on
the server side. For more information, see Loading a project file. Keep in mind that not
all CSS view customizations are supported by the network JSF
component. For details, see Network view component services.
networkView
JSF component
networkView
component, and to configure the component dimensions (
width
and
height
) using the
style
tag attribute:
<jvtf:networkView id="aNetwork" context="#{contextBean}" style="width:740;height:550" project="data/myProject.itpr" />
<installdir>
stands for the directory where Rogue Wave JViews TGO is
installed.
id
tag attribute defines a unique identifier for the
networkView
component. The
context
tag attribute is a binding to a bean defined in the
faces_config.xml
file. The
style
tag attribute defines two CSS properties (
width
and
height
) for the dimensions, in pixels, of the network component. The
project
tag attribute is a relative path to a JViews TGO project within
the web application. This file should be accessible by the web
application.
context
bean in the
faces_config.xml
file:
<managed-bean> <managed-bean-name>contextBean</managed-bean-name> <managed-bean-class> ilog.tgo.faces.service.IltFacesDefaultContext </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean>
IlpContext
interface and must use the synchronization strategy
IlSynchronizeOnLockStrategy
in order to address the particular threading issues of a web
server.
<jvtf:dataSource id="myDataSource" value="#{dataSourceBean}" />
id
tag attribute defines a unique identifier for the data source
component. The
value
tag attribute gets a value binding to a bean previously declared
in the
faces_config.xml
file that extends
IlpAbstractDataSource
.
dataSource
JSF component to the
networkView
JSF component
<jvtf:networkView id="aNetwork" context="#{contextBean}" style="width:740;height:550" dataSourceId="myDataSource" />
dataSourceId
tag attribute gets the unique identifier of the data source
component that will connect it to the network view.
dataSource
bean in the
faces_config.xml
file:
<managed-bean> <managed-bean-name>dataSourceBean</managed-bean-name> <managed-bean-class>ilog.cpl.datasource.IlpDefaultDataSource</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>context</property-name> <property-class>ilog.cpl.service.IlpContext</property-class> <value>#{contextBean}</value> </managed-property> <managed-property> <property-name>fileName</property-name> <property-class>java.lang.String</property-class> <value>data/myNetwork.xml</value> </managed-property> </managed-bean>
dataSource
bean is declared and two properties are set:
context
and
fileName
. The
context
property is set with a value binding to a context bean. It is
mandatory, so that the JViews
TGO context is consistent across components. The
fileName
property gets a relative path to an XML file compatible with the
data source and accessible from the web application.
<installdir>
stands for the directory where Rogue Wave JViews TGO is
installed.
networkView
JSF component
<jvtf:networkView id="aNetwork" context="#{contextBean}" style="width:740;height:550" dataSource="#{dataSourceBean}" />
dataSource
tag attribute gets a value binding to a bean that extends IlpAbstractDataSource. It will connect the
network component to this data source bean.
networkView
JSF component
data
tag attribute, which can be used to connect business data sources
using:
project file
IlpAbstractDataSource
data
dataSourceId
dataSource
project
data
tag attribute behaves exactly like the
project
attribute, getting the relative path to a JViews TGO project, as in
the following example:
<jvtf:networkView id="aNetwork" context="#{myContext}" style="width:740;height:550" data="data/myProject.itpr" />
myProject.itpr
is the project file within the web application.
data
tag attribute behaves exactly like the
dataSourceId
attribute, getting the unique identifier of a data source
component, as in the following example:
<jvtf:networkView id="aNetwork" context="#{myContext}" style="width:740;height:550" data="myDataSource" />
myDataSource
uniquely identifies a data source JSF component in the current
session.
IlpAbstractDataSource
instance, the
data
tag attribute behaves exactly like the
dataSource
attribute, getting a value binding to a bean that extends
IlpAbstractDataSource
, as in the following example:
<jvtf:networkView id="aNetwork" context="#{myContext}" style="width:740;height:550" data="#{dataSourceBean}" />
#{dataSourceBean}
is a value binding to the corresponding bean declared in the
faces_config.xml
file.