Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » problem with a <h:selectOneRadio(problem with a <h:selectOneRadio)
problem with a <h:selectOneRadio [message #777560] Tue, 10 January 2012 12:45 Go to next message
Jhonne Mising name is currently offline Jhonne Mising name
Messages: 6
Registered: December 2011
Location: Armenia, Quindio, Colombi...
Junior Member

I have this in the file.jsp: a simple Button and selectOneRadio.

<h:commandButton immediate="true" id="redisplayCommand" type="submit"
value="Redisplay" action="#{ventaBB.agregarProducto}" />

<h:selectOneRadio id="c" layout="pageDirection" binding="#{ventaBB.radioButton}">
<f:selectItems value="#{ventaBB.productos}" />

This example show the selected value in a class, when you click in the button. this is the method in the Backing Bean:

public String agregarProducto (){
String value=(String)radioButton.getSubmittedValue();
very good... but.. if the property immediate="true" in the button is removed o update to false, the String value obtained is null
how do I get the value of radioButton without using the property immediate="true"??

I need a example of this type.. thanks...
from Colombia

Re: problem with a <h:selectOneRadio [message #777601 is a reply to message #777560] Tue, 10 January 2012 14:51 Go to previous message
Ian Trimble is currently offline Ian Trimble
Messages: 136
Registered: July 2009
Senior Member
Hi Jhonne Mising name (if that is, truly, your name),

This forum is for discussion about the WTP JSF Tools project. You are, of course, free to ask general JSF questions here, but will likely get more response in a general JSF forum (take a look at, for example).

That said, this link may help you to understand the immediate attribute a little better:

- Ian
Previous Topic:UnsupportedOperationException
Next Topic:Problem to deploy application JSF
Goto Forum:

Current Time: Tue Jul 29 04:58:24 EDT 2014

Powered by FUDForum. Page generated in 0.05402 seconds