0

I have a commandButton like this ...

<h:form>
<h:outputLabel
value="#{selectPage.car.planStage.planStageId != 3}"></h:outputLabel>
 <h:commandButton id="btn_CA_plan"
 styleClass="btn btn-success"
 action="#{selectPage.btn_CA_plan_action}"
 value="Submit CA plan"
 disabled="#{selectPage.car.planStage.planStageId != 3}">
 </h:commandButton>
</h:form>

the h:outputLabel shows "false" disabled="#{selectPage.car.planStage.planStageId != 3}" evaluates to false by the way When I click it, it doesn't execute the function, even though when I remove the disabled attribute, it works fine

Exorcismus
  • 2,243
  • 1
  • 35
  • 68
  • That's answered in point 5 of that dupe. – BalusC Jun 15 '15 at 10:51
  • @BalusC, but you said "The same applies to the disabled attribute of the component, which should not evaluate to true during apply request values phase" while mine evaluates to false, so shouldn't it be working like that ? – Exorcismus Jun 15 '15 at 10:54
  • That's technically impossible, so you're most likely errorneously observing it during render response phase of producing the HTML output instead of during apply request values phase of form submit. – BalusC Jun 15 '15 at 11:07
  • printing the value in a label, shows false, so shouldn't this be the same value at apply request phase ? – Exorcismus Jun 15 '15 at 11:13
  • 1
    "printing" runs during render response phase, so it's indeed not necessarily the same as it would be during apply request values phase of the subsequent form submit request. Just put a debug breakpoint on the getter method and explore the call stack. – BalusC Jun 15 '15 at 11:16

0 Answers0