У меня есть простая форма 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 command - страница перенаправляется на template.jsf (без параметра строки запроса. И это ясно - атрибут действия формы always = "template.jsf", даже параметры строки запроса передаются). Поэтому я не могу вызвать метод отправки для TemplateBean с указанным параметром строки запроса.