Note that there are some explanatory texts on larger screens.

plurals
  1. POt:inputFileUpload doesn't work when it is called from mapped(pretty faces) .xhtml page
    primarykey
    data
    text
    <p>I'm using Tomahawk library for the file upload. However, the backing bean's method is never called when I click on <em>h:commandButton</em> to submit the form.</p> <p>Bellow is the code sequence that should do the job, and it is a part of user_profile.xhtml page(which is stored in the root of WebContent folder; the application is deployed on JBoss 6.1):</p> <pre><code>&lt;p:dialog widgetVar="avatar" hideEffect="fade" width="300" height="300" header="Avatar upload"&gt; &lt;h:form enctype="multipart/form-data"&gt; &lt;t:inputFileUpload value="#{uploadBean.uploadedFile}" id="upload" /&gt; &lt;h:commandButton value="Upload" action="#{uploadBean.submit}" /&gt; &lt;/h:form&gt; &lt;/p:dialog&gt; </code></pre> <p>The link that provides access to the page is <strong>http://localhost:8080/user/20</strong>, because there is url-mapping set in pretty-config.xml file, which looks like:</p> <pre><code>&lt;url-mapping id="user_profile"&gt; &lt;pattern value="/user/#{id}"&gt;&lt;/pattern&gt; &lt;view-id value="/user_profile.jsf"&gt;&lt;/view-id&gt; &lt;/url-mapping&gt; </code></pre> <p>However, when I access the page directly, by avoiding pretty-config mapping, <strong>http://localhost:8080/user_profile.jsf</strong>, upload action works fine! So, I suppose there is some conflict with pretty faces or I overlooked something. </p> <p>Thanks in advance!</p> <p>The beginning of <em>web.xml</em>:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="YAS" version="3.0"&gt; &lt;display-name&gt;YouAndShoe&lt;/display-name&gt; &lt;context-param&gt; &lt;description&gt;State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2&lt;/description&gt; &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt; &lt;param-value&gt;server&lt;/param-value&gt; &lt;/context-param&gt; &lt;filter&gt; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt; &lt;filter-class&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;/filter-mapping&gt; &lt;filter&gt; &lt;filter-name&gt;Pretty Filter&lt;/filter-name&gt; &lt;filter-class&gt;com.ocpsoft.pretty.PrettyFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;Pretty Filter&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt; &lt;/filter-mapping&gt; ... </code></pre>
    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. 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