1

我如何更新表格以外的数据。? 我创建了一个按钮,但不更新我的数据。

<html>
    <head>
        <meta name="layout" content="main">
        <g:set var="entityName" value="${message(code: 'product.label', default: 'product')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div id="wyszukaj">
              <g:form method="post">

                <div class="fieldcontain" ${hasErrors(bean: productInstance, field: 'symbolIndeksu', 'error')}">
                        <label for="symbolIndeksu" style="width: 152px;">
                             <g:message code="product.wyszukajSymbolIndeksu.label" default="Symbol Indeksu" />
                        </label>
                        <g:select id="id" name="id" from="${com.app.product.findAll([sort:"symbolIndeksu"])}"  optionKey="id"  value="${productInstance?.id}" class="many-to-one inptSearch chzn-select" />  
                        <g:actionSubmit class="save" action="edytuj"  value="Zmień" />
                        <g:actionSubmit class="save" action="aktualizuj" value="${message(code: 'default.button.update.label', default: 'Update')}" /> 
                            /* Button at this point should update the data */
                     </div>
            </g:form>
        </div>

  <div id="view-tab">
      <g:render template="tabs"/>
         <div id="content-tab">
            <div id="edytuj-product" class="content scaffold-edit" role="main">

            <g:if test="${flash.message}">
            <div class="message" role="status">${flash.message}</div>
            </g:if>

            <g:hasErrors bean="${productInstance}">
            <ul class="errors" role="alert">
                <g:eachError bean="${productInstance}" var="error">
                <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                </g:eachError>
            </ul>
            </g:hasErrors>
        <g:form  method="post" >
                <g:hiddenField name="id" value="${productInstance?.id}" />
                <g:hiddenField name="version" value="${productInstance?.version}" />

                <fieldset class="form">
                    <g:render template="formularz"/>
                </fieldset>
         </div>
       </div>
               </g:form>
        </div>
    </body>
</html>

总之。我想在 g: form.form 之外使用更新按钮。以前,我在底部有按钮

4

0 回答 0