简体   繁体   English

javascript和h:commandLink问题

[英]Problems with javascript and h:commandLink

                <a href="#" onclick="return oamSubmitForm('display_form','display_form:link_prev');" id="display_form:link_prev"> &lt; Prev</a>
                <a href="#" onclick="return oamSubmitForm('display_form','display_form:link_next');" id="display_form:link_next"> Next &gt;</a>
            </div>
        </td>
    </tr>
    <tr>
        <td colspan="14" height="5" nowrap="nowrap" class="WhiteRow"></td>
    </tr>
    <input type="hidden" id="display_form:removeUserId" name="display_form:removeUserId" value="" />
    <input type="hidden" id="display_form:remove111" name="display_form:remove111" value="" />
    <input type="hidden" id="display_form:remove222" name="display_form:remove222" value="" />
    <input type="hidden" id="display_form:showPrev" name="display_form:showPrev" value="true" />
    <input type="hidden" id="display_form:showNext" name="display_form:showNext" value="true" /> 
    <tr>
        <td colspan="14" height="30" nowrap="nowrap" align="center">
            <input type="button" class="disabledfield" id="button_edit" value="Edit Details" onclick="populateEditRow();" />
            <input id="display_form:button_remove" name="display_form:button_remove" type="submit" value="Remove" onclick="populateRemoveRow();;" class="disabledfield" />
        </td>
    </tr>
    <tr>
        <td height="10"></td>
    </tr>
</table>

The above HTML is what the JSF renders. 上面的HTML是JSF呈现的内容。 When clicking on Prev / Next , I am getting javascript error as 'invalid Argument' , The JSF has created some functions like oamSubmitForm and several others. 当单击Prev / Next时,我收到javascript错误作为“无效参数”的消息,JSF创建了一些功能,例如oamSubmitForm和其他一些功能。

What could be the problem? 可能是什么问题呢? anything obvious? 有什么明显的?

It look like that you're using MyFaces . 看起来您正在使用MyFaces I don't recognize that function as from Mojarra . 我不知道该功能来自Mojarra At least, this unhelpful JavaScript error is typical for the JS engine of the MSIE browser. 至少,对于MSIE浏览器的JS引擎来说,这种无用的JavaScript错误是典型的。

Have you tried a different (better) browser? 您是否尝试过其他(更好)的浏览器? For example FireFox ? 例如FireFox Does it work there or not? 它在那里工作吗? If not, did you try Firebug 's JS debugger to determine the root cause of this JS error? 如果不是,您是否尝试过Firebug的JS调试器来确定此JS错误的根本原因? If it's obviously caused by a bug in the JS function generated by MyFaces, then you need to try upgrade MyFaces to the latest version (or just replace by Mojarra). 如果显然是由MyFaces生成的JS函数中的错误引起的,那么您需要尝试将MyFaces升级到最新版本(或仅由Mojarra替换)。 If upgrading MyFaces doesn't help, then report an issue at their issuetracker along with the smallest possible working snippet of the exact JSF code which reproduces this problem, along with detailed version information of the browser(s) used. 如果升级MyFaces不能解决问题,请在其问题追踪器中报告问题,并重现此问题的确切JSF代码的最小可行代码段,以及使用的浏览器的详细版本信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM