Note that there are some explanatory texts on larger screens.

plurals
  1. POdisable jsf tag
    text
    copied!<p>I need help disabling this link click without using javascript. So this is a on jsf page where the beans would set a variable to false then the cancel should not be pressable.</p> <pre><code> &lt;p:column style="width:14%; text-align: center;"&gt; &lt;f:facet name="header"&gt; &lt;b&gt;&lt;h:outputText value="Action" /&gt; &lt;/b&gt; &lt;/f:facet&gt; &lt;a href="cancel.xhtml?id=#{requestClass.requestID}"&gt; &lt;h:outputText value="Cancel" /&gt; &lt;/a&gt; &lt;/p:column&gt; </code></pre> <p>Thanks in advance!</p> <p>Update:</p> <pre><code> &lt;p:column style="width:14%; text-align: center;"&gt; &lt;f:facet name="header"&gt; &lt;b&gt;&lt;h:outputText value="Action" /&gt; &lt;/b&gt; &lt;/f:facet&gt; &lt;h:link disabled="#{requestBean.cancelledStatus}" outcome="cancel.xhtml?id=#{requestClass.requestID}" value="Cancel"&gt; &lt;f:param name="id" value="#{requestClass.requestID}" /&gt; &lt;/h:link&gt; &lt;/p:column&gt; </code></pre> <p>that didn't actually disable the button when page is loaded even though status of request is cancelled</p> <p>Update 2: this error showing when updated to following:</p> <pre><code>&lt;h:commandButton value="Cancel" action="cancel.xhtml?id=#{requestClass.requestID}" disabled="#{requestBean.cancelledStatus}"&gt; &lt;f:param name="id" value="#{requestClass.requestID}" /&gt; &lt;/h:commandButton&gt; </code></pre> <p>it says:</p> <pre><code>/pending.xhtml @86,150 action="cancel.xhtml?id=#{requestClass.requestID}" Not a Valid Method Expression: cancel.xhtml?id=#{requestClass.requestID} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload