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