SelectOneRadio não passa atributo para o Bean

4 respostas
E

Pessoal estou com um problema estranho

<h:selectOneRadio id="sor"
									value="#{dlgGridCompMB.tipoRelatorio}"
									title="#{msgCompProg['principal.rgTipoTelQtdeVal']}"
									layout="pageDirection">
									<f:selectItem itemValue="1"
												  itemLabel="#{msgCompProg['principal.rbResumido']}" />
									<f:selectItem itemValue="2"
										          itemLabel="#{msgCompProg['principal.rbResumidoVal']}" />
									<a4j:support event="onchange" 
												 ajaxSingle="true"
										         immediate="false" />
								</h:selectOneRadio>



no meu bean tenho o Atributo com os get e set

ja tentei tirar o a4j mais passa somente 0 para o bean o que poderia ser
Deste ja agradeço

4 Respostas

L

cara poste mais detalhes do seu bean e da pagina tbm,so com isso fica dificil de ajudar.
Mas com este immediate= true naum vai funcionar pode ter certeza.

E

o immediate esta false =S.

Entao meu bean

private Integer tipoRelatorio = new Integer(1);


	public Integer getTipoRelatorio() {
		return tipoRelatorio;
	}


	public void setTipoRelatorio(Integer tipoRelatorio) {
		this.tipoRelatorio = tipoRelatorio;
	}

meu jsp

<h:form id="frmImpressao">
			<rich:modalPanel id="painelImpressao" width="345" height="272" showWhenRendered="true" rendered="#{dlgGridCompMB.showImpressaoModalPanel}">
				<rich:panel header="#{msgCompProg['principal.titulo']}"
					style="width=300">
					<h:panelGrid id="pnlPrincipal" width="100%">

						<rich:tabPanel id="pcCompProgTot"
							binding="#{dlgGridCompMB.tabPanel}" switchType="ajax">
							<rich:tab id="tabSheetQuantidade" name="0"
								label="Tipo de Relatorio">
								<h:outputText value="#{msgCompProg['principal.rgTipoTelQtde']}" />
								<rich:spacer height="20px" />
								<h:selectOneRadio id="sor"
									value="#{dlgGridCompMB.tipoRelatorio}"
									title="#{msgCompProg['principal.rgTipoTelQtdeVal']}"
									layout="pageDirection">
									<f:selectItem itemValue="1"
												  itemLabel="#{msgCompProg['principal.rbResumido']}" />
									<f:selectItem itemValue="2"
										          itemLabel="#{msgCompProg['principal.rbResumidoVal']}" />
									<a4j:support event="onchange" 
												 ajaxSingle="true"
										         immediate="false" 
										         actionListener="#{dlgGridCompMB.analizar}"/>
								</h:selectOneRadio>

								<rich:spacer height="20px" />
							</rich:tab>
						</rich:tabPanel>
					</h:panelGrid>
					<h:panelGrid columns="5" width="100%">

						<h:commandLink id="btnVisualizar" styleClass="botao"
							action="#{dlgGridCompMB.imprimir}"
							target="impressao"
							onclick="javascript:window.open('','impressao','height=600px,width=850px,toolbar=no,scrollbars=yes,resizable=no,menubar=no')"
							title="#{msgCompProg['principal.btnVisualizar']}">
							<f:setPropertyActionListener value="Visualizar"
                                                         target="#{dlgGridCompMB.statusImpressao}"/>
							<h:graphicImage url="/images/visualizar.jpg" style="border:0" />
						</h:commandLink>

						<h:commandLink id="btnExportarPDF" styleClass="botao"
							action="#{dlgGridCompMB.imprimir}" title="#{msgCompProg['principal.btnExportarPdf']}">
							<h:graphicImage url="/images/pdf.png" style="border:0" />
							<f:setPropertyActionListener value="ExportarPDF"
								target="#{dlgGridCompMB.statusImpressao}" />
						</h:commandLink>

						<h:commandLink id="btnExportarXLS" styleClass="botao"
							action="#{dlgGridCompMB.imprimir}" title="#{msgCompProg['principal.btnExportarXls']}">
							<h:graphicImage url="/images/xls.jpg" style="border:0" />
							<f:setPropertyActionListener value="ExportarXLS"
								target="#{dlgGridCompMB.statusImpressao}" />
						</h:commandLink>

						<h:commandLink id="btnExportarRTF" styleClass="botao"
							action="#{dlgGridCompMB.imprimir}" title="#{msgCompProg['principal.btnExportarRtf']}" >
							<h:graphicImage url="/images/word.jpg" style="border:0" />
							<f:setPropertyActionListener value="ExportarRTF"
								target="#{dlgGridCompMB.statusImpressao}" />
						</h:commandLink>

						<h:commandLink id="btnFechar" styleClass="botao"
							actionListener="#{dlgGridCompMB.btnFecharPanelImpressalClick}"
							title="#{msgCompProg['principal.btnFechar']}" >
							<h:graphicImage url="/images/fechar.jpg" style="border:0" />
						</h:commandLink>

					</h:panelGrid>
				</rich:panel>
			</rich:modalPanel>
		</h:form>
L

o seu atributo tipoRelatorio deve ser do tipo String.

E

Mudei para String e nada

Criado 13 de setembro de 2010
Ultima resposta 14 de set. de 2010
Respostas 4
Participantes 2