Skip to main content



      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
Eclipse UserFriend
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}" />
</h:selectOneRadio>
......

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();
System.out.print(value);
....
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
Eclipse UserFriend
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 http://jsftutorials.net/jsf-forum-and-mailling-list.php, for example).

That said, this link may help you to understand the immediate attribute a little better:
https://cwiki.apache.org/confluence/display/MYFACES/How+the+immediate+attribute+works

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


Current Time: Thu Jul 03 11:05:02 EDT 2025

Powered by FUDForum. Page generated in 0.03244 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top