This repository has been archived by the owner on May 23, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update #97, create complete CRUD demo with React.
- Loading branch information
Showing
5 changed files
with
125 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* This file is part of MyDMAM. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* Copyright (C) hdsdi3g for hd3g.tv 2015 | ||
* | ||
*/ | ||
package controllers.asyncjs.demoreact; | ||
|
||
import hd3gtv.mydmam.web.AsyncJSControllerVerb; | ||
|
||
public class VerbEditComment extends AsyncJSControllerVerb<Comment, CommentList> { | ||
|
||
public String getVerbName() { | ||
return "edit"; | ||
} | ||
|
||
public Class<Comment> getRequestClass() { | ||
return Comment.class; | ||
} | ||
|
||
public Class<CommentList> getResponseClass() { | ||
return CommentList.class; | ||
} | ||
|
||
public CommentList onRequest(Comment request) throws Exception { | ||
FakeDB.update(request); | ||
|
||
CommentList result = new CommentList(); | ||
result.commentlist = FakeDB.getAll(); | ||
return result; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters