我有这个:
<html
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
>
<h:selectOneRadio>
<f:selectItem value="1" itemValue="1" itemLabel="123"/>
<f:selectItem value="2" itemValue="2" itemLabel="321"/>
</h:selectOneRadio>
Run Code Online (Sandbox Code Playgroud)
我得到了这个:
<f:selectItem value="1" itemValue="1" itemLabel="123"></f:selectItem>
<f:selectItem value="2" itemValue="2" itemLabel="321"></f:selectItem>
<select name="j_idt5" size="1"></select>
Run Code Online (Sandbox Code Playgroud)
为什么xmlns:f="http://xmlns.jcp.org/jsf/core"标签没有呈现?
我在Netbeans 7.3上使用JBoss AS 7.
我正在使用<rich:select/>元素从列表中选择一个元素,并且需要在用户更改所选元素后执行操作.我写了这个:
<rich:select ... >
<f:selectItems ... />
<a4j:ajax listener="#{...}" event="change" render="..."/>
</rich:select>
Run Code Online (Sandbox Code Playgroud)
并面临一个问题:change只有当<rich:select>焦点丢失时才会发生事件.change当用户选择它的第一个值(来自空的默认值)时,事件根本不起作用.
如何在选择更改后立即调用操作?