English 中文(简体)
Javascript calls JSFhandler methods
原标题:Javascript calling JSF handler method

我正在用javascript读一个Xml文档,然后我需要提交表格,以便把一种特定方法用在我的联军手中。 通常,当用户点击纽子时,可以通过把行动列入清单的人点击:

<h:commandLink styleClass="button" action="#{myHandler.outcome}" actionListener="#{myHandler.doNext}">
    <span><h:outputText value="#{text.button_submit}" /></span> </h:commandLink>

我不敢肯定,如何在手法中采用像上面的狗那样的方法。 我不能简单:

document.form.submit();

当时,它重复了处理,即已经这样做。 我想从Xml文档中读取价值,然后用手提某种方法。 任何想法都受到高度赞赏。

最佳回答

我找到了解决办法。 我在我的小sp中添加了一个隐藏的纽子,如:

<p id="hiddenButton" style="display:none;" >
           <h:commandLink id="hiddenRegButton" styleClass="button" action="#{myHandler.doNext}" />
        </p>

我用javascript,用j Query进行点击,导致我的残疾者采用“多民族”方法被处决。

jQuery( #hiddenRegButton ).click();

这比我觉得容易。

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签