view.html 看起来像这样,我缺少什么,因为表中填充了空值?
<form class="form-inline form-fields" action="SubmitArticle" method="POST">
<fieldset>
<div class="control-group success">
<label class="control-label" for="input01"><a>Author Name</a></label>
<div class="controls">
<input type="text" class="input-xlarge" id="input01" name="${article?.author}">
</div>
</div>
<div class="form-actions">
<button class="btn btn-success btn-large span2" type="submit" name="commit"> Submit </button>
</div>
<div class="control-group right-area success">
<label class="control-label" for="input01"><a>Abstract</a></label>
<div class="controls">
<textarea id="textarea" class="input-xlarge" rows="3" style="width: 498px; height: 283px;" name="${article?.abstract}"></textarea>
</div>
</div>
</fieldset>
</form>
我的控制器中的操作如下所示:
public static void SubmitArticle(String article_name, User author, String article_abstract) {
Article article = new Article(article_name, author, article_abstract);
article.save();
}