开发者

Grails g:link button appears larger than other buttons

I have a page that shows details of a bookInstance. On that page I want to put a button that uses a g:link to show some additional details.

I've got code that works mechanically, but the button doesn't appear correctly. The button's box doesn't shrink to the size of the content and there's a funny line added to the right hand side of the button.

Here's the code I'm currently using;

<g:form>
    <p><g:actionSubmit class="button" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" />
    <g:actionSubmit class="button" action="delete" value="${message(code: 'default.butt开发者_Python百科on.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
    <g:link controller="ownedBook" action="list" params="['book.id': bookInstance?.id]" ><input class="button" value="${message(code: 'default.button.add.owner.label', default: 'Owned Copies')}" /></g:link>
    <g:hiddenField name="id" value="${bookInstance?.id}" /></p>
</g:form>

Image Link


You are wrapping an input button in your g:link. Just use the message (that forms the button label) as the g:link contents.

Do you want and anchor tag, or a button?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜