cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <coc...@lojjic.net>
Subject Re: checkbox widget with datatype vector
Date Tue, 25 Jul 2006 01:15:26 GMT
Jason Johnston wrote:
> var itemsToDelete = new java.util.Vector();
> var repeater = form.lookupWidget("items");
> for(var i=0; i<repeater.getSize(); i++) { //loop over the rows
>   var row = repeater.getRow(i);
>   if(row.lookupWidget("delete").value) { //is the booleanfield checked?

Small correction... the above line should probably be something more like:

if(java.lang.Boolean.TRUE.equals(row.lookupWidget("delete").value)) {

Datatype conversion between Java and JS can be tricky at times. ;-)


>     itemsToDelete.add(row.lookupWidget("id").value); //add the item id
>   }
> }
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message