On Fri, Nov 21, 2008 at 8:40 AM, Willem Kunkels
<[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have a little problem with the following.
>
> <h:panelGrid columns="3">
> <!-- Fourth row -->
> <tr:subform id="setup">
> <tr:panelHorizontalLayout>
> <kpm:label
> msgName="letter.of.credit.label.create.setup" dubbelpunt="true"/>
> <tr:spacer width="2px" />
> <tr:selectBooleanCheckbox
> id="setupCheckBox"
>
> value="#{locDataPaginaServiceBean.letterOfCredit.locCreateSetup}"
> autoSubmit="true"/>
> </tr:panelHorizontalLayout>
> </tr:subform>
> <tr:spacer width="8px" />
> <tr:subform default="true">
> <tr:panelHorizontalLayout
> partialTriggers=":setup:setupCheckBox">
> <kpm:label
> msgName="letter.of.credit.label.setup.identification" dubbelpunt="true"/>
> <tr:spacer width="2px" />
> <tr:inputText columns="12" maximumLength="9"
> styleClass="styleLOC-InputText"
>
> value="#{locDataPaginaServiceBean.letterOfCredit.locSetupNumber}"
> disabled="#{!
> locDataPaginaServiceBean.letterOfCredit.locCreateSetup}"
>
> required="#{locDataPaginaServiceBean.letterOfCredit.locCreateSetup}" />
> <tr:spacer width="8px" />
> <kpm:label
> msgName="letter.of.credit.label.setup.description" dubbelpunt="true"/>
> <tr:spacer width="2px" />
> <tr:inputText columns="45"
> maximumLength="40" styleClass="styleLOC-InputText"
>
> value="#{locDataPaginaServiceBean.letterOfCredit.locSetupDescription}"
> disabled="#{!
> locDataPaginaServiceBean.letterOfCredit.locCreateSetup}" />
> </tr:panelHorizontalLayout>
> </tr:subform>
> </h:panelGrid>
>
> The first tr:inputText component is set to required, based on the checkbox
> in the first subform. It is wrapped in its own subform to prevent problems
> with other components on the same page (not shown).
> When I click the checkbox, the tr:inputText becomes required as expected. If
> I then click the checkbox again, the required indication disappears, again
> as expected. However, if I then try to navigate away from the page, an error
> appears for the first tr:inputText, saying I need to enter a value, even
> though the tr:inputText is no longer required. Any ideas , anyone?
unfortunately, this is a known bug.
try to rerender the panelHorizontalLayout instead.
-Matthias
>
> Regards,
>
> Willem Kunkels
> Java Developer
>
> Koopman International BV
> Distelweg 88
> 1031 HH Amsterdam
> The Netherlands
> Tel.: +31 20 494 7 893
> www.koopmanint.com
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf