no message
This commit is contained in:
parent
6c2c0a8700
commit
621b72bd9c
|
@ -15,6 +15,20 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData>{
|
|||
private String url;
|
||||
private Option autoCompleteOptions;
|
||||
|
||||
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public Option getAutoCompleteOptions() {
|
||||
return autoCompleteOptions;
|
||||
}
|
||||
public void setAutoCompleteOptions(Option autoCompleteOptions) {
|
||||
this.autoCompleteOptions = autoCompleteOptions;
|
||||
}
|
||||
@Override
|
||||
public Element toXml(Document doc) {
|
||||
Element root = super.toXml(doc);
|
||||
|
@ -47,10 +61,13 @@ public class AutoCompleteData extends ComboBoxData<AutoCompleteData>{
|
|||
if(data!=null){
|
||||
this.url = (String)((Map<String,Object>)data).get("url");
|
||||
Map<String,String> options = ((Map<String,Map<String,String>>)data).get("option");
|
||||
if(options!=null){
|
||||
this.autoCompleteOptions.setLabel(options.get("label"));
|
||||
this.autoCompleteOptions.setValue(options.get("value"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
|
|
|
@ -2,6 +2,7 @@ package utilities.builders;
|
|||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
|
@ -69,10 +70,32 @@ public class ModelBuilder {
|
|||
|
||||
public <U extends FieldData<U>> U toFieldData(Object data,String type,Element dataElement){
|
||||
if(type.equals("combobox")){
|
||||
if(dataElement!=null){
|
||||
if(dataElement.getAttribute("type").equals("autocomplete")){
|
||||
return (U) new AutoCompleteData().fromData(data);
|
||||
}else if(dataElement.getAttribute("type").equals("wordlist"))
|
||||
return (U) new WordListData().fromData(data);
|
||||
}else{
|
||||
if(((ComboBoxData)data).getType().equals("autocomplete")){
|
||||
return (U) new AutoCompleteData().fromData(data);
|
||||
}else if(((ComboBoxData)data).getType().equals("wordlist"))
|
||||
return (U) new WordListData().fromData(data);
|
||||
}
|
||||
}
|
||||
if(type.equals("booleanDecision"))return null;
|
||||
if(type.equals("radiobox"))return (U) new RadioBoxData().fromData(data);
|
||||
if(type.equals("checkBox"))return (U) new CheckBoxData().fromData(data);
|
||||
if(type.equals("freetext"))return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
public <U extends FieldData<U>> U toFieldData(Object data,String type){
|
||||
if(type.equals("combobox")){
|
||||
String comboboxType = (String)((Map<String,Object>)data).get("type");
|
||||
if(comboboxType.equals("autocomplete")){
|
||||
return (U) new AutoCompleteData().fromData(data);
|
||||
}else if(comboboxType.equals("wordlist"))
|
||||
return (U) new WordListData().fromData(data);
|
||||
}
|
||||
if(type.equals("booleanDecision"))return null;
|
||||
if(type.equals("radiobox"))return (U) new RadioBoxData().fromData(data);
|
||||
|
|
|
@ -25,3 +25,7 @@ ng-sidebar-container {
|
|||
/* .ng-sidebar__content {
|
||||
overflow: inherit !important;
|
||||
} */
|
||||
|
||||
.alignment-center{
|
||||
text-align: center;
|
||||
}
|
|
@ -11,8 +11,10 @@
|
|||
<button type="button" *ngIf="dataModel&&dataModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
||||
class="btn btn-primary" (click)="submit();">Save and Finalize</button>
|
||||
<div class="ui-g-12">
|
||||
<div class="alignment-center">
|
||||
<ngb-pagination *ngIf="pages" [collectionSize]="pages.length*10" [page]="currentPageIndex" (pageChange)="changePageIndex($event)" aria-label="Default pagination"></ngb-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<progress-bar *ngIf="form" [formGroup]="form"></progress-bar>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue