v8.3p_2012-11-29/PowerEdition Deployment (built 2012-11-29)
LinkItem stops working when it's used in dynamic form as mailto link.
((LinkItem) item).setLinkTitle(val) inside formatter gives an infinite loop. And without it linkTitile is "mailto:email".
Is there a way to overcome this issue? Is there a need to run formatter formatValue() method on setLinkTitle?
I've also tried to override LinkItem's setValue(...) methods, but without any luck, overridden methods are not called.
TY.
LinkItem stops working when it's used in dynamic form as mailto link.
Code:
LinkItem mailtoItem = new LinkItem(dsField.getName()); mailtoItem.setCanEdit(false); mailtoItem.setValueFormatter(new FormItemValueFormatter() { @Override public String formatValue(Object value, Record record, DynamicForm form, FormItem item) { if (value == null) { return null; } String val = (String) value; if (val.contains("@")) { [b]((LinkItem) item).setLinkTitle(val);[/b] val = "mailto:" + val; } return val; } });
Is there a way to overcome this issue? Is there a need to run formatter formatValue() method on setLinkTitle?
I've also tried to override LinkItem's setValue(...) methods, but without any luck, overridden methods are not called.
TY.
Comment