Apache Wicket 8.x Reference Guide
must use the getMetaData(MetaDataKeykey) method. In the following example we set a java.sql.Connection object in the application’s metadata so it can be used by any page of the application: Application MetaDataKey<Connection> connectionKey = new MetaDataKey<Connection> (){}; /** * Application's initialization */ @Override public void init(){ super.init(); Connection connection; //connection initialization... setMetaData(connectionKey, connection); //Do some other stuff.. } } Code to get the object from the metadata: Connection connection = Application 0 码力 | 350 页 | 9.95 MB | 1 年前3Apache Wicket 10.x Reference Guide
must use the getMetaData(MetaDataKeykey) method. In the following example we set a java.sql.Connection object in the application’s metadata so it can be used by any page of the application: Application MetaDataKey<Connection> connectionKey = new MetaDataKey<> (){}; /** * Application's initialization */ @Override public void init(){ super.init(); Connection connection; //connection initialization... setMetaData(connectionKey, connection); //Do some other stuff.. } } Code to get the object from the metadata: Connection connection = Application 0 码力 | 336 页 | 7.16 MB | 1 年前3Apache Wicket 9.x Reference Guide
must use the getMetaData(MetaDataKeykey) method. In the following example we set a java.sql.Connection object in the application’s metadata so it can be used by any page of the application: Application MetaDataKey<Connection> connectionKey = new MetaDataKey<> (){}; /** * Application's initialization */ @Override public void init(){ super.init(); Connection connection; //connection initialization... setMetaData(connectionKey, connection); //Do some other stuff.. } } Code to get the object from the metadata: Connection connection = Application 0 码力 | 335 页 | 7.15 MB | 1 年前3Apache Wicket 7.x Reference Guide
must use the getMetaData(MetaDataKeykey) method. In the following example we set a java.sql.Connection object in the application’s metadata so it can be used by any page of the application: Application MetaDataKey<Connection> connectionKey = new MetaDataKey<Connection> (){}; /** * Application's initialization */ @Override public void init(){ super.init(); Connection connection; //connection initialization... setMetaData(connectionKey, connection); //Do some other stuff.. } } Code to get the object from the metadata: Connection connection = Application 0 码力 | 346 页 | 10.00 MB | 1 年前3
共 4 条
- 1