File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes tr:selectManyShuttle - display    disabled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "tr:selectManyShuttle - display    disabled" Watch "tr:selectManyShuttle - display    disabled" New topic

tr:selectManyShuttle - display disabled

hassan ali
Ranch Hand

Joined: Apr 23, 2006
Posts: 127
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

Joined: Apr 23, 2006
Posts: 127
i found it

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

public void setselectedProducts(List l){

I agree. Here's the link:
subject: tr:selectManyShuttle - display disabled
It's not a secret anymore!