Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Indeed, the <code>&lt;f:ajax change&gt;</code> isn't supported on <code>&lt;h:inputHidden&gt;</code>. You'd only get the following exception because the <a href="http://docs.oracle.com/javaee/6/api/javax/faces/component/html/HtmlInputHidden.html" rel="nofollow"><code>HtmlInputHidden</code> class</a> behind the component doesn't implement <a href="http://docs.oracle.com/javaee/6/api/javax/faces/component/behavior/ClientBehaviorHolder.html" rel="nofollow"><code>ClientBehaviorHolder</code> interface</a>:</p> <blockquote> <p><code>javax.faces.view.facelets.TagException: /test.xhtml @23,52 &lt;f:ajax&gt; Unable to attach &lt;f:ajax&gt; to non-ClientBehaviorHolder parent</code></p> </blockquote> <p>You indeed need to replace it by a <code>&lt;h:inputText&gt;</code>. You can hide it using CSS <code>display:none;</code>. You only need to realize that manipulating its value by JavaScript won't automagically trigger any HTML DOM events. You'd need to manually trigger the <code>change</code> event by explicitly invoking <code>onchange()</code> on the HTML DOM element:</p> <pre><code>var input = document.getElementById(...); input.value = newValue; input.onchange(); </code></pre> <p>Or, if you happen to use jQuery on the whole,</p> <pre><code>var $input = $("#..."); $input.val(newValue); $input.change(); // Or $input.trigger("change"); </code></pre> <hr> <p><strong>Unrelated</strong> to the concrete problem, as to the question in the comment here:</p> <pre><code>&lt;cc:attribute name="id" /&gt;&lt;!-- necessary? --&gt; </code></pre> <p>Only for documentary purposes. I.e. when you actually use <code>shortDescription</code>. </p> <pre><code>&lt;cc:attribute name="id" shortDescription="The ID of the composite." /&gt; </code></pre> <p>But otherwise it's already inherited from the <a href="http://docs.oracle.com/javaee/6/api/javax/faces/component/UIComponent.html" rel="nofollow"><code>UIComponent</code></a> base class (like <code>binding</code> and <code>rendered</code>).</p>
    singulars
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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