Liferay自动字段:在控制器中检索索引

Liferay自动字段:在控制器中检索索引,liferay,Liferay,我试图在portlet的配置中使用自动字段,但我遇到了一个问题:在操作中,我可以检索数据字段,但不能检索控制器中的字段索引。当我从动作请求中得到它时,它是一个空字符串:( 以下是jsp中与字段对应的代码: <div id="fyhespecials"> <div class="lfr-form-row lfr-form-row-inline"> <div class="row-fields">

我试图在portlet的配置中使用自动字段,但我遇到了一个问题:在操作中,我可以检索数据字段,但不能检索控制器中的字段索引。当我从动作请求中得到它时,它是一个空字符串:(

以下是jsp中与字段对应的代码:

<div id="fyhespecials">
        <div class="lfr-form-row lfr-form-row-inline">
            <div class="row-fields">
                <aui:input id='fecha0' name="fecha0" label="Fecha" />
                <aui:input id='horario0' name="horario0" label="Horario" />
            </div>
        </div>
</div>

希望这有助于找到解决方案。

请在此处添加控制器代码段好吗?当然,但我现在无法添加。我将在周一添加:)刚刚添加。忘了澄清一下,我一直在尝试这段代码的许多变体,例如更改索引字符串的名称,使用ParamUtil获取actionReuqest参数。。。但未能解决此问题。这可能是问题中的一个输入错误,但当您实例化组件时,您指定了一个名为
索引的字段,但在示例代码中您使用的是
索引。您是对的,adolfopa,这是问题中的一个拼写错误,因为我对代码做了一些修改,我必须更容易理解;我刚刚纠正了它。谢谢你的留言,伙计:)
<aui:script use="liferay-auto-fields">
AUI().ready('liferay-auto-fields', function(A) {
    new Liferay.AutoFields(
    {
    contentBox: '#fyhespecials', 
    fieldIndexes: '<portlet:namespace/>indexes'
    }
    ).render();
});
</aui:script>
public class ListadoMuseoConfigurationActionImpl extends
        DefaultConfigurationAction {

    public void processAction(PortletConfig portletConfig,
            ActionRequest actionRequest, ActionResponse actionResponse)
            throws Exception {

            String portletResource = ParamUtil.getString(actionRequest,
                    "portletResource");

            PortletPreferences preferences = PortletPreferencesFactoryUtil
                    .getPortletSetup(actionRequest, portletResource);

            //...

            String indicesString= actionRequest.getParameter("indexes");

            String fechaEspecial = ParamUtil.getString(actionRequest, "fecha0");
            String fechaEspecial1 = ParamUtil.getString(actionRequest, "fecha1");
            //...

            System.out.println("=============Indices autofields======="+indicesString);
            System.out.println("=============fechaEspecial======="+fechaEspecial);
            System.out.println("=============fechaEspecial1======="+fechaEspecial1);