English 中文(简体)
JSF 2.0 navigating on directLink and directButton don t work
原标题:JSF 2.0 navigating on commandLink and commandButton doesn t work
  • 时间:2011-11-22 11:11:00
  •  标签:
  • jsf
  • jsf-2

使用2号共同财产法的Im和在指挥链接和指挥Button之后的导航存在问题。 我使用以下代码:

<h:commandLink action="login?faces-redirect=true" 
    value="#{showElementBean.showElement()}"> Login </h:commandLink>  

<h:commandButton action="login?faces-redirect=true" value="Move to login.xhtml" />

这些tag在一表内, log就成为一 example。 在已控制的情况下,对已控制情况进行 click评价后,《防止、防止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、实施、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、实施、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止或实施、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止或实施、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止、禁止 我的失误如何?

Edit: According to comments of BalusC I adding real code fragment:

<h:commandLink actionListener="#{showElementBean.showElement(element)}" 
    value="View" > </h:commandLink>

我有一页,有一份内容清单,我希望增加链接,从而形成要素页面。 因此,我需要把这一内容放在一个显示页上。 I m JSF primer, e.g. in Railways I d use GET and URL params, but 我不知道如何在F-way中做到这一点。

最佳回答

这种行为有许多可能的原因。 在以下答复中都提到了这些问题,还有解决办法:commandButton/commandLink/ajax 行动/清单 未援引的方法或未更新的投入价值

然而,就你的具体情况而言,你似乎很有兴趣了解通贸总协定的简单要求,而不是《开放式航程》的要求,因为你想要的是简单的逐页航行。 在此情况下,您需要<代码><h:link>或<h:button>:

<h:link outcome="login" value="Login" />

<h:button outcome="login" value="Move to login.xhtml" />

(我对你试图与#{showElementBean.showElement()}<<<作为指挥链接值,我删除了前者)。

See also:

问题回答

Refer this info: JSF hexachloros

h:commandButton

The commandButton tag renders an HTML submit button that can be associated with a backing bean or ActionListener class for event handling purposes. The display value of the button can also be obtained from a message bundle to support internationalization (I18N).

<><>Example>

<h:commandButton id="button1" value="#{bundle.checkoutLabel}" action="#{shoppingCartBean.checkout}" />

<>光彩”

<input id="form:button1" name="form:button1" type="submit" value="Check Out" onclick="someEvent();" /> 

www.un.org/Depts/DGACM/index_spanish.htm

h:commandLink

The commandLink tag renders an HTML anchor tag that behaves like a form submit button and that can be associated with a backing bean or ActionListener class for event handling purposes. The display value of the link can also be obtained from a message bundle to support internationalization (I18N).

<><>Example>

<h:commandLink id="link1" value="#{bundle.checkoutLabel}" action="#{shoppingCartBean.checkout}" /> 

<>光彩”

<a href="#" onclick="someEvent();" id="form:link1">Check Out</a>

Noticed that backing bean method is not called if the form is for file upload: <h:form name="searchForm" enctype="multipart/form-data" method="post" action="/search">





相关问题
JSF a4j:support with h:selectManyCheckbox

I m having trouble with a JSF selectManyCheckbox and A4J support. The purpose is to run some action when a checkbox is selected. This works perfectly in Firefox. Yet, when testing in any IE (ie6 / ie7 ...

Mojarra for JSF Encoding

Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with

如何拦截要求终止?

在共同基金中,如果用户要求终止,就需要采取一些行动。 我需要某种拦截器,但我不知道如何这样做。 我需要帮助。 增 编

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

Weird behaviour of h:commandLink action (MethodExpression)

I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically. I have showXML.jsp that shows the "XML" column ...

How to correctly use ResultSet with h:dataTable

The problem is, that after displaying the ResultSet with <h:dataTable>, the connection is left open. If I close it, it closes the ResultSet too. I m thinking about copying the ResultSet data ...