Page 1 of 1

List<FormElement>

PostPosted:Fri Jun 13, 2014 5:42 am
by matt81
Hi Guys,
I am calling the following Web Service call (OKMPropertyGroup.getProperties) through Java, see below:
Code: Select all
List<FormElement> Dates = OKMPropertyGroup.getInstance().getProperties(token, path, "okg:test");
Can you tell me how to get the value out of the result returned. See below result:
Code: Select all
{label=Expiry Date, name=okp:edms.date, value=20150108000000, data=, width=100px, height=25px, readonly=false, type=date, validators=[]}
For example i get the name, label by doing the following:
Code: Select all
for (int j = 0; j < Dates.size(); j++) {
     Dates.get(i).getName().toString();
    Dates.get(i).getLabel().toString();
}
However I cannot retrieve the value field, why isn't there .getValue field.

Thanks

Re: List<FormElement>

PostPosted:Sat Jun 14, 2014 9:03 am
by jllort
You must do a instance of each formElement
Code: Select all
if (formElement instanceof Input) {
Input input = (Input) formElement
} else {
 etc...
}

Re: List<FormElement>

PostPosted:Mon Jun 16, 2014 3:30 am
by matt81
Thanks a lot, that worked!