Han Hui Wen created ISIS-3030:
----------------------------------
Summary: Multiple level drop down List issue
Key: ISIS-3030
URL: https://issues.apache.org/jira/browse/ISIS-3030
Project: Isis
Issue Type: Bug
Components: Isis Applib (programming model)
Reporter: Han Hui Wen
Here has a mulitiple level drop down list.
@Property(editing = Editing.ENABLED)
@Getter
@Setter
private String tc1Name;
@Property(editing = Editing.ENABLED)
@Getter
@Setter
private String tc2Name;
@Property(editing = Editing.ENABLED)
@Getter
@Setter
private String tc3Name;
@Property(editing = Editing.ENABLED)
@Getter
@Setter
private String tc4Name;
public List<String> choices0Create() {
List<Tc1Object> list = tc1ObjectRepo.findAll();
List<String> nameList = list.stream().map(i ->
i.getTechCapabL1Name()).distinct().collect(Collectors.toList());
return nameList;
}
public String default0Create() {
return getTc1Name();
}
public List<String> choices1Create(String tc1Name) {
Tc1Object tc1 = tc1ObjectRepo.findByTechCapabL1Name(tc1Name);
List<Tc2Object> list = tc2ObjectRepo.findByTc1Object(tc1);
List<String> nameList = list.stream().map(i ->
i.getTechCapabL2Name()).distinct().collect(Collectors.toList());
return nameList;
}
public String default1Create() {
return getTc2Name();
}
public List<String> choices2Create(String tc2Name) {
Tc2Object tc2 = tc2ObjectRepo.findByTechCapabL2Name(tc2Name);
List<Tc3Object> list = tc3ObjectRepo.findByTc2Object(tc2);
List<String> nameList = list.stream().map(i ->
i.getTechCapabL3Name()).distinct().collect(Collectors.toList());
return nameList;
}
public String default2Create() {
return getTc3Name();
}
@Action(semantics = SemanticsOf.NON_IDEMPOTENT)
@ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
public CtlgObject create( final String tc1Name,
final String tc2Name,
final String tc3Name,
final String tc4Name,
final String baseTechName) {
setTc1Name(tc1Name);
setTc2Name(tc2Name);
setTc3Name(tc3Name);
return repositoryService.persist(new
CtlgObject(tc1Name,tc2Name,tc3Name,tc4Name,baseTechName));
}
-----------------
in choices2Create(String tc2Name) function , value of tc2Name is equal
tc1Name ,it's equal the first drop dwon list value ,not the second drop down
list value .
--
This message was sent by Atlassian Jira
(v8.20.7#820007)