myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cagatay Civici <cagatay.civ...@gmail.com>
Subject Re: validateBean and java.lang.InstantiationException: org.apache.myfaces.extensions.validator.beanval.interceptor.BeanValidatorWrapper
Date Sun, 18 Jul 2010 23:07:59 GMT
Hi Simon,

Can you try without the process="@form" option?

Cagatay

On Jul 18, 2010, at 11:13 PM, Simon Zambrovski wrote:

> Hi Folks,
> 
> I observe a strange exception by that appears inside of the
> BeanValidatorWrapper in a very specific scenario. Here is how it goes:
> 
> I use PrimeFaces 2.0.2 running on Mojarra JSF and using ExtVal for Bean
> Validation (especially to support @Valid). It works perfect, except for
> one case. If I open a popup (p:dialog) and use a link (p:commandButton)
> which submits a form which contains a f:validateBean tag setting a Bean
> Validation group - an exception is thrown during an attempt to access an
> non-existent default constructor in BeanValidatorWrapper. If I remove
> the f:validateBean tag, everything works fine, and if I use it not from
> the popup too. Here is the VDL:
> 
>        <p:dialog widgetVar="PopupDialog" fixedCenter="true"
> header="Customer Search" modal="true" close="false">
>            <h:form id="PopupDialogForm" prependId="false">
>                <h:messages globalOnly="true" errorClass="error"
> fatalClass="fatal" infoClass="info" warnClass="warn" />
>                <p:panel header="Customer Search">
>                    <h:panelGrid columns="1">
>                        <h:panelGrid columns="2">
>                            <h:outputLabel for="name" value="Name:" />
>                            <h:inputText id="name"
> value="#{searchController.search.name}" label="#{msgs.label}">
>                                <f:validateBean
> validationGroups="de.techjava.web.popup.validation.SearchGroup" />
>                            </h:inputText>
>                        </h:panelGrid>
>                        <h:message for="name" id="name_msg" />
>                        <p:commandButton value="Search"
> action="#{searchController.doSearch}" onsuccess="if (args) { var isValid
> = args.isValid; if (isValid) { PopupDialog.hide();}}"                
>            update="@form" process="@form" />
>                    </h:panelGrid>
>                </p:panel>
>                <p:panel header="Customer Search Result">
>                    <p:dataTable id="items"
> value="#{searchController.result}" var="item">
>                        <p:column>
>                            <f:facet name="header">
>                                <h:outputText value="Name" />
>                            </f:facet>
>                            <h:outputText value="#{item.name}" />
>                        </p:column>
>                    </p:dataTable>
>                </p:panel>
>                <p:commandButton value="Close"
> action="#{searchController.doCancel}" onsuccess="PopupDialog.hide()"
> update="@none" process="@this" />
>            </h:form>
>        </p:dialog>
> 
> 
> 
> Any ideas?
> 
> Kind regards,
> 
> Simon


Mime
View raw message