Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Odd, I can't reproduce this with Mojarra 2.0.2. Maybe there's something more into the code which is colliding with one or other? Or you aren't running the code you think you're running?</p> <p>For the sake of completeness, I'll include the test snippets I used to try to reproduce this problem:</p> <p><code>/resources/components/test.xhtml</code></p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:cc="http://java.sun.com/jsf/composite"&gt; &lt;cc:interface&gt; &lt;cc:attribute name="action" method-signature="java.lang.String action()" required="true" /&gt; &lt;/cc:interface&gt; &lt;cc:implementation&gt; &lt;h:form&gt; &lt;h:commandButton value="submit" action="#{cc.attrs.action}" /&gt; &lt;/h:form&gt; &lt;/cc:implementation&gt; &lt;/html&gt; </code></pre> <p><code>/test.xhtml</code></p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:cc="http://java.sun.com/jsf/composite/components"&gt; &lt;h:head&gt; &lt;title&gt;Test&lt;/title&gt; &lt;/h:head&gt; &lt;h:body&gt; &lt;cc:test action="#{bean.submit}" /&gt; &lt;/h:body&gt; &lt;/html&gt; </code></pre> <p><code>com.example.Bean</code></p> <pre><code>package com.example; import javax.faces.bean.ManagedBean; import javax.faces.bean.RequestScoped; @ManagedBean @RequestScoped public class Bean { public String submit() { System.out.println("submit"); return null; } } </code></pre> <p>Does the above work for you as well?</p>
 

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