Event « Control « JSF Q&A

1. JSF 1.2: valueChangeListener event not returning newly selected value    stackoverflow.com

I have this backing bean:

public class PageBean 
    private List<SelectItem> selectPages;
    private List<SelectItem> selectRowsPerPage;
    private String selectedPage;
    private String ...

2. JSF f:event preRenderView is triggered by f:ajax calls and partial renders, something else?    stackoverflow.com

So we have an f:event:

    <f:event type="preRenderView" listener="#{dashboardBacking.loadProjectListFromDB}"/>
Which is triggered as desired on initial page load (render). However this preRenderView event is also ...

3. JSF actionListener is called multiple times from within HtmlTable    stackoverflow.com

I have a mix of columns in my htmltable: 1 column is an actionlistener, 2 columns are actions and other columns are simple output.

<h:dataTable styleClass="table" id="orderTable" value="#{table.dataModel}"

4. Javascript self contained sandbox events and client side stack    stackoverflow.com

I'm in the process of moving a JSF heavy web application to a REST and mainly JS module application . I've watched "scalable javascript application architecture" by Nicholas Zakas on yui ...

5. Problem h:selectOneMenu and event onSelect    stackoverflow.com

does anybody knows why I am not reaching this alert??

<h:selectOneMenu id="lang" binding="#{mybind}" onSelect="javascript:alert('Reacheable??')" >
in documentation says that it is available. Thanks in advance

6. JSF frontend calling C++ event handler client functions    stackoverflow.com

I have a huge code written in C++. The code has around 300 screens. I want the new screens to be written in JSF. However, rewriting the the existing C++ code is a ...

7. ActionListener phases in JSF    stackoverflow.com

HI, I have a doubt on calling the ActionListener method in the JSF beans. For example every request or submission of JSF form is gone through the life cycle of six phases. ...

8. JSF Ajax events work only once on Safari    stackoverflow.com

I've noticed that, in my application, the Ajax events work only the first time when using Safari (they work correctly on IE and FF). After some debugging, I've noticed that the ...

9. JSF AJAX change event only fires or renders update once when inserted into composite implementation using insertChildren    stackoverflow.com

Background: I want lots (100s) of different edit.xhtml pages, for each different entity class, to share editing of common aspects via an edit_common.xhtml composite component, while still being able to "insert" ...

10. call jsf 2.0 managebean method from javascript onload event    stackoverflow.com

how can i make an ajax request that updates a datatable from javascript. I am currently loading the initial data using @Postconstruct but that is significantly delaying the initial page load. I ...

11. JSF 2.0, "preRenderView" event handler called twice    stackoverflow.com

I have the following snippet:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml"

12. f:ajax doesn't fire for onevent begin event    stackoverflow.com

I have a f:ajax with onevent="checkStatus" with the following implementation:

function checkStatus(event){
    if (event.status == "begin") {
        console.log("ajax begin");

13. Event.observe inefficient with prototype javascript, alternatives?    stackoverflow.com

So we have a table with a lot of checkboxes, onchange of a checkbox we want to call some javascript we use something similar to this snippet


14. JSF Unknown System Events    stackoverflow.com

I am working on a JSF 2.0 project, and learning the benefits of using System Events. However, the book I'm referencing 'Core Java Server Faces 3rd Edition' lists a ...

15. How to get the contextual Pojo when handling a JSF 2.0 Event    stackoverflow.com

I am using a third party JSF 2.0 component (the Primefaces 3.0 FileUpload) that defines its own custom event. On the server side, the signature of the handler looks like ...

16. JSF2 how to create custom ajax event    stackoverflow.com

In JSF2 how to create custom event, that will be triggered from javascript? In JSF2 component I would like to be able to use:

<f:ajax  event="customEvent" listener="#{bean.customEventListener}"/>

17. ActionListener is not being called on dynamically created HtmlCommandLink    stackoverflow.com

I have a dynamically created HtmlCommandLink with an ActionListener, but when I click on the link, the action listener method is not being called. Code:

   public HtmlPanelGroup getP() {

18. JSF: with custom events    stackoverflow.com

Im getting familiar with the JSF event system, but I can't figure out if it is possible to use events using f:event. The book by Ed Burns suggests to ad the ...

19. Cancel JSF ajax call    stackoverflow.com

I have an f:ajax tag inside an h:inputText tag, making ajax calls on keyup events :

<h:inputText id="searchinput" value="#{tvShowForm.name}">
  <f:ajax event="keyup" render="results" listener="#{tvShowForm.search}" />
Each call takes enough time that the user ...

20. How to detect file upload complete event in JSF2.0 using Ajax    stackoverflow.com

Hope you all will be fine. Actually i want to upload image files from system to database. But i want that when user upload files then file didn't go to database ...

21. Disable/enable commandbutton on ajax event    stackoverflow.com

I want to be able to disable the commandbutton below once it's hit and enable it once the event listener runs and msg1 is rendered.

<h:commandButton value="Submit">      ...

22. List of JSF 2 events?    stackoverflow.com

So far I have only known and seen

<f:event type="preRenderView" listener="#{situationHelper.load}"/>
and I wonder where I can find a list of other page (or view) events other than preRenderView? Particularly, I'm looking for ...

23. jsf ajax not updating with keyup event    stackoverflow.com

I am trying to make an jsf site where you can enter an zip code and as you enter a digit the site shows the cities that matches the zipcode you ...

25. How do I set actionListeners in code    coderanch.com

26. Req: ActionListener Example    coderanch.com

27. JSF -ActionListener method    coderanch.com

30. JSF Notes on Events    coderanch.com

About a week ago, I asked a question in this forum concerning JSF events, and how to accomplish a particular task. Apart from using Ajax, no one seemed to know how to accomplish a task that I thought would be fairly easy. Being a fairly stubborn individual, I decided to learn everything there was to know about the JSF lifecycle, order ...

31. calling a JS function on mouse event    coderanch.com

32. Triggers actionListener of CommandButton in jsf    coderanch.com

Hi, Iam some what familiar to jsf.We are using JSF.My Problem is that I have one page which contains datatable list,and one openPop command button.In openPop command button i write code to invoke the popup. Step :1 Using openPop i open the popup window and enter the details submit the page and details are stored successfully into DB. step :2 Now ...

33. doubt in value change event    coderanch.com

i fail to change the backing-bean's property in a value change event. it seem's some process invoke the property's set method and set the property to old value. the jsf fragment: the listener method: public void change(ValueChangeEvent event){ System.out.println("event value:"+event.getNewValue()); this.from=(String) event.getNewValue(); } the binding property and bean methods: private String ...

34. Calling two actionListeners in the same commandButton    coderanch.com

I have a method in a managed bean that store data from a form and i also have a method in another managed bean that fill a SelectOneMenu with SelectItems taken from DAO, i have to call these two methods in the same commando button. Any ideas? Can I call a method of a managed bean that not have been instanciated? ...

35. Event (or breakpoint) ignored    coderanch.com

36. A Problem with events    coderanch.com

Hi, first of all, sorry for my poor english My problem is: Have a page jsf with 2 SelectOneMenu and 1 commandButton like this

37. Dymaic SelectOnelist and Onchange event    coderanch.com

38. How to cancell long-runnig actionListener /stored proc. call/    coderanch.com

Hi, We have one JSF actionListener with just one, long-runnig statement (for example, Oracle stored proc call). Now, we want to provide our user with ability to cancel this actionListener, by clicking to another, 'Cancel' command Button In general, wonder if this possible at all (so, to cancel some Java server side method) and if yes, how to do this , ...

39. Actionlistener-Problem    coderanch.com

40. h:commandButton + actionListener    coderanch.com

41. ActionListener    coderanch.com

42. Events API    coderanch.com

43. Onchange event not called    coderanch.com

Hi , I want that onchange event for an inplaceSelect control to call some javascript , this is an example: If the inplace control's content was click, the control goes to edit mode and the event is called when an item from inplace select was ...

44. duplicate call on preRenderView event    coderanch.com

If you're using templates JSF should be stripping everything outside of the ui:composition tags, so I'd not expect your f:event tag to be processed. Here is a code extract from my template and a content page, this is how I think it should work, note that I explicitly include an f:view tag... --- template.xhtml ---

45. Creating and Handling Faces Event    coderanch.com

Hi everyone, As part of my web application project, I've two classes that generate a tree menu; this menu will expand as a response to the arrival of a parameter in the url, and this part works correctly. Now I'm trying to create and launch an event (javax.faces.event), "onclick" if possible, on the component of menu, from both backend classes to ...

46. custom event problem    coderanch.com

Hello everyone, i am writting own component and experiences some problems with that. My component works fine but wanted to add extra event to it and now i have a problem. I created custom event that extends FacesEvents and follows the exact pattern: import javax.faces.component.UIComponent; import javax.faces.event.FacesEvent; import javax.faces.event.FacesListener; import javax.faces.event.PhaseId; public class myEvent extends FacesEvent { private String src; private ...

48. actionListener a crap shoot    coderanch.com

This is a general kind of question. When I stick an actionListener on a commandLink, it seems to be a crapshoot whether the method defined in the actionListener attribute is actually called or not. Lately I've had problems where they work in Firefox but not in IE. But that's not my specific question. I have code that works that I copied ...

49. onblur event hijacks my onclick!    coderanch.com

Hello, I am having a bit of an issue with onblur/onclick events in my JSF (RichFaces) application. I have summarised the code below: ... ... <%-- Just tried adding this bit.--%> ... So ...

51. Why events are not fired when value changes in h:selectOneMenu? I am stuck!    coderanch.com

The first question to ask in cases like this is "are there other controls on the form that have invalid values?". When you set a listener on a control, it's not a direct pipeline to the backend code. Unless you are using AJAX, the listener won't be fired until/unless: 1. A Submit of the form is done (typically click on commandButton ...

52. Esper events flow    coderanch.com

53. ActionListeners and JavaScript any Relation?    coderanch.com

Short answer: No. Longer answer: Raw JavaScript doesn't understand the subtleties of JSF and the fact that it is client-side only is a liability when backing beans need to be consulted, because then you have to set up an AJAX request to query the server. I normally have server-side validators because while they do carry penalties, I consider the penalties of ...

54. JSF event process handling    coderanch.com

55. JSF Listbox Click Event    forums.oracle.com