Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tr:selectManyShuttle - display disabled

hassan ali
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i run example in jsf component book about trinidad for tr:selectManyShuttle it apper disabled i dont know why.

i got this messge in render file

<script type="text/javascript">var _AdfWindowOpenError='A popup window blocker has been detected in your browser. Popup blockers interfere with the operation of this application. Please disable your popup blocker or allow popups from this site.';</script>

while 100% popup blocker closed

kindley help me to run this component

this is manged bean file

import java.util.ArrayList;
import java.util.List;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;

public class productBean {
List allEmployees =null;
List selectedEmployees =null;
List Names= null;

public List getselectedProducts(){

if (selectedEmployees == null) {
selectedEmployees = new ArrayList<javax.faces.model.SelectItem>();
return selectedEmployees;

public void saveSortedProducts(ActionEvent actionEvent) {
List l = this.getselectedProducts();

StringBuilder text = new StringBuilder("Size = ").append(getselectedProducts().size()).append(", Items added are: ");
for (int i = 0; i <l.size(); i++ ) {
text.append("Item ").append(i).append(" = ").append(l.get(i)).append(", ");
FacesContext fctx = FacesContext.getCurrentInstance();
FacesMessage message = new FacesMessage(text.toString());
fctx.addMessage(null, message);

public void setproductSelectItems(List n){
Names = new ArrayList><javax.faces.model.SelectItem>();
public List getproductSelectItems(){
if (allEmployees == null) {

allEmployees = new ArrayList<javax.faces.model.SelectItem>();
allEmployees.add(new javax.faces.model.SelectItem("Employee 1"));
allEmployees.add(new javax.faces.model.SelectItem("Employee 2"));
allEmployees.add(new javax.faces.model.SelectItem("Employee 3"));
allEmployees.add(new javax.faces.model.SelectItem("Employee 4"));
allEmployees.add(new javax.faces.model.SelectItem("Employee 5"));
allEmployees.add(new javax.faces.model.SelectItem("Employee 6"));
return allEmployees;


this jsf file

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri=""%>
<%@ taglib prefix="h" uri=""%>
<%@ taglib uri="" prefix="tr" %>
<%@taglib uri="" prefix="t"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>


<tr:selectManyShuttle id="shuttle" label="Selected Values"
leadingHeader="Available values:"
trailingHeader="Selected values:"
value="#{productBean.selectedProducts}" disabled="false">
<f:selectItems value="#{productBean.productSelectItems}" />

<tr:commandButton text="Submit"
actionListener="#{productBean.saveSortedProducts}" />
<tr:message for="shuttle" />

hassan ali
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i found it

shuttl component need function to save choises at and it was this

public void setselectedProducts(List l){

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic