Hi all,
I came across a problem with tabbedPane with nested forms. I have a
tabbedPane containg 4 panelTabs. Each of the tabs has their own forms for
submission. When I load the page I got a Javascript error. When I traced
into the error I found it was possibly caused by nested forms, because the
tabbedPane generates a form by itself, within which I put other 4 forms.
My code is pretty much like this:
<t:panelTabbedPane serverSideTabSwitch="true">
<t:panelTab id="tab01" label="TabA">
<f:subview id="indexView">
<h:form>
Name:<t:inputText value="#{bean.name}"/>
Address:<t:inputText
value="#{bean.address}"/>
<h:commandButton action="#{bean.save}"/>
</h:form>
</f:subview>
</t:panelTab>
<t:panelTab id="tab02" label="TabB">
<f:subview id="indexView2">
<h:form>
Card number:<t:inputText
value="#{bean.cardNumber}"/>
Expiry date:<t:inputText
value="#{bean.expiryDate}"/>
<h:commandButton action="#{bean.save}"/>
</h:form>
</f:subview>
</t:panelTab>
</t:panelTabbedPane>
It was rendered properly without the JS error if I took out the
commandButtons (of cause I couldn't submit the form without the buttons).
Does this mean the tabbedPane component doesn't allow forms within it? It
would be a defect if this is true. Is there anyway that I can put forms
within tabbedPane?
Thanks very much!
Fan
--
View this message in context:
http://www.nabble.com/Can-I-put-forms-within-the-tabbedPane-component--tf4274172.html#a12165435
Sent from the MyFaces - Users mailing list archive at Nabble.com.