commandlink

params not getting passed to backing bean for h:commandLink under rich:popupPanel and t:dataList

為{幸葍}努か 提交于 2019-12-02 04:06:42
I have rich:popupPanel which contains t:dataList under one column of t:dataTable. This dataList has h:commandLink which has f:param inside it. It was working fine for richfaces 3.3 but after migration to richfaces 4, it stopped working. To mention the fact that I was using rich:modalPanel in place of rich:popupPanel over there. I went through quite a few links: https://community.jboss.org/thread/202583 commandButton/commandLink/ajax action/listener method not invoked or input value not updated but of no help :(. Am I missing something? Currently, bean is session-scoped and I am using getter to

How to put image instead of text in h:commandLink value

别等时光非礼了梦想. 提交于 2019-12-02 02:04:20
问题 I have a command link as below. <h:commandLink value="Home" action="homePage"> </h:commandLink> This is working fine, but I need a image instead of text value. The image has to act as a command link. How can I achieve this? 回答1: You should remove value attribute and put <h:graphicImage> inside <h:commandLink> . <h:commandLink action="homePage"> <h:graphicImage value="resources/images/img.png" /> </h:commandLink> 来源: https://stackoverflow.com/questions/24995284/how-to-put-image-instead-of-text

How to put image instead of text in h:commandLink value

丶灬走出姿态 提交于 2019-12-01 23:48:53
I have a command link as below. <h:commandLink value="Home" action="homePage"> </h:commandLink> This is working fine, but I need a image instead of text value. The image has to act as a command link. How can I achieve this? cmenti You should remove value attribute and put <h:graphicImage> inside <h:commandLink> . <h:commandLink action="homePage"> <h:graphicImage value="resources/images/img.png" /> </h:commandLink> 来源: https://stackoverflow.com/questions/24995284/how-to-put-image-instead-of-text-in-hcommandlink-value

“This link is deactivated, because it is not embedded in a JSF form.”

≡放荡痞女 提交于 2019-12-01 16:19:35
When I use the following command link: <h:commandLink action="student" value="students" /> And the following navigation rule in faces-config.xml : <navigation-rule> <from-view-id>/home.xhtml</from-view-id> <navigation-case> <from-outcome>student</from-outcome> <to-view-id>/student.xhtml</to-view-id> </navigation-case> </navigation-rule> Then I get the following development stage faces message: This link is deactivated, because it is not embedded in a JSF form. How is this caused and how can I solve it? BalusC The <h:commandLink> fires a POST request. You need to embed it in a <h:form> . <h

h:commandLink actionlistener is not invoked when used with f:ajax and ui:repeat

倾然丶 夕夏残阳落幕 提交于 2019-12-01 07:21:54
问题 h:commandLink actionlistener is not invoked when used with f:ajax and ui:repeat When I click the link, I have to pass a parameter in the bean's "onload" method and refresh the panelgroup "assist". It works fine when I use the commandButton but not with commandLink. <h:panelGroup id="assist" styleClass="tabbed-panel-vertical"> <ul id="assistlink" class="tabbed-panel-vertical-tabs"> <ui:repeat var="assistants" value="#{permissions.repAssistants}"> <li><h:commandLink actionListener="#

h:commandbutton vs h:commandlink

泪湿孤枕 提交于 2019-11-30 06:54:26
We are using JSF-2.1.7 and in all our form post requests. I am trying to justify whether to use <h:commandButton> or <h:commandLink> . The appearance of <h:commandLink> (href <a/> ) can be controlled using style and jQuery. Which is recommended <h:commandButton> or <h:commandLink> ? Is there any real advantage? BalusC There is no functional difference apart from the generated markup and the appearance. The <h:commandButton> generates a HTML <input type="submit"> element and the <h:commandLink> generates a HTML <a> element which uses JavaScript to submit the form. Both are to be used to submit

h:commandbutton vs h:commandlink

自古美人都是妖i 提交于 2019-11-29 06:29:26
问题 We are using JSF-2.1.7 and in all our form post requests. I am trying to justify whether to use <h:commandButton> or <h:commandLink> . The appearance of <h:commandLink> (href <a/> ) can be controlled using style and jQuery. Which is recommended <h:commandButton> or <h:commandLink> ? Is there any real advantage? 回答1: There is no functional difference apart from the generated markup and the appearance. The <h:commandButton> generates a HTML <input type="submit"> element and the <h:commandLink>

p:commandLink fails to open page in new window/tab

无人久伴 提交于 2019-11-29 05:33:18
I'm trying to create a link to open a new page in a different window/tab and display some msg from backing bean but fail to do it, wonder know why? here is my xhtml file: <html:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:body> <h:form id="form66"> <p:commandLink actionListener="#{testing.getMessage}" action="msg.xhtml" target="_blank">get Msg</p:commandLink> </h:form> </h:body> </html>

How can I redirect in JSF 2.0

霸气de小男生 提交于 2019-11-29 00:10:25
I want to redirect from a link in a JSF page, how can I do it? In HTML I can use <a> tag for this. But in JSF I use <h:outputLink> or <h:commandLink> as they can be conditionally rendered. I want redirect link to other page in same application or to an external URL. How can I do it with JSF? How can I use action in <h:commandLink> for this? BalusC Assuming that you'd like to redirect to some.xhtml which is placed in web root folder: You can just continue using plain HTML. <a href="#{request.contextPath}/some.xhtml">go to some page</a> For conditional rendering, just wrap it in an <ui:fragment>

How can I redirect in JSF 2.0

余生长醉 提交于 2019-11-27 15:11:55
问题 I want to redirect from a link in a JSF page, how can I do it? In HTML I can use <a> tag for this. But in JSF I use <h:outputLink> or <h:commandLink> as they can be conditionally rendered. I want redirect link to other page in same application or to an external URL. How can I do it with JSF? How can I use action in <h:commandLink> for this? 回答1: Assuming that you'd like to redirect to some.xhtml which is placed in web root folder: You can just continue using plain HTML. <a href="#{request