Hi, Thanks for your help. Our mails must have crossed :)
isDeepVisible() does indeed seem to be setting the disabled attribute of the hidden form field! I did read the docs here but in all honesty they still don't make a lot of sense to me. I'll have a play with it as it sure sounds a bit more elegant than my solution in my previous mail :) Thanks for your help, Joost On Jul 11, 2013, at 10:45 PM, Yunhua Sang wrote: > I have the similar problem; I thinks it's because the FormFragment renders > a hidden element, when the zone gets refreshed, the hidden element's > disable property is set to be true, which is invalid, then the elements > within the FromFragment get submitted I guess it's related to > isDeepVisible() Javascript function. Please correct me if I am wrong. > > Probably you could specify the visibleBound property of the FormFragment, > to override the default behavior. > > > > > > On Thu, Jul 11, 2013 at 7:16 AM, Joost Schouten (ml) > <joost...@jsportal.com>wrote: > >> Hi, >> >> I'm using a FormFragment triggered by two Radio's in a RadioGroup. This all >> works fine and validation works as expected. The hidden Fragment is ignored >> when the form is submitted. Except for one situation: >> >> when I load the Form and containing FormFragment's in a Zone and use the >> visible attribute on the FormFragment to hide one of them due to a >> preselected Radio, the server will validate the fields in the Hidden >> FormFragment as well. If I select the Radio's back and forth it works as >> expected. When debugging I noticed the ProcessSubmission ComponentActions >> are executed where they are not when the formfragment is ignored as >> expected. Also the t:formdate is longer in my failing case as opposed to >> the scenario where it ignores my hidden fields. This leads me to believe >> there is some sort of javascript initialization call not being called in my >> failing case. >> >> Has anyone seen this before? And clues on how to solve it? I'm on Tap 5.3.6 >> >> Thanks, >> Joost >> >> some of my code: >> >> @Component(id = "paymentTypeRadioGroup", parameters = {"value=paymentType", >> >> "label=message:components.entities.EntitiesCreditCard.payByTypeLabel", >> >> "validate=required"}) >> >> private RadioGroup paymentTypeRadioGroup; >> >> >> @Mixins("TriggerFragment") >> >> @Component(id = "payByCreditCardRadio", parameters = { >> "value=literal:CREDIT_CARD", >> >> "label=message:components.entities.EntitiesCreditCard.payByCreditCard", >> >> "fragment=creditCardBlock"}) >> >> private Radio payByCreditCardRadio; >> >> >> @Mixins("TriggerFragment") >> >> @Component(id = "payByInvoiceRadio", parameters = { >> "value=literal:MANUAL_INVOICE", >> >> "label=message:components.entities.EntitiesCreditCard.payByInvoice", >> >> "fragment=manualInvoiceBlock"}) >> >> private Radio payByInvoiceRadio; >> >> >> @Component(id = "creditCardBlock", parameters = { >> >> "visible=prop:showCreditCardBlock", >> >> "alwaysSubmit=literal:false"}) >> >> private FormFragment creditCardBlock; >> >> >> @Component(id = "manualInvoiceBlock", parameters = { >> >> "visible=prop:showManualInvoiceBlock", >> >> "alwaysSubmit=literal:false"}) >> >> private FormFragment manualInvoiceBlock; >>