私は単純なJSFフォームを持っています:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="layout.jsp">
<ui:define name="title">Редактирование шаблона</ui:define>
<ui:define name="content">
<t:div rendered="#{template.hasErrors}">
#{template.errorText}
</t:div>
<t:div rendered="#{template.hasMessage}">
#{template.messageText}
<p>
<a href="/templates.jsf">Все шаблоны</a>
</p>
</t:div>
<t:div rendered="#{template.canEdit}">
<h:form>
Name: <h:inputText value="#{template.name}"/> <br/>
Content Type: <h:inputText value="#{template.contentType}"/> <br/>
Content: <h:inputTextarea value="#{template.content}"/> <br/>
Description: <h:inputTextarea value="#{template.description}"/> <br/>
<h:commandButton value="Сохранить" action="#{template.submit}">
</h:commandButton>
</h:form>
</t:div>
</ui:define>
</ui:composition>
</html>
すべてが機能しますが、このページをクエリ文字列パラメーター (template.jsf?Id=5) で使用してから、sumbit コマンド ボタンを使用しようとすると、ページは template.jsf にリダイレクトされます (クエリ文字列パラメーターなし。 -- フォーム アクション属性は常に ="template.jsf" であり、クエリ文字列パラメーターも渡されます)。したがって、クエリ文字列パラメーターを指定して TemplateBean の submit メソッドを呼び出すことはできません。