Exibir PickList através do radio button

0 respostas
R

Galera estou tentando exibir um PickList em uma tela JSP de acordo com a opção escolhida, mais quando seleciono a opção no meu botão Radio Button não acontece nada ele não entra no meu metodo para verificar se o botão selecionado corresponde com o PickList para ser exibido.

alguém pode ajudar

aqui esta minha JSP

<tr>
							<td colspan="2" align="left">
							<a4j:region>												
								<h:selectOneRadio layout="pageDirection" value="#{etiquetasBagueteController.pickList}">
										<f:selectItem itemValue="1" itemLabel="Filial" ></f:selectItem>
										<f:selectItem itemValue="2" itemLabel="Rota de Carregamento" ></f:selectItem>
										<f:selectItem itemValue="3" itemLabel="Faixa de Preço" ></f:selectItem>
										<a4j:support reRender="PanelEtiquetasBaguete" action="#{etiquetasBagueteController.exibirPickList}" event="onchange"></a4j:support>																									
								</h:selectOneRadio>							
							</a4j:region>								
							</td>
						</tr>
						<tr>
							<td>						
								<h:panelGroup id="PanelEtiquetasBaguete">
									<f:subview id="filial" rendered="#{etiquetasBagueteController.filialEtiqueta}">
										<s:selectManyPicklist styleClass="objForm" id="pickListFilial" rendered="#{etiquetasBagueteController.filialEtiqueta}" style="width: 100px; height: 100px;">
											<f:selectItem itemValue="" itemLabel="Filial"/>
											<f:selectItem itemValue="" itemLabel="Filial"/>
											<f:selectItem itemValue="" itemLabel="xx"/>
											<f:selectItem itemValue="" itemLabel="xx"/>
									</s:selectManyPicklist>
									</f:subview>
									<f:subview id="rotaCarregamento">
										<s:selectManyPicklist styleClass="objForm" id="pickListRotaCarregamento" rendered="#{etiquetasBagueteController.rotaCarregamento}" style="width: 100px; height: 100px;">
											<f:selectItem itemValue="" itemLabel="RotaCarregamento"/>
											<f:selectItem itemValue="" itemLabel="RotaCarregamento"/>
											<f:selectItem itemValue="" itemLabel="xx"/>
											<f:selectItem itemValue="" itemLabel="xx"/>
										</s:selectManyPicklist><br/>										
									</f:subview>
									<f:subview id="faixaPreco">
										<s:selectManyPicklist styleClass="objForm" id="pickListFaixaPreco" rendered="#{etiquetasBagueteController.faixaPreco}" style="width: 100px; height: 100px;">
											<f:selectItem itemValue="" itemLabel="FaixaPreco"/>
											<f:selectItem itemValue="" itemLabel="FaixaPreco"/>
											<f:selectItem itemValue="" itemLabel="xx"/>
											<f:selectItem itemValue="" itemLabel="xx"/>
										</s:selectManyPicklist><br/>										
									</f:subview>
								</h:panelGroup>															

							</td>
						</tr>

Aqui esta o Controller onde tenho os metodos Get e Set e o metodo para verificar o botão selecionado e exibir apenas o PickList Correspondente

public class EtiquetasBagueteController
{

	private boolean filialEtiqueta = false;	
	private boolean rotaCarregamento = false;	
	private boolean faixaPreco = false;	
	EtiquetasBaguteTO  etiquetasBaguteTO = new EtiquetasBaguteTO();
	private int pickList;
	
	public int getPickList() {
		return pickList;
	}

	public void setPickList(int pickList) {
		this.pickList = pickList;
	}


		
	public boolean isFilialEtiqueta()
	{
		return filialEtiqueta;
	}
	public void setFilialEtiqueta(boolean filialEtiqueta)
	{
		this.filialEtiqueta = filialEtiqueta;
	}


	public boolean isRotaCarregamento()
	{
		return rotaCarregamento;
	}
	public void setRotaCarregamento(boolean rotaCarregamento)
	{
		this.rotaCarregamento = rotaCarregamento;
	}


	public boolean isFaixaPreco()
	{
		return faixaPreco;
	}
	public void setFaixaPreco(boolean faixaPreco)
	{
		this.faixaPreco = faixaPreco;
	}


	public EtiquetasBaguteTO getEtiquetasBaguteTO()
	{
		return etiquetasBaguteTO;
	}	
	public void setEtiquetasBaguteTO(EtiquetasBaguteTO etiquetasBaguteTO)
	{
		this.etiquetasBaguteTO = etiquetasBaguteTO;
	}


	public void exibirPickList()
	{
		if(etiquetasBaguteTO.getFilialEtiqueta().equals("1")){
			filialEtiqueta = true;
			rotaCarregamento = false;
			faixaPreco = false;
		}else 
			if(etiquetasBaguteTO.getRotaCarregamento().equals("2")){
				filialEtiqueta = false;
				rotaCarregamento = true;
				faixaPreco = true;			
			}else
				if(etiquetasBaguteTO.getFaixaPreco().equals("3")){
					filialEtiqueta = false;
					rotaCarregamento = false;
					faixaPreco = true;
				}
		}


}
Criado 27 de outubro de 2008
Respostas 0
Participantes 1