【发布时间】:2011-08-18 13:44:59
【问题描述】:
我有以下问题:假设下面的代码:
...
<h:form id="..">
<table>
<table border="1">
<tr>
<td><h:outputText value="#{msg.prompt1}"/></td>
<td><h:inputText value="#{personBean.personData1}" />
<!-- This field must not participate in the form. There would be
other JSF form and tags here -->
<h:commandButton action="other_action_with_ajax"/>
</td>
</tr>
<tr>
<td><h:outputText value="#{msg.promp2}"/></td>
<td><h:inputText value="#{personBean.personData2}" /></td>
</tr>
<tr>
<td><h:outputText value="#{msg.msg}"/></td>
<td><h:commandButton action="greeting" value="#{msg.button_text}" /></td>
</tr>
</table>
</h:form>
...
我需要从表格(当前平面 html)中的表单中排除一个字段,因为该字段是只读的,并且处理和处理方式与其他字段不同。它将是其他形式的一部分,而不是该表的包装形式。但是这个字段必须放在这个表中才能正确格式化。我不能把表格放在表格里。将两个表格放在一个表格中而不将其分成两个表格包裹在表格中的最佳方法是什么?
【问题讨论】:
-
我不明白这个问题。您想要一个在提交时不处理的输入字段吗?在这种情况下,只需使用普通的 html 输入字段而不是 jsf 输入字段。在流程输入阶段会被忽略。