You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Julien Martin <ba...@gmail.com> on 2011/10/21 21:37:40 UTC

Render queue error in BeginRender: Class cannot be null

Hello,
I have a slight problem with Tapestry.

I have a Tapestry form which is as follows:
*<form t:type="form" t:id="childminderRegistrationForm"
validate="childminderAccount" clientValidation="none">*
*        <div>*
*            <t:errors/>*
*        </div>*
*        <div>*
*            <label t:type="label" for="accountEmailAddress"/>*
*            <input t:type="textfield" t:id="accountEmailAddress"
value="childminderAccount.accountEmailAddress"/>*
*        </div>*
*        <div>*
*            <label t:type="label" for="accountFirstName"/>*
*            <input t:type="textfield" t:id="accountFirstName"
value="childminderAccount.accountFirstName"/>*
*        </div>*
*        <div>*
*            <label t:type="label" for="accountLastName"/>*
*            <input t:type="textfield" t:id="accountLastName"
value="childminderAccount.accountLastName"/>*
*        </div>*
*        <div>*
*            <label t:type="label" for="accountPassword"/>*
*            <input t:type="textfield" t:id="accountPassword"
value="childminderAccount.accountPassword"/>*
*        </div>*
*        <div>*
*            <label t:type="label" for="accountPasswordConfirmation"/>*
*            <input t:type="textfield" t:id="accountPasswordConfirmation"
value="accountPasswordConfirmation" validate="required"/>*
*        </div>*
*        <div>*
*            <label t:type="label" for="postcode"/>*
*            <input t:type="textfield" t:id="postcode" id="postcode"
name="postcode" size="40"*
*                   value="childminderAccount.postcodeByPostcodeId"
translate="postcodeTranslator" validate="required"/>*
*        </div>*
*        <div>*
*            <input t:type="select" model="childminderStatusSelectModel"
t:id="childminderStatus"*
*
 value="childminderAccount.childMinderStatusByChildMinderStatusId"
 blankLabel="votre statut" blankOption="always" validate="required"/>*
*        </div>*
*        <div><input t:type="submit" type="submit" value="ok"/></div>*
*    </form>*

I try to prepare the entity that is going to be bound to the registration
form as follows (from Tapestry class):
*@OnEvent(EventConstants.PREPARE_FOR_RENDER)*
*    void prepare() {*
*        childminderAccount = new ChildminderAccount();//NOTICE HERE*
*        childMinderStatusList = service.loadChildminderStatusList();*
*        childminderStatusSelectModel =
selectModelFactory.create(childMinderStatusList,"childMinderStatusDescription");
*
*    }*

I still get this error the first time the form is loaded:
*Render queue error in
BeginRender[InscriptionProfessionnelGardeEnfant:accountemailaddress]: Class
cannot be null (displayed in the browser)*
*java.lang.IllegalArgumentException: Class cannot be null (displayed in the
console)*
*
*
Then, surprisingly when I hit F5 (refresh), the form is diplayed correctly.

Can anyone please tell me how to avoid this exception?

Also how I am supposed to properly obtain the instance of ChildminderAccount
that is going to be populated by the user through the form?

Regards,

J.