I have a component of primefaces p:autocomplete
my question is if it is possible to paste several elements at the same time.
The component:
<p:autoComplete dropdown="true" id="instalacion" maxResults="100"
value="#{principalView.cochesSeleccionados}"
completeMethod="#{principalView.completeText}"
forceSelection="true" multiple="true"
emptyMessage="Ningun dato coincide">
</p:autoComplete>
The bean:
@ManagedBean(name="principalView")
@ViewScoped
public class PrincipalView {
List<String> results;
List<String> cochesSeleccionados;
@PostConstruct
public void init() {
results = new ArrayList<String>();
results.add("BMW");
results.add("AUDI");
results.add("SEAT");
}
public List<String> completeText(String query) {
return results;
}
// gettter and setter
public List<String> getCochesSeleccionados() {
return cochesSeleccionados;
}
public void setCochesSeleccionados(List<String> cochesSeleccionados) {
this.cochesSeleccionados = cochesSeleccionados;
}
}
My intention is to copy the elements from a site:
BMW SEAT and when you paste it in the selected component.