Hi All, 

I read intake service and howto documentation, but I need some codes 
forexample an user registration.

There are two mode of operations: insert or modify

In insert there is no business object (null), the form code is following:

<form method="post" 
action="$link.setPage('UserForm.vm').setAction('UsrAction')">
  #if ($uid != 0)   ## modify
    #set ($itUser = $intake.User.mapTo($user))    
                            ## modified business object (ExtendedUser)
  #else   ## new user registration
    #set ($itUser = $intake.User.Default )
  #end
  ...
  #if( ! $itUser.Email.isValid())
     #errorMsg($itUSer.Email.Message)<br>
  #formLabel("e-mail")
  <td><input type="text" name="$itUser.Email.Key" value="$itUser.Email"></td>
   
ok, it seems to be good, but 
1. when I register a new user and I fill a wrong email value, I get an intake 
error message, but the value is empty! Generated html is:
<input type="text" size="30" name="usr_0umail" value="">
Why it clear presetting value?

2. If I modifiy user's values there is a wrong fieldname in the generated 
html: 
<input type="text" size="30" name="usrnullumail" 
value="[EMAIL PROTECTED]">
What is usrnullumail instead of usr_0umail?

intake.xml is:
<group name="User" key="usr" mapToObject="vili.om.ExtendedUser">
      <field name="Email" key="umail" type="String" mapToProperty="Email">
        <rule name="required" value="true">fieldCannotEmpty</rule>
        <rule name="maxLength" value="99">fieldLenMax99</rule>
        <rule name="mask" value="[EMAIL PROTECTED]">emailFormatError</rule>            
 
      </field>
...
</group>
 -- 
thx a lot,
----------------------------------------------------
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

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

Reply via email to