Note that there are some explanatory texts on larger screens.

plurals
  1. POJSF 2.0 and JSTL use of c:set tag to store some temporary data
    primarykey
    data
    text
    <p>I'm developing a web application with JSF 2.0 (mojarra) + primefaces. In the past I successfully used the [c:set] tag of jstl library to store some temporary data or output form other tags.</p> <p>In my current case I want to use that again but it doesn't work properly and I have no idea why. In the follow example it works but particularly. Why does the case 2 not work properly?</p> <pre><code>&lt;h:form id="userAdministration"&gt; &lt;p:messages id="messages" showDetail="true" /&gt; &lt;p:dataTable id="userTable" selectionMode="single" var="user" value="#{users}"&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="#{message.user_table_header_id_column}" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{user.id}" /&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="#{message.global_table_header_action_column}" /&gt; &lt;/f:facet&gt; &lt;p:commandButton type="push" onclick="#{user.loginname}DeleteConfirmation.show()" value="#{message.global_table_action_delete}" image="ui-icon-trash"&gt; &lt;f:setPropertyActionListener value="#{user}" target="#{userAdministrationController.selectedUser}" /&gt; &lt;/p:commandButton&gt; &lt;!-- 1. WORKS FINE, STORED VALUE IS "loginname" --&gt; &lt;c:set var="deleteConfirmationMessage" value="#{user.loginname}"&gt;&lt;/c:set&gt; &lt;!-- 2. VALUE IS "!!!" AND NOT "loginname !!!" --&gt; &lt;c:set var="deleteConfirmationMessage2"&gt; &lt;h:outputText value="#{user.loginname}" /&gt;!!! &lt;/c:set&gt; &lt;!-- 3. WORKS FINE (OUTPUT "loginname") --&gt; &lt;h:outputText value="#{user.loginname}" /&gt; &lt;p:confirmDialog message="#{deleteConfirmationMessage}" header="#{message.user_dialog_delete_confirmation_title}" severity="alert" widgetVar="#{user.loginname}DeleteConfirmation"&gt; &lt;p:commandButton value="#{message.user_dialog_delete_confirmation_no}" onclick="#{user.loginname}DeleteConfirmation.hide()" update="@form" type="button" /&gt; &lt;/p:confirmDialog&gt; &lt;/p:column&gt; </code></pre> <p> </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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