Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537
意如果方法在layui加載頁面之后進行,需要form.render();重新渲染頁面
定義模板id
form表單id 加載數據id<table id="table" lay-filter="test"></table>
<select id="chosen-select" lay-filter="type-select">
<option value="" selected="">請選擇描述</option>
</select>//加載自定義搜索框
/*為下拉框id="chosen-select"加載數據type,description(類型與描述兩個屬性)*/
/* $(function(){
var html = "";
$.ajax({
url: '${ctx}/sys/dict/queryTypeList',
success : function(data) {
//加載數據
for (var i = 0; i < data.length; i++) {
html += '<option value="' + data[i].type + '">' + data[i].description + '</option>'
}
$("#chosen-select").append(html);
}
});
});
們可以使用來自JavaFX API的TableView,TableColumn和TableCell類以表格形式表示數據。
通過實現數據模型和應用單元工廠來填充表中的數據。
表類可以按列排序數據,并在必要時調整列大小。
創建表
表控件是通過實例化TableView類創建的。
TableView table = new TableView(); table.setEditable(true);
然后使用TableColumn類創建三個列。TableView類的getColumns方法將創建的列添加到表中。
TableColumn firstNameCol = new TableColumn("First Name"); TableColumn lastNameCol = new TableColumn("Last Name"); TableColumn emailCol = new TableColumn("Email"); table.getColumns().addAll(firstNameCol, lastNameCol, emailCol);
我們可以通過調用setVisible方法隱藏列。
aColumn.setVisible(false).
以下代碼創建一個表。
import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class Main extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { TableView table = new TableView(); table.setEditable(true); TableColumn firstNameCol = new TableColumn("First Name"); TableColumn lastNameCol = new TableColumn("Last Name"); TableColumn emailCol = new TableColumn("Email"); table.getColumns().addAll(firstNameCol, lastNameCol, emailCol); emailCol.setVisible(false); StackPane root = new StackPane(); root.getChildren().add(table); primaryStage.setScene(new Scene(root, 200, 250)); primaryStage.show(); } }
上面的代碼生成以下結果。
*請認真填寫需求信息,我們會在24小時內與您取得聯系。