<constraints>
<constraint name="ev:CodiInteressats" type="LIST">
<parameter name="allowedValues">
<list>
<value>1</value>
<value>2</value>
</list>
</parameter>
</constraint>
<property name="ev:codiInteressatsDoc">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>true</multiple>
<constraints>
<constraint ref="ev:CodiInteressats" />
</constraints>
</property>
NamedValue codiIntValue = Utils.createNamedValue(
Constants.createQNameString(
docModel.NAMESPACE_CONTENT_MODEL,
docModel.CODIINTERESSATS), document
.getCodiInteressat());
<list>
<value>"1"</value>
<value>"2"</value>
</list>
public class CodiInteresats
{
private List<String> codiInteresatList = new ArrayList<String>();
/**
* Get the list of 'CodiInteresats' element items.
*
* @return list
*/
public List<String> getCodiInteresats() {
return codiInteresatList;
}
/**
* Set the list of 'CodiInteresats' element items.
*
* @param list
*/
public void setCodiInteresats(List<String> list) {
codiInteresatList = list;
}
}
la parte de codigo de esta funcion es la que he puesto al principio del post y esto, el problema es que la funcion "Utils.createNamedValue(Constants.createQNameString(string, string)" te pide dos strings y yo el segundo parametro lo tengo del tipo list, he intentado usar el "codiInteressats.toString()" pero no cuela…
list lista = new list();
for (int i=0; i<10;i++){
lista.add(i);
}
String valor = lista.get(5).toString();
O también:String valor = ""+lista.get(5);
Object get(int index)
Returns the element at the specified position in this list.
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.