I'm using Appfuse 2.0-M5 with JSF and Hibernate and I'm trying to implement
the validation as suggested in the tutorial.  The validation works great
except if I remove values from a required field and then try and delete a
record.  It says the field with no value is required.  Here are the things I
have done to setup the validation:

1)  Added the onsubmit property to the form tag.  It reads like so:

<h:form id="myForm" onsubmit="return validateMyForm(this)"> 

2) Added required="true" to the required fields.

3) Added v:commonsValidator to the required fields.  Example:

<v:commonsValidator type="required" arg="#{text['myForm.username']}"/>

4) Added bCancel property to my delete button.

<c:if test="${not empty myForm.id}">
    <h:commandButton value="#{text['button.delete']}"
action="#{myForm.delete}"   
            id="delete" styleClass="button" onclick="bCancel=true;return
confirmDelete()" /> 
</c:if>

5) Added v:validatorScript after the closing form tag.

</h:form> 
<v:validatorScript functionName="validateMyForm"/>

I do notice in the server logs that it says it doesn't recognize the
attribute functionName for validatorScript.  Anyone have any idea what I'm
missing?

Thanks in advance,
Matt
-- 
View this message in context: 
http://www.nabble.com/Validation-on-deletes-tf3947355s2369.html#a11197917
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to