You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Bert van Brakel <be...@yahoo.com> on 2002/02/25 09:28:00 UTC
How to use intake to extract multiple values of the same field?
-----BEGIN PGP SIGNED MESSAGE-----
Does anyone know how I can use intake to extract multiple values of
the same field?
For example, if I have the following form to add permissions to a
role:
<form action="RoleAction" name="role" ...>
<input type="text" name="name">
<!--I would eventually use javascript to dynamically add
permission name fields -->
<input type="text" name="perm_name">
<input type="text" name="perm_name">
<input type="text" name="perm_name">
<input type="text" name="perm_name">
<input type="submit" name="eventSubmit_doAddpermissions"
value="add perms">
..declare groups and all
</form>
how do I then extract all the permission names from the form using
intake?
I have got the following in the RoleAction class:
...
Group group = (Group) intake.get( FORM_NAME,
IntakeTool.DEFAULT_KEY );
String name = group.get( "Name"
).toString();
Role role = (Role) TurbineSecurity.getRole(
name );
Permission perm = null;
while( /*for each perm name in the form*/)
<===== how to do this? I need to extract a collectio/array/iterator
of permission names
{
try{
perm = TurbineSecurity.getPermission(
/*perm name*/ );
role.grant( perm );
}
catch(UnknownEntityException e){
}
}
TurbineSecurity.saveRole( role );
........
If anyone is kind enough to help out I would greatly appreciate it.
Bert.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQEVAwUBPHn1jJ/Si5sIC2gPAQHxfQgAtifcUQ5H8fG8dWbZ09ejFnNMHhSSbHar
Q4E3nT4e9r8jkbQfo31d8kYOE4dtS7R/QNHuOc9d4PjAnsPeH16V1HIxOvU0hfcG
jt4no5OMOk561ydljM8HJn78SNaUX4gJVINbKjBocDdFlGscJNnBBpA7kMl7ESNP
jdIkOfR00Z9I/wkKMDM3rRCbHiADn98D8u7wKgzPqkO1uECbwYgpY3vR0ANHgOpC
/O9GbU/2LyQ3yGkiltes/taYPSlhINkqS61ThFXjNinFSZ2RZB2w9y2O/IEfGo8m
dwxUg3Wp3kpE0j+4+yTd4byrCMIisuQ74cLAjgfi4lS3vdq2i/ag8Q==
=ahFg
-----END PGP SIGNATURE-----
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>