myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qunming Yuan \(Saul\)" <>
Subject Re: required=true?
Date Sun, 15 Apr 2007 15:43:04 GMT

Just a thought, can you dynamically control the requiredness of your text field base on the
choice of your radio button, something like:


This way whether the text box is render or required is in sync with the choice of your radio


  ----- Original Message ----- 
  From: Bjørn T Johansen 
  Sent: Sunday, April 15, 2007 10:23 AM
  Subject: required=true?

  I have small problem and I was wondering how people get around this...

  I have a radiobutton with yes or no as the two choices that decides if a text field should
be rendered or not (choosing yes or no
  will submit the page)... Also if this text field is rendered, it is a mandatory field and
need some input..

  If I use required = true on the text field, then when the text field is rendered and I choose
the other choice of the
  radiobuttons (that would hide the text field again), I get an error saying that an input
is required in the text field (which is
  normally correct but not this time, because I am just trying to hide the text field again)
  If I use immediate = true, then the value of the radiobutton is not set and the text field
is never rendered...

  I guess this is a normal problem but not sure how to best solve this?



  Bjørn T Johansen
  Someone wrote:
  "I understand that if you play a Windows CD backwards you hear strange Satanic messages"
  To which someone replied:
  "It's even worse than that; play it forwards and it installs Windows"

  Spam/Virus scanning by CanIt Pro

  For more information see

  To control your spam filter, log in at

  E-mail message checked by PC Tools Spyware Doctor (
  Database version: 5.07080

E-mail message checked by PC Tools Spyware Doctor (
Database version: 5.07080

View raw message