Here is example code:
<h:panelGrid columns="3">
                            <t:outputLabel
                                value="#{m.country}"
                                for="country"/>
                            <t:inputText
                                id="country"
                                required="true"
                                
value="#{createObject.object.addressIdFk.country}"                    
                                onchange="oamSubmitForm('mainForm',this.id);"/>
                            <s:pprPanelGroup id="pprCountry" 
partialTriggers="country">
                                <t:message for="country" showDetail="true" 
showSummary="false" />
                            </s:pprPanelGroup>
                        
                            <t:outputLabel
                                value="#{m.phone}"
                                for="phone"/>
                            <t:inputText
                                id="phone"
                                required="true"
                                
value="#{createObject.object.addressIdFk.phoneNumber}"
                                onchange="oamSubmitForm('mainForm',this.id);"/>
                            <s:pprPanelGroup id="pprPhone" partialTriggers="phone" 
>
                                <t:message for="phone" showDetail="true" 
showSummary="false" />
                            </s:pprPanelGroup>
                        
                        
                            <t:outputLabel
                                value="#{m.province}"
                                for="province" />
                            <t:selectOneMenu
                                id="province"
                                value="#{createObject.selectedProvince}">
                                <t:selectItems
                                    value="#{createObject.provinces}"
                                    var="p"
                                    itemLabel="#{p.provinceName}"
                                    itemValue="#{p.provinceIdPk}" />
                            </t:selectOneMenu>
                            <h:outputText value="" />
                        
                            <t:commandButton
                                value="Save"
                                action="#{createObject.createObject}"/>
                            <t:commandButton value="Cancel"
action="#{createObject.resetForm}" immediate="true"/>
                            <t:outputText value="" />
                        </t:panelGrid>

When filling up the forms, the validation messages will appear -that's
cool. But when there are errors, the 'immediate' attribute of 'Cancel'
button is ignored, and I get validation errors, instead of calling my
action. Is this a bug? Any workaround?

regards,

--
Michał Stawicki

[EMAIL PROTECTED]
http://stawicki.jasliska.pl

Reply via email to