Java 重头戏1.2.4:检索控制器中的隐藏变量值

Java 重头戏1.2.4:检索控制器中的隐藏变量值,java,model-view-controller,web-applications,playframework,playframework-1.x,Java,Model View Controller,Web Applications,Playframework,Playframework 1.x,我正在为我的应用程序使用Play1.2.4框架 我正在使用以下命令设置.html文件中的隐藏变量: <input type="hidden" name="test" value="test"> 但不幸的是,字符串str的值为null,这意味着它不起作用 请让我知道如何检索控制器中的隐藏变量值 编辑 <center> <table> <tr style="height: 100px">

我正在为我的应用程序使用Play1.2.4框架

我正在使用以下命令设置.html文件中的隐藏变量:

<input type="hidden" name="test" value="test">
但不幸的是,字符串str的值为
null
,这意味着它不起作用

请让我知道如何检索控制器中的隐藏变量值

编辑

<center>            
    <table>         
        <tr style="height: 100px">
            <td><h1>
                    <b>Title</b>
                </h1></td>
        </tr>
        <tr>
            <td>#{a @Application.userList()} Click Me#{/a}</td>
            <input type="hidden" name="test" value="test">
        </tr>
    </table>        

标题
#{a@Application.userList()}单击我{/a}

您应该将您的
标签放在
标签内。然后,使用
标记发出表单请求。代码如下所示:

<center>
<table>
    <tr style="height: 100px">
        <td><h1>
                <b>Title</b>
            </h1></td>
    </tr>
    <tr>
        <td>
            <form action="@{Application.userList()}" id="myform" method="get">
                <a onclick="document.getElementById('myform').submit();">Click Me</a>
                <input type="hidden" name="test" value="test">
            </form>
        </td>
    </tr>
</table>    

标题
点击我

你能展示完整的html表单吗?我已经编辑了这篇文章,提供了完整的html表单
<center>
<table>
    <tr style="height: 100px">
        <td><h1>
                <b>Title</b>
            </h1></td>
    </tr>
    <tr>
        <td>
            <form action="@{Application.userList()}" id="myform" method="get">
                <a onclick="document.getElementById('myform').submit();">Click Me</a>
                <input type="hidden" name="test" value="test">
            </form>
        </td>
    </tr>
</table>