Hi Rob!

Thanks for your answer. I've moved the button in the tabs, but unfortunately 
the problem is still present. I've also tried to avoid the h:form tag to use 
the autoform feature of the tabs, but the result is the same. The problem 
exists only, if a tab were not activated yet in a session. If the tab was 
activated at least one time in a new session, all fields were validated 
correctly.

Regards

Philipp

"MyFaces Discussion" <[email protected]> schrieb am 22.04.05 14:20:11:
> 
> The panelTabbedPane has a form built into it so when you click a tab it
> submits the form. Your form and button are probably ignored or have odd
> behaviour because of nesting. If what you want is to submit both tabs at the
> same time then put your button in the tabbedPane component and it will
> submit the tabbedPane's form like the tabs do.
> 
> ----- Original Message ----- 
> From: "Philipp Ahlner" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, April 22, 2005 7:48 AM
> Subject: panelTabbedPane: Wrong validator behavior
> 
> 
> > Hi all!
> >
> > I've two tabs like in the example below. If I press the ok-Button and the
> > first tab is shown, the field on the second tab is not validated.
> > If I switch to the second Tab and back to the first tab, both fields will
> > be validated. It seems the fields are in the component tree after they are
> > the first time rendered. Has everyone an idea for a workaround??
> >
> > <f:view>
> > <h:messages styleClass="errors" showSummary="true" showDetail="true"/>
> > <h:form>
> > <x:panelTabbedPane binding="#{visit.positionenTabPane}">
> > <x:panelTab id="tab1" label="#{bundle.kopfdaten}">
> > <h:panelGrid columns="3" border="0" cellpadding="5" cellspacing="3">
> > <h:outputLabel for="Positionsnummer">
> > <h:outputText value="#{bundle.posNr}" />
> > </h:outputLabel>
> > <h:inputText id="Positionsnummer" size="10" maxlength="10"
> > required="true" value="#{visit.currentPosition.posNr}">
> > <f:validateLength minimum="1" maximum="10" />
> > </h:inputText>
> > <h:message for="Positionsnummer" styleClass="errors" />
> > </h:panelGrid>
> > </x:panelTab>
> > <x:panelTab id="tab2" label="#{bundle.operation}">
> > <h:panelGrid columns="3" border="0" cellpadding="5" cellspacing="3">
> > <h:outputLabel for="op_Bewertungsfaktor">
> > <h:outputText value="#{bundle.bewertungsfaktor}" />
> > </h:outputLabel>
> > <h:inputText id="op_Bewertungsfaktor" size="10" maxlength="10"
> > required="true"
> > value="#{visit.currentPosition.op.bewertungsfaktor}">
> > <f:validateDoubleRange minimum="0" maximum="1" />
> > </h:inputText>
> > <h:message for="op_Bewertungsfaktor" styleClass="errors" />
> > </h:panelGrid>
> > </x:panelTab>
> >                    </x:panelTabbedPane>
> >
> > <h:commandButton value="#{bundle.ok}"
> > action="#{visit.currentPosition.ok}" />
> >
> > </h:form>
> > </f:view>
> >
> > Regards,
> > Philipp
> >
> 



Reply via email to