AnsweredAssumed Answered

How read aspect fields values in a custom constraint

Question asked by nahanni on May 22, 2007
Latest reply on May 25, 2007 by gavinc
Hi,

I have developped a custom constraint. This constraint is linked to a field in an aspect.

In this constraint, I need to read values in other fields of the aspect.

I tried

String val = (String) context.getExternalContext().getRequestParameterMap().get("the_field"); 
but it doesn't work !


The following go show in the console that the fields of the aspect are not present in the map returned by getRequestParameterMap.

int i=0;
for (Iterator it=context.getExternalContext().getRequestParameterMap().keySet().iterator(); it.hasNext(); i++) {
      Object key = it.next();
      Object value = context.getExternalContext().getRequestParameterMap().get(key);
      System.out.println("\nkey["+i+"]: "+key+" = value["+i+"]: "+value);
}

Any idea on how acces to the other fields values ?

Thank you.

Dom

Outcomes