cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tedwards <>
Subject Selected values in multiselect field
Date Thu, 22 Jun 2006 01:49:10 GMT
Hi people,
I have a situation where I can display a list of options in a list box 
with the data for the list being supplied from an XSP.
        <fd:multivaluefield id="roles">       
            <fd:label>Edit the roles assigned to the group:</fd:label>
            <fd:datatype base="long"/>              
            <fd:selection-list src="cocoon:/resources/getRoleList.xsp" 

I then supply a list of *already* selected items by passing in an array 
to the form widget:

    var roleArray = Array();
    for(var i=0; i < roleList.length; i++){   
        roleArray[i] = new java.lang.Long(roleVal);
    //Assign this array to the role drop down list
    model.roles = roleArray;   

The widget 'roles' already has the list populated by the xsp.
The previously selected values come from the array, and some magic takes 
place behind the scenes where the intersection of both lists results in 
the listitem being set to 'selected'.
I've tried to replicate this using a list supplied by flow-jxpath but I 
can't seem to get it right.
Has anyone got a process in place where you can display a bunch of 
selected items in a multi-select field without resorting to XSP?

Thanks for your time,



This email is from Civica Pty Limited and it, together with 
any attachments, is confidential to the intended recipient(s) 
and the contents may be legally privileged or contain 
proprietary and private information. It is intended solely 
for the person to whom it is addressed. If you are not an 
intended recipient, you may not review, copy or distribute 
this email. If received in error, please notify the sender 
and delete the message from your system immediately. Any 
views or opinions expressed in this email and any files 
transmitted with it are those of the author only and may 
not necessarily reflect the views of Civica and do not create 
any legally binding rights or obligations whatsoever. Unless 
otherwise pre-agreed by exchange of hard copy documents 
signed by duly authorised representatives, contracts may not 
be concluded on behalf of Civica by email. Please note that 
neither Civica nor the sender accepts any responsibility for 
any viruses and it is your responsibility to scan the email 
and the attachments (if any). All email received and sent by 
Civica may be monitored to protect the business interests of 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message