-
1. Re: How to use rich:pickList by JavaScript in order to know which item is selected?
ealonso04 Jul 27, 2012 2:04 PM (in response to ealonso04)Hi!
I can get the String of the item selected in the target list by calling a javaScript function like this:
pickList.xhtml:
<rich:pickList value="#{workListBean.selectedColumns}" sourceCaption="Columnas disponibles" targetCaption="Lista de Trabajo"
listWidth="165px" listHeight="100px" orderable="true" switchByDblClick="true"
style="text-align: left;"
id="pick" ontargetclick="test(event);">
<f:selectItems value="#{workListBean.availableColumns}" var="column" itemValue="#{column}" itemLabel="#{column.label}" />
<f:converter converterId="ColumnsConverter" />
</rich:pickList>
JavaScript function:
function test(event){
alert(event.target.textContent);
}
-
2. Re: How to use rich:pickList by JavaScript in order to know which item is selected?
ealonso04 Jul 27, 2012 2:06 PM (in response to ealonso04)But how can I disable the remove button from the pickList?
I have another post asking for that: https://community.jboss.org/thread/203011?tstart=30