【问题标题】:Aui button with name attribute's value not submit具有名称属性值的 Aui 按钮未提交
【发布时间】:2015-02-08 08:30:55
【问题描述】:

我在 AUI taglib 中有一些表单,每个表单都有两个名称相同但值不同的提交按钮。如下:

    <aui:form name="generalInformationForm" action="${generalInformation}" method="post">
    <aui:fieldset label="company.contact.info">
    <aui:layout>
    <aui:column>
<aui:input type="text" name="generalInformationDto.distanceFromResidentailArea"
                    label="distance.from.residential.area" inlineLabel="true" >
                    <aui:validator name="number"></aui:validator>
                </aui:input>
    </aui:column>
    </aui:layout>
    </aui:fieldset>
    <aui:button-row>
    <aui:button type="button" value="back.text" first="true" onClick="<%=showLicenseDetailsInformation.toString()%>" />
            <aui:button type="submit" value="save.as.draft" name="buttonName" />
            <aui:button type="cancel" value="cancel.text" />
            <aui:button type="submit" value="next.text" last="true" name="buttonName" />
        </aui:button-row>
    </aui:form>

在某种形式下它是有效的,但在某种形式下它是无效的

什么问题?

谢谢

【问题讨论】:

    标签: liferay liferay-6 liferay-aui


    【解决方案1】:

    在你的jsp中导入以下taglib

    您一定错过了一些导入。

    你所说的价值没有进入服务器是什么意思?你的意思是?

    为了在控制器中获取命名值,您可以使用类似这样的东西

    String number=request.getParameter("number");

    【讨论】:

    • 我想要服务器上的按钮值
    猜你喜欢
    • 1970-01-01
    • 2015-05-07
    • 2012-10-02
    • 2011-06-30
    • 1970-01-01
    • 1970-01-01
    • 2013-06-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多