You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by "Gaasch, Derek" <dg...@montana.edu> on 2003/02/17 00:20:35 UTC

set multivalue intake field in screen class


I'm successfully using a multivalue intake field for user input, however I
am having trouble pre-setting a multivalue field... I've created a screen
for editing content that was already created. On that form, I need to preset
the values of the intake tool with values pulled from the db. Any
suggestions how to do so? I've tried a variety of things, like 

java.util.ArrayList al = new java.util.ArrayList();
al.add(new Integer(12));
al.add(new Integer(13));
al.add(new Integer(14));

Object o = categorizergroup.get("CategoryId").getValue();
o=al;
 
I know that a multivalue field is a List of workingdog.Record objects (i.e.
when referencing them in the screen class, I know to use
$row.getValue("xxx"), but that hasn't helped me much. Any ideas would be
greatly appreciated .

Thanks!

-d

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


AW: set multivalue intake field in screen class

Posted by Marc Lustig <ma...@marclustig.com>.
I assume you are using a select-field that allows to mark multiple items.
I don't think you can use Intake to automatically map multiple values of a
field. AFAIK Intake can only map single values.
What I would do is retrieving the currently assigned values from db and
manually add the "selected" attributes to the corresponding <option>-fields.
If you need Intake to validate the form, you can setTemp the current values
or put them in the path.

Marc


> -----Ursprüngliche Nachricht-----
> Von: Gaasch, Derek [mailto:dgaasch@montana.edu]
> Gesendet: Montag, 17. Februar 2003 00:21
> An: 'Turbine Developers List'
> Betreff: set multivalue intake field in screen class
>
>
>
>
> I'm successfully using a multivalue intake field for user input, however I
> am having trouble pre-setting a multivalue field... I've created a screen
> for editing content that was already created. On that form, I
> need to preset
> the values of the intake tool with values pulled from the db. Any
> suggestions how to do so? I've tried a variety of things, like
>
> java.util.ArrayList al = new java.util.ArrayList();
> al.add(new Integer(12));
> al.add(new Integer(13));
> al.add(new Integer(14));
>
> Object o = categorizergroup.get("CategoryId").getValue();
> o=al;
>
> I know that a multivalue field is a List of workingdog.Record
> objects (i.e.
> when referencing them in the screen class, I know to use
> $row.getValue("xxx"), but that hasn't helped me much. Any ideas would be
> greatly appreciated .
>
> Thanks!
>
> -d
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org