我尝试在Spring MVC中向我的控制器发出一个AJAX查询.
我的行动代码是:
@RequestMapping(value = "events/add", method = RequestMethod.POST)
public void addEvent(@RequestParam(value = "start_date") String start_date, @RequestParam(value = "end_date") String end_date, @RequestParam(value = "text") String text, @RequestParam(value = "userId") String userId){
//some code
}
Run Code Online (Sandbox Code Playgroud)
我的Ajax查询是:
$.ajax({
type: "POST",
url:url,
contentType: "application/json",
data: {
start_date: scheduler.getEvent(id).start_date,
end_date: scheduler.getEvent(id).end_date,
text: scheduler.getEvent(id).text,
userId: userId
},
success:function(result){
//here some code
}
});
Run Code Online (Sandbox Code Playgroud)
但是我收到了一个错误:
必需的字符串参数''start_date不存在
为什么?据我所知,我提出了它(@RequestParam(value = "start_date") String start_date
UDP
现在我给404我的类来获取数据
public class EventData {
public String end_date;
public String start_date;
public String …Run Code Online (Sandbox Code Playgroud) 我想要一个表格,其中每列中都有编辑按钮,我使用了ng2,其中我没有把按钮放在最后.
我的HTML,
<ng-table [config]="config.sorting"
(tableChanged)="onChangeTable(config)"
[rows]="rows" [columns]="columns" >
</ng-table>
Run Code Online (Sandbox Code Playgroud)
我的
rows: Array<any> = [];
columns: Array<any> = [
{title: 'Name', name: 'accountname'},
{title: 'Position', name: 'email', sort: false},
{title: 'Office', name: 'phone', sort: 'asc'},
];
Run Code Online (Sandbox Code Playgroud)
但我想在每一栏都有一个按钮进行编辑和删除,我该怎么做呢,有人可以提供帮助.
我有一个以引导模式形式实现的角度材料 2 日期选择器:
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{title}}</h4>
</div>
<div class="modal-body">
<div class="timeline-cal">
<input class="date-field" [mdDatepicker]="picker" placeholder="Choose a date">
<md-datepicker-toggle mdSuffix [for]="picker"></md-datepicker-toggle>
<md-datepicker #picker></md-datepicker>
</div>
<div class="modal-footer">
<button type="button" class="btn grey-btn pull-right" (click)="cancel()">Cancel</button>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
但是,单击按钮后,日期选择器不会在模态对话框本身中打开,而是在后台打开。我试过这个,但没有帮助:
.mat-datepicker-content{ z-index: 1200}
Run Code Online (Sandbox Code Playgroud) 我正在执行以下操作:
root@ABZ-173:/home/abz# pip3 install en_core_web_md
Collecting en_core_web_md
Could not find a version that satisfies the requirement en_core_web_md (from versions: )
No matching distribution found for en_core_web_md
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Run Code Online (Sandbox Code Playgroud)
这以前曾经工作过。我不想链接spacy到该模型python -m spacy download en。相反,我想独立下载。也可以通过其他各种方式尝试(通过指定版本en_core_web_md == 2.0.0,等等)。无法下载。
我有角度材料的输入组件:
<input mdInput placeholder="Name" disabled floatPlaceholder="never">
Run Code Online (Sandbox Code Playgroud)
我有两个问题:
floatPlaceholder属性在这里工作.(API仅提及此属性的使用md-select).我有一个 angular 4 材质表格单元格中的按钮,我只想在悬停在表格行上时出现:
<md-cell *cdkCellDef="let row" contenteditable='false' >
<div *ngIf="!row.editorEnabled" >{{row.goalStatusName}}
<button md-icon-button><md-icon (click)="row.editorEnabled=true;" mdTooltip="Edit">mode_edit</md-icon></button>
</div>
</md-cell>
Run Code Online (Sandbox Code Playgroud)
我如何实现这一目标?
更新:整个代码:
<md-cell *cdkCellDef="let row" contenteditable='false' >
<div *ngIf="!row.editorEnabled" >{{row.goalStatusName}}
<button md-icon-button><md-icon (click)="row.editorEnabled=true;" class="editButton" mdTooltip="Edit">mode_edit</md-icon></button>
</div>
<div *ngIf="row.editorEnabled" >
<md-input-container><input mdInput [(ngModel)]="row.goalStatusName" #goalName></md-input-container>
<button md-icon-button>
<md-icon (click)="modifyGoal(row.goalStatusId,row.goalStatusName)" mdTooltip="Save" style="color:green;font:bold;" >done</md-icon>
</button>
<button md-icon-button>
<md-icon (click)="row.editorEnabled=false" mdTooltip="Cancel" style="color:red;font:bold;" >clear</md-icon>
</button>
</div>
</md-cell>
Run Code Online (Sandbox Code Playgroud) angular ×4
css ×3
ajax ×1
html ×1
java ×1
pip ×1
python-3.x ×1
rasa-nlu ×1
spacy ×1
spring ×1
spring-mvc ×1
typescript ×1