Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I would just wrap your HTML with <code>&lt;h:panelGroup&gt;</code></p> <pre><code>&lt;h:panelGroup rendered = "#{cc.attrs.value.id != sessionController.authUser.id}"&gt; &lt;div class = "userDetails"&gt; Name: #{cc.attrs.value.name} Details: #{cc.attrs.value.details} &lt;/div&gt; &lt;/h:panelGroup&gt; &lt;h:panelGroup rendered = "#{cc.attrs.value.id == sessionController.authUser.id}"&gt; &lt;div class = "userDetails"&gt; &lt;h:form&gt; ... &lt;/h:form&gt; &lt;/div&gt; &lt;/h:panelGroup&gt; </code></pre> <p>Another option is to use components from either Seam (<code>&lt;s:div&gt;</code>) or Tomahawk (<code>&lt;t:htmlTag&gt;</code>) libraries if you already have them in your project.</p> <p>See: <a href="http://www.jsftoolbox.com/documentation/seam/09-TagReference/seam-div.html">http://www.jsftoolbox.com/documentation/seam/09-TagReference/seam-div.html</a></p> <pre><code>&lt;s:div styleClass = "userDetails" rendered = "#{cc.attrs.value.id != sessionController.authUser.id}"&gt; Name: #{cc.attrs.value.name} Details: #{cc.attrs.value.details} &lt;/s:div&gt; &lt;s:div styleClass = "userDetails" rendered = "#{cc.attrs.value.id == sessionController.authUser.id}"&gt; &lt;h:form&gt; ... &lt;/h:form&gt; &lt;/s:div&gt; </code></pre> <p>Or: <a href="http://myfaces.apache.org/tomahawk-project/tomahawk12/tagdoc/t_htmlTag.html">http://myfaces.apache.org/tomahawk-project/tomahawk12/tagdoc/t_htmlTag.html</a></p> <pre><code>&lt;t:htmlTag value="div" styleClass = "userDetails" rendered = "#{cc.attrs.value.id != sessionController.authUser.id}"&gt; Name: #{cc.attrs.value.name} Details: #{cc.attrs.value.details} &lt;/t:htmlTag&gt; &lt;t:htmlTag value="div" styleClass = "userDetails" rendered = "#{cc.attrs.value.id == sessionController.authUser.id}"&gt; &lt;h:form&gt; ... &lt;/h:form&gt; &lt;/t:htmlTag&gt; </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