Questions tagged [commandlink]

JSF tag to create a POST link.

The <h:commandLink> is a JSF UI component which generates a HTML <a> element which submits its parent <form method="post"> using JavaScript.

208 questions
1
vote
1 answer

@PostConstruct and commandButton/commandLink parameters case

I'm wondering if there is a common pattern for the following scenario. Let's say I have one JSF page backed with one request scoped bean. I want to fech all data rows from a database table when a user enters this page. The same JSF page contains a…
Dzik
  • 399
  • 1
  • 5
  • 17
1
vote
1 answer

Centering the text in an imaged commandLink

i have a p:commandLink with .button{ background-image: url(http://www.lefinnois.net/aqua/aqua1.jpg); display:inline-block; width:150; height:50; }
merveotesi
  • 2,145
  • 15
  • 53
  • 84
1
vote
1 answer

Show/Download txt or csv file with commandLink and Tree2 tomahawk JSF

I have a tree (tree2 tomahawk 1.1.11) that shows a list of dirs and files. When I click on a file I would like to show the download dialog to let the client download the file. My page looks like ...
BRabbit27
  • 6,333
  • 17
  • 90
  • 161
1
vote
0 answers

JSF2 - ui:repeat, 1st commandLink doesn't work but others do

I have a ui:repeat loop to perfom some paging:
JScoobyCed
  • 10,203
  • 6
  • 34
  • 58
1
vote
0 answers

ui:include in richfaces 4 only gets updated on second click

I am new to Richfaces4 and JSF2 and having lots of issues. Same code start to work suddenly and then it breaks. Currently I have a ui:include tag that update the page when the a4j:commandLink is clicked. Using debugging feature of eclipse I can see…
WuR
  • 85
  • 2
  • 14
1
vote
2 answers

h:commandLink not firing the form.submit event

When my page is loaded I execute the following JS script, which I use to display a popup saying (please wait...) when any form is submitted. jQuery(function(){ jQuery("form").submit(function(){jQuery('#wait-link').trigger('click');return…
Omar Al Kababji
  • 1,768
  • 4
  • 16
  • 31
1
vote
1 answer

jsf 2.0 - Pass an outcome as string into a composite component

I'm creating a simple composite component with jsf2, and i'm stucked because of a stupid problem. I don't know how to send to the composite an outcome as parameter, which will be used as action on a commandLink. Exemple :
Julien Lafont
  • 7,869
  • 2
  • 32
  • 52
1
vote
0 answers

Not working h:commandLink (inside rich:dataGrid and h:panelGrid)

I have a problem with not working h:commandLink. Distinct: when I start my app - everything is good, link is invoke at first time but when a rerender this part of page (using rerendered attribute in another part page) then first click on link do…
grzesiek58
  • 11
  • 1
  • 4
1
vote
3 answers

Problems with conditionals in JSF

I have the code bellow: this doesn't work
Topera
  • 12,223
  • 15
  • 67
  • 104
1
vote
1 answer

JSF: CommandLink not working with dataTable and ajax

I have a commandLink inside a dataTable. dataTable is populated by an ajax call. But my commandLink is not pointing to the correct location. Here is the code.
Imad Qureshi
  • 11
  • 1
  • 2
1
vote
1 answer

How to set p:commandLink tag "target" value after validating form value?

In my project I am having a command link in which "target" attribute value is set to "_blank". So if validation error comes it will open a new window and show the error message. But the requirement is if validation is correct it should target to…
1
vote
0 answers

H:CommandLink actionListener code fires again when a jsf component is clicked

I have a JSP page containing a h:dataTable. The datatable has a column of h:commandLink components which open a new popup window. These commandLink components have an actionListener method in the page's backing bean. The code determines which…
mjohnson00
  • 11
  • 1
  • 3
1
vote
1 answer

Apply bookmarkable URL to h:commandLink

As I read in docs and tried myself, JSF 2.0 applied bookmarkable urls to h:link and h:button elements. Is it possible to make bookmarkable URL for h:commandLink element? I experience that f:param is not applied to the result URL of h:commandLink.
sergionni
  • 13,290
  • 42
  • 132
  • 189
1
vote
1 answer

Help to deal with the //request scoped bean behavior?

I'm trying to deal with the well known "issue" where the action method of a h:commandLink doesn't get invoked when placed inside a dataTable that gets its data from a request scoped bean. Due to project constraints, i'm limited to use JSF 2.0 and…
etercap
  • 187
  • 3
  • 9
1
vote
0 answers

Passing f param value from one page to another?

i have a Link in my page the links has a value associated with it , which is dynamically populated by database , the application is in session scope but the param values are not getting updated when passed to new page .
Rahul Singh
  • 19,030
  • 11
  • 64
  • 86