Hi everyone,
I've been having some problems with Intake. Searching through the list
archives, I don't appear to be alone; however, I was unable to find a
resolution. At the moment, intake.isAllValid() is returning true when the
fields obviously do not match the rules laid out in intake.xml. For
testing, I'm using "Thi$ is not valid." for the value of the firstName
field.
############## INTAKE.XML ###############
<input-data basePackage="<domain>.<appName>.">
<group class="CatalogUserGroup" key="CatalogUserGroupKey">
<field name="FirstName" key="firstName" type="String">
<rule mask="[A-Za-z]">Please enter a valid first name.</rule>
</field>
<field name="LastName" key="lastName" type="String">
<rule mask="[A-Za-z]">Please enter a valid last name.</rule>
</field>
</group>
</input-data>
#########################################
############## REGISTER.VM ##############
#set ( $userGroup = $intake.CatalogUserGroup.Default )
<form method="post"
action="$link.setPage("Register.vm").setAction("Account")">
<table width="100%" cellpadding="2">
<tr>
<td width="150"><span class="formFieldLabel">First
Name:</span></td>
<td><input type="text" class="text"
name="$userGroup.FirstName.Key"
value="$!userGroup.FirstName" size="20" maxlength="20"></td>
</tr>
<tr>
<td width="150"><span class="formFieldLabel">Last
Name:</span></td>
<td><input type="text" class="text"
name="$userGroup.LastName.Key"
value="$!userGroup.LastName" size="20" maxlength="20"></td>
</tr>
</table>
</form>
#########################################
############## ACTIONS/ACCOUNT.JAVA ##############
public void doRegister(RunData data, Context context)
throws Exception
{
IntakeTool intake = (IntakeTool) context.get("intake");
if ( intake.isAllValid() ) {
// this is being executed
}
else {
// this should be executed
}
}
##################################################
Michael Blake Day
Artistry Studios - e-commerce design, implementation and hosting
email: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>