小编use*_*951的帖子

使用二维数组填充tableview

我是Javafx的新手,想知道如何从二维String数组中填充tableview:

    String[][] staffArray = (String[][]) connection.getAll("StaffServices");
    ObservableList row = FXCollections.observableArrayList(staffArray);

    //don't know what should go in here

    staffTable.setItems(row);
Run Code Online (Sandbox Code Playgroud)

我真的很感激回应.

arrays javafx tableview

6
推荐指数
1
解决办法
1万
查看次数

Amazon API Gateway 和 Spring 云网关用例

我正在开发一个分布式应用程序项目,其中需要根据在 api 网关上使用服务的客户端进行速率限制和身份验证。我想知道设计网关的最佳解决方案。

我应该使用 Spring Cloud gateway 还是 Spring Cloud function/AWS Lambda 来创建网关服务?

microservices aws-lambda aws-api-gateway spring-cloud-gateway spring-cloud-function

4
推荐指数
1
解决办法
4359
查看次数

如何将所有枚举值显示为<f:selectItems>,并将枚举属性作为标签

我有一个RoleStatus枚举,它作为Role实体的属性映射到DB中的整数(但该部分是无关紧要的).我想提出一个List<Role><p:dataTable>其中一列应该有一个<h:selectOneMenu>RoleStatus的财产Role实体.如何使用或不使用OmniFaces实现此功能

这是枚举:

public enum RoleStatus {

    ACTIVE(1, "Active"),
    DISABLE(2, "Disable");

    private final int intStatus;
    private final String status;

    private RoleStatus(int intStatus, String status) {
        this.intStatus = intStatus;
        this.status = status;
    }

    public int getIntStatus() {
        return status;
    }

    public String getStatus() {
        return status;
    }

}
Run Code Online (Sandbox Code Playgroud)

这是支持bean:

@ManagedBean
@ViewScoped
public class RoleController {

    private List<Role> roles;

    @ManagedProperty("#{roleService}")
    private IRoleService roleService;

    @PostConstruct
    public …
Run Code Online (Sandbox Code Playgroud)

datatable jsf enums selectonemenu omnifaces

1
推荐指数
1
解决办法
4197
查看次数