I have to setvalue in lookuppickerfield which is in not editable mode
Its sample example
@Named("fieldGroup.customer")
private LookupPickerField customer;
@Inject
private DataManager dataManager;
@Override
public void init(Map<String, Object> params) {
customer.setEditable(false);
LSD lsd = (LSD) params.get("lsd");
String[] id = lsd.getCustomer().toString().split("Customer-");
String value = id[1];
String[] finalValues = value.split("\\[");
String result = finalValues[0].trim();
UUID resultValue = UUID.fromString(result);
Customer fields = getCustomer(resultValue);
customer.setValue(fields);
}
private Customer getCustomer(UUID customerId){
return dataManager.load(Customer.class)
.query("select p from cpreading$Customer p where p.id = :customerId")
.parameter("customerId", customerId)
.one();
}