0

I am a new bee to JSF. I am trying to enable disable check box based on some condition.

Below is the code I tried with Google help but it's not working.

<c:if test="#{ml.dn.y == null}">    
    <h:selectBooleanCheckbox id="ge" value="#{ml.dn.NonCInd}" />
    <h:outputText value="Generate"  style="font-weight: bold;"/> 
</c:if>
Tiny
  • 27,221
  • 105
  • 339
  • 599
tom
  • 5,114
  • 6
  • 24
  • 36
  • 1
    Use the rendered attribute instead such as ``. – Tiny Jan 20 '15 at 20:32
  • Try choosing search keywords more carefully. In (web/UI) development terms "enable and disable" is very, very different from "show and hide". – BalusC Jan 20 '15 at 20:44
  • @Tiny When i try using Rendered i am not seeing the box, I need to disable the check box rather then hiding it. – tom Jan 20 '15 at 20:46
  • 2
  • Thank you Tiny, I can i check two conitions? like, when i tried doing this i got null source exception – tom Jan 20 '15 at 21:06
  • 1
    Yes you can but this way : ``. – Tiny Jan 20 '15 at 21:13
  • 1
    That exception `NullPointerException` should have been thrown somewhere else - maybe in an associated backing bean which cannot reasonably be answered without looking into the associated portion that causes the exception to be thrown. EL itself cannot generate a `NullPointerException`. – Tiny Jan 20 '15 at 21:29
  • Sorry to say it is not disabling instead it is showing me a check box with tick mark, this is going to be last question to be asked Tiny...help me out.... – tom Jan 20 '15 at 21:42
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69255/discussion-between-tom-and-tiny). – tom Jan 20 '15 at 21:45

0 Answers0