- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
谁能给我提供一个如何使用 rich:orderingList 控件的例子?我已经达到了可以按需要显示数据的地步,但现在我实际上希望将修改后的订单传播到服务器。我找不到关于该主题的任何内容。
<rich:orderingList value="#{countryHandler.data}" var="country">
<rich:column>
<f:facet name="header">
<h:outputText value="id"/>
</f:facet>
<h:outputText value="#{country.id}"/>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="code"/>
</f:facet>
<h:outputText value="#{country.code}"/>
</rich:column>
我的支持 bean 定义了一个属性数据,它只返回一个 List
再说一遍:如何将更改后的对象顺序填充回服务器?
最佳答案
当您提交表单时,Seam 会为您重新排序列表 (#{countryHandler.data}),因此此时您应该可以访问。我举了一个简单的例子来测试这个。所有文件如下:
国家处理器.java
@Name("countryHandler")
@Scope(ScopeType.CONVERSATION)
public class CountryHandler {
@In(create=true)
private CountryService countryService;
private List<Country> data;
public void loadCountries() {
this.data = this.countryService.getCountryList();
}
public List<Country> getData() {
return data;
}
public void setData(List<String> data) {
this.data = data;
}
public void submit() {
//check the list order here. You should find it's ordered...
}
}
国家.xhtml
...snip...
<rich:orderingList value="#{countryHandler.data}" var="country">
<rich:column>
<f:facet name="header">
<h:outputText value="id"/>
</f:facet>
<h:outputText value="#{country.id}"/>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="code"/>
</f:facet>
<h:outputText value="#{country.code}"/>
</rich:column>
</rich:orderingList>
<h:commandButton action="#{countryHandler.submit()}" value="Submit" />
...snip...
国家.page.xml
<page>
...snip...
<begin-conversation join="true"/>
<action execute="#{countryHandler.loadCountries()}"/>
...snip...
</page>
另见:
关于java - 丰富的 :orderingList usage example,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1141942/
我有以下 Java 代码: public static void fun(int[] a) { int min; for(int j=0;j
我每天都在使用 PHPStorm 中出色的查找用法功能,搜索结果属于以下两个类别之一: 非代码用法 发现用法 我几乎对非代码用法不感兴趣。此外,当我寻找名为 get() 或 set() 的方法的用法时
我正在尝试在 Visual Studio 中分析我的 UWP(通用 Windows 平台)应用程序,以查看导致我的进程内存使用率如此之高的原因。 我一直在使用 Visual Studio 的内置诊断工
这个问题可能也适用于其他库,但是使用 Cassandra 作为一个具体的例子来确保我问的是一个可以回答的问题: 使用 Kotlin,我可以使用 Cassandra 的异步方法,然后用 Listenab
我正在开发一个简单的命令行工具,但我发现默认的 Usage 消息有点欠缺。我想定义我自己的,我认为我做对了我指的是 this example . 我注释掉了我编写的大部分代码,因此包含 main 函数
我正在从应用程序 A 向 Artemis 发送消息,但我从应用程序 A 收到此错误: AMQ212054: Destination address=my-service is blocked. If
我正在从应用程序 A 向 Artemis 发送消息,但我从应用程序 A 收到此错误: AMQ212054: Destination address=my-service is blocked. If
我阅读了有关在 PostgreSQL 中授予序列的答案。通常,他们说同时授予 SELECT、USAGE。我想知道我是否可以只授予 USAGE。哪一个是授予序列的最佳实践,为什么? 最佳答案 Quote
我正在尝试查看我的使用计划中每个 API key 的使用情况。但是当我跑 aws apigateway get-usage --usage-plan-id ***** --start-date 202
我正在使用 Spring Boot 2.3.2。在执行器的帮助下,将应用程序指标发布到指标控制台。我想知道 system.cpu.usage 和有什么区别和 process.cpu.usage执行器优
将 Xamarin.Forms iOS 应用提交到 Apple 的 TestFlight 后,我们收到以下消息。 消息: Dear Developer, We identified one or
我想捕获以下参数: lastAccessedTime - 用户上次访问站点的时间(通常在登录过程中显示) isOnline - 表示用户是否在线的 bool 值。 一种。将这些变量作为用户表本身的一部
我的Web服务器上偶尔有HTTPD请求,这会增加CPU使用率。我在顶部观看此视频。每个URL都是在每次请求时动态生成的。该框架是Codeigniter。我正在使用prefork Apache作为Lin
我们有一个非常小的专业用户群。 没有社区。 我的老板想找出谁在使用它。他的方法是简单地建立一个隐藏的连接,也许是一个自动更新功能,默认情况下在没有更新的情况下启用WITHOUT通知... 我不太喜欢这
我正在尝试监视安装和运行Prometheus的计算机的cpu利用率。我有一个指标'process_cpu_seconds_total'。我可以找到该指标的评分或评分。但是我不太确定如何得出CPU利用率
是否可以估计单个进程在运行时产生的热量。 处理器的温度读数很容易获得,但我需要的是进程特定的信息。 是否可以映射 CPU 利用率、IO、运行时间、内存使用等信息来获得某种估计? 最佳答案 我要说不。因
当一个内核的 CPU 使用率为 100% 时,这意味着什么? 这是否意味着进程已经达到了内核的最大可能性能(使用矢量化),还是意味着 CPU 正在执行与内核时钟一样多的周期? 另外,如果它是 100%
这个问题已经有答案了: some macro statements may have unexpected results in C++? (3 个回答) 已关闭 9 年前。 以下脚本的输出是 20。
我似乎无法使用 JSON::XS的OO接口(interface)正常。以下呱呱叫我无法追踪的错误: use JSON::XS; my $array = ['foo', 'bar']; my $code
我希望我们的应用程序在第一次启动时向服务器发送一些匿名信息(操作系统、Java 版本等)。唯一的用途是确定正在使用的副本数量,并了解我们的客户最常使用哪些操作系统,以便我们知道将测试重点放在何处。 我
我是一名优秀的程序员,十分优秀!