Hi All,
 
Problem is that: intake cannot get parameters in action, all of it are null. 
If I fill all of intaked field correctly and send it to server, I get error 
messages like I send it empty. Messages, and keys get perfectly.

in intake.xml:

<group name="User" key="usr" mapToObject="vili.om.ExtendedUser">
 <field name="UserName" key="un" type="String" mapToProperty="UserName">
 <rule name="required" value="true">fieldCannotEmpty</rule>
 <rule name="maxLength" value="32">fieldLenMax32</rule>
 <rule name="minLength" value="4">fieldLenMin4</rule>
 <rule name="mask" value="[a-z]\w{5,32}">userNameMask</rule>
</field>
...

in form:

<form method="post" 
action="$link.setPage("TeacherForm.vm").setAction("Teach")">
  #set ( $itUser = $intake.User.Default )
  #set ( $itTeacher = $intake.Teacher.Default )
  $intake.declareGroups()
...
  #if (! $itUser.UserName.Valid)
    <tr>#cellAlert($l10n.get($itUser.UserName.Message))</tr>
  #end       
  <tr>#formCell("username" $itUser.UserName.Key $itUser.UserName.Value)</tr>
...

generated html:

<form method="post" 
action="http://localhost:8080/vili/servlet/vili/template/TeacherForm.vm/action/Teach";>
<input type="hidden" name="intake-grp" value="teach"></input>
<input type="hidden" name="teach" value="_0"></input>
<input type="hidden" name="intake-grp" value="usr"></input>
<input type="hidden" name="usr" value="_0"></input>
...

<input type="text" size="30" name="usr_0un" value="">

yes, its seems to be good, because key of Usr group is usr, and key of 
UserName field is un.

in action:

   public void doInsert(RunData data, Context context) throws Exception {
 
     try {
        IntakeTool it = (IntakeTool) context.get("intake");
        if (it != null) {
          usrGrp = intake.get("User", IntakeTool.DEFAULT_KEY, false);
          if (usrGrp != null) 
            Log.debug(LOGHEADER+"usrname:"+usrGrp.get("UserName").toString());
... 
and here all of intaked value is null!

What do I do wrong?

os:Linux debian 3.0, 
jvm: 
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20010925 (JIT enabled: 
jitc))

-- 
thx,
----------------------------------------------------
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