Re: does not execute action listener

Splash Forums PrettyFaces Users does not execute action listener Re: does not execute action listener

#23258

Hi,

I found the root cause of the form not calling the action method.

Since the complaint.jsf has FileUploadItem, my form has to add the enctype=”multipart/form-data” .

Once I tried to add the enctype=”multipart/form-data” to the encoding.xhtml. It would not call the action method at all.

</f:metadata>

<head>
<title>Encoding Test</title>
</head>

<body>
<h1>Encoding Test</h1>
<h1><h:outputText value="Pretty Decode Page" /></h1>
<h:form id="form" enctype="multipart/form-data" prependId="false">
<h:outputText value="Enter a value: will be decoded" /><br />
<h:inputText id="input0" value="#{exampleBean.param0}" /><br /><br />

<h:outputText value="Enter a value: will not be decoded" /><br />
<h:inputText id="input1" value="#{exampleBean.param1}" />
<!-- <h:commandButton id="submit" action="#{exampleBean.handleDecode}" value="Submit" /><br /> -->
<h:commandLink id="submit" action="#{exampleBean.handleDecode}" value="Submit" />

</h:form>
</body>
</html>